- run
go mod download
to download requirements
- run
go get -u github.com/swaggo/swag/cmd/swag
to install swagger for api docs
- run
swag init
to generate swagger docs
- Please make sure your
go version
>= 1.11
- Edit
config.example.yml
and save it as config.yml
for develope usage.
- Then edit
config.example.yml
and save it as config.deploy.yml
for deploy usage.
- When deploying, mv
config.deploy.yml
to the same folder with your binary file you've built.
├── Dockerfile // docker support
├── Gopkg.lock
├── Gopkg.toml
├── Makefile
├── README.md
├── config.example.yml // example config
├── db
│ ├── mongo.go
│ └── redis.go
├── family-tree.go // main func and router
├── graphql
│ ├── base.go
│ ├── mutation.go
│ ├── query.go
│ ├── resolvers.go
│ ├── schema.go
│ ├── types
│ │ ├── company.go
│ │ ├── group.go
│ │ ├── project.go
│ │ └── user.go
│ ├── types.go
│ └── utils.go
├── handler // handler json requests
│ ├── base.go
│ ├── base_test.go
│ ├── db.go
│ ├── db_test.go
│ ├── register.go
│ ├── register_test.go
│ ├── reset_password.go
│ └── reset_password_test.go
├── middleware
│ ├── auth.go
│ └── cors.go
├── schema.graphql // graphql doc
└── utils
├── config.go // load config
├── recovery.go
└── sms.go // handle message request with Dayu of Aliyun and Tencent Cloud SMS Service