api

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inject

func Inject(container *dig.Container) error

Inject apis

Types

type AuthAPI

type AuthAPI struct {
	// contains filtered or unexported fields
}

AuthAPI handle authentication api

func NewAuthAPI

func NewAuthAPI(service interfaces.IAuthService) *AuthAPI

NewAuthAPI return new AuthAPI

func (*AuthAPI) Login

func (a *AuthAPI) Login(c *gin.Context) gohttp.Response

Login godoc @Tags Auth @Summary api login @Description api login @Accept json @Produce json @Param body body schema.LoginBodyParams true "Body" @Success 200 {object} schema.BaseResponse @Router /login [post]

func (*AuthAPI) Logout

func (a *AuthAPI) Logout(c *gin.Context) gohttp.Response

Logout godoc @Tags Auth @Summary api logout @Description api logout @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} schema.BaseResponse @Router /logout [post]

func (*AuthAPI) Refresh

func (a *AuthAPI) Refresh(c *gin.Context) gohttp.Response

Refresh godoc @Tags Auth @Summary api refresh token @Description api refresh token @Accept json @Produce json @Param body body schema.RefreshBodyParams true "Body" @Success 200 {object} schema.BaseResponse @Router /refresh [post]

func (*AuthAPI) Register

func (a *AuthAPI) Register(c *gin.Context) gohttp.Response

Register godoc @Tags Auth @Summary api register @Description api register @Accept json @Produce json @Param body body schema.RegisterBodyParams true "Body" @Success 200 {object} schema.BaseResponse @Router /register [post]

type RoleAPI

type RoleAPI struct {
	// contains filtered or unexported fields
}

RoleAPI handle role api

func NewRoleAPI

func NewRoleAPI(service interfaces.IRoleService) *RoleAPI

NewRoleAPI return new RoleAPI pointer

func (*RoleAPI) CreateRole

func (r *RoleAPI) CreateRole(c *gin.Context) gohttp.Response

CreateRole create new role

type UserAPI

type UserAPI struct {
	// contains filtered or unexported fields
}

UserAPI handle user api

func NewUserAPI

func NewUserAPI(service interfaces.IUserService) *UserAPI

NewUserAPI return new UserAPI pointer

func (*UserAPI) GetByID

func (u *UserAPI) GetByID(c *gin.Context)

GetByID get user by id

func (*UserAPI) List

func (u *UserAPI) List(c *gin.Context) gohttp.Response

List user by query

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL