1 Star 1 Fork 0

a07061625 / gompf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

简介

go语言多功能框架(go multi-purpose frame),集成多种常用功能,包括微信,支付宝,短信,物流等众多实用功能

安装

go get github.com/a07061625/gompf/mpf
git clone https://github.com/a07061625/gompf GOPATH/pkg/src/github.com/a07061625/gompf

使用

初始化

bs := mpf.NewBootstrap()
bs.SetDirRoot(dirRoot)
bs.SetDirConfigs(dirConfigs)
bs.SetDirLogs(dirLogs)
github.com/a07061625/gompf/mpf.LoadBoot(bs)
// 进行上述设置后就可以愉快的使用了

命令行参数

必填

  • -mppt: 项目标识,小写字母和数字组成的3位长度字符串
  • -mppm: 项目模块,字母和数字组成的字符串
  • -mpot: 操作类型,start:启动服务 stop:停止服务 restart:重启服务

选填

  • -mpet: 环境类型,默认为product,dev:测试 product:生产

框架详解

代码结构

  • configs: 配置文件
  • mpf: 源码

自定义常量

  • MP_DIR_ROOT: 项目根目录
  • MP_ENV_TYPE: 环境类型
  • MP_PROJECT_TAG: 项目标识
  • MP_PROJECT_MODULE: 项目模块
  • MP_PROJECT_KEY: 项目代号,由环境类型+项目标识组成
  • MP_PROJECT_KEY_MODULE: 项目模块代号,由项目标识+项目模块组成
BSD 3-Clause License Copyright (c) 2019, a07061625 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

基于iris的通用型框架 展开 收起
Go
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/a07061625/gompf.git
git@gitee.com:a07061625/gompf.git
a07061625
gompf
gompf
master

搜索帮助