web

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 10 Imported by: 0

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) 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 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"`
	SourceType int64    `json:"source_type"`
	CreateType int64    `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