• Stars
    star
    315
  • Rank 132,951 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple user API service.

A simple user API service

Installation

1. You need a go development environment setup before everything starts taking off.

2. Use git clone to clone the repo to your local folder.

git clone https://github.com/gogf/gf-demo-user

3. Import manifest/sql/create.sql to your database.

4. Update manifest/config/config.yaml according to your local configurations if necessary.

5. Run command go run main.go, and you'll see something as follows if success:

  ADDRESS | METHOD |         ROUTE         |                                       HANDLER                                        |        MIDDLEWARE
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | ALL    | /*                    | github.com/gogf/gf/v2/net/ghttp.internalMiddlewareServerTracing                      | GLOBAL MIDDLEWARE
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | ALL    | /*                    | github.com/gogf/gf/v2/net/ghttp.MiddlewareHandlerResponse                            | GLOBAL MIDDLEWARE
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | ALL    | /api.json             | github.com/gogf/gf/v2/net/ghttp.(*Server).openapiSpec                                |
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | ALL    | /swagger/*            | github.com/gogf/gf/v2/net/ghttp.(*Server).swaggerUI                                  | HOOK_BEFORE_SERVE
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | POST   | /user/check-nick-name | github.com/gogf/gf-demo-user/v2/internal/controller/user.(*Controller).CheckNickName | service.IMiddleware.Ctx   
          |        |                       |                                                                                      | ghttp.MiddlewareCORS      
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | POST   | /user/check-passport  | github.com/gogf/gf-demo-user/v2/internal/controller/user.(*Controller).CheckPassport | service.IMiddleware.Ctx   
          |        |                       |                                                                                      | ghttp.MiddlewareCORS      
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | POST   | /user/is-signed-in    | github.com/gogf/gf-demo-user/v2/internal/controller/user.(*Controller).IsSignedIn    | service.IMiddleware.Ctx   
          |        |                       |                                                                                      | ghttp.MiddlewareCORS      
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | GET    | /user/profile         | github.com/gogf/gf-demo-user/v2/internal/controller/user.(*Controller).Profile       | service.IMiddleware.Ctx
          |        |                       |                                                                                      | ghttp.MiddlewareCORS
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | GET    | /user/profile         | github.com/gogf/gf-demo-user/v2/internal/controller/user.(*Controller).Profile       | service.IMiddleware.Ctx
          |        |                       |                                                                                      | ghttp.MiddlewareCORS
          |        |                       |                                                                                      | service.IMiddleware.Auth
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | POST   | /user/sign-in         | github.com/gogf/gf-demo-user/v2/internal/controller/user.(*Controller).SignIn        | service.IMiddleware.Ctx
          |        |                       |                                                                                      | ghttp.MiddlewareCORS
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | POST   | /user/sign-out        | github.com/gogf/gf-demo-user/v2/internal/controller/user.(*Controller).SignOut       | service.IMiddleware.Ctx
          |        |                       |                                                                                      | ghttp.MiddlewareCORS
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------
  :8000   | POST   | /user/sign-up         | github.com/gogf/gf-demo-user/v2/internal/controller/user.(*Controller).SignUp        | service.IMiddleware.Ctx
          |        |                       |                                                                                      | ghttp.MiddlewareCORS
----------|--------|-----------------------|--------------------------------------------------------------------------------------|---------------------------

GoFrame Sites

GoFrame Repo

GoFrame Home

More Repositories

1

gf

GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
Go
10,033
star
2

awesome-gf

Awesome projects using GoFrame.
322
star
3

gf-cli

GoFrame Command Line Interface, which is your helpmate for building GoFrame application with convenience.
Go
250
star
4

gf-jwt

GoFrame HTTP JWT middleware.
Go
115
star
5

focus

Community system build using GoFrame.
Go
112
star
6

focus-single

Single repo demo project using GoFrame.
Go
112
star
7

katyusha

[WIP]Katyusha micro service development framework.
Go
84
star
8

greuse

Package greuse provides Listen and Dial functions that set socket options in order to be able to reuse ports. You should only use this package if you know what SO_REUSEADDR and SO_REUSEPORT are.
Go
55
star
9

swagger

Swagger wrapper for GoFrame project.
Go
30
star
10

gf-demo-grpc

A simple GRPC service.
Go
13
star
11

gf-demo-chat

A simple MVC chat service.
Go
13
star
12

gcache-adapter

Adapters for GoFrame package gcache.
Go
12
star
13

goframe.org-pdf

Standalone document of goframe.org in pdf.
11
star
14

csrf

CSRF middleware for GoFrame web server.
Go
8
star
15

polaris

Polaris with GoFrame.
Go
7
star
16

guuid

Package guuid generates and inspects UUIDs.
Go
7
star
17

katyusha-demos

[WIP] Demonstrations for Katyusha.
Go
5
star
18

gf-tracing

GoFrame tracing feature demonstrations.
Go
4
star
19

template-mono

GoFrame Template For MonoRepo
Go
4
star
20

gf-empty

An empty project of GoFrame.
Go
3
star
21

selfupdate

Go
3
star
22

template-single

GoFrame Template For SingleRepo
Go
3
star
23

gflock

Package gflock implements a concurrent-safe sync.Locker interface for file locking.
Go
1
star