web

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(svc service.Service, ldapSvc service.LdapService, policySvc policy.Service) *Handler

func (*Handler) GetUserInfo added in v1.3.0

func (h *Handler) GetUserInfo(ctx *gin.Context) (ginx.Result, error)

func (*Handler) ListUser added in v1.3.0

func (h *Handler) ListUser(ctx *gin.Context, req Page) (ginx.Result, error)

func (*Handler) LoginLdap

func (h *Handler) LoginLdap(ctx *gin.Context, req LoginLdapReq) (ginx.Result, error)

func (*Handler) LoginSystem added in v1.3.0

func (h *Handler) LoginSystem(ctx *gin.Context, req LoginSystemReq) (ginx.Result, error)

func (*Handler) PrivateRoutes added in v1.3.0

func (h *Handler) PrivateRoutes(server *gin.Engine)

func (*Handler) PublicRoutes added in v1.3.0

func (h *Handler) PublicRoutes(server *gin.Engine)

func (*Handler) RefreshAccessToken

func (h *Handler) RefreshAccessToken(ctx *gin.Context) (ginx.Result, error)

func (*Handler) RegisterUser added in v1.4.0

func (h *Handler) RegisterUser(ctx *gin.Context, req RegisterUserReq) (ginx.Result, error)

func (*Handler) ToUserVo

func (h *Handler) ToUserVo(src domain.User) User

func (*Handler) UserRoleBind added in v1.3.0

func (h *Handler) UserRoleBind(ctx *gin.Context, req UserBindRoleReq) (ginx.Result, error)

type LoginLdapReq

type LoginLdapReq struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type LoginSystemReq added in v1.3.0

type LoginSystemReq struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Page added in v1.3.0

type Page struct {
	Offset int64 `json:"offset,omitempty"`
	Limit  int64 `json:"limit,omitempty"`
}

type RegisterUserReq added in v1.4.0

type RegisterUserReq struct {
	Username    string `json:"username"`
	Password    string `json:"password"`
	RePassword  string `json:"re_password"`
	DisplayName string `json:"display_name"`
}

type RetrieveUsers added in v1.3.0

type RetrieveUsers struct {
	Total int64  `json:"total"`
	Users []User `json:"users"`
}

type User

type User struct {
	Id          int64    `json:"id"`
	Username    string   `json:"username"`
	Password    string   `json:"password"`
	Email       string   `json:"email"`
	Title       string   `json:"title"`
	DisplayName string   `json:"display_name"`
	CreateType  uint8    `json:"create_type"`
	RoleCodes   []string `json:"role_codes"`
}

type UserBindRoleReq added in v1.3.0

type UserBindRoleReq struct {
	Id        int64    `json:"id"`
	RoleCodes []string `json:"role_codes"`
}

Jump to

Keyboard shortcuts

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