Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServant ¶
func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender)
RegisterUserServant register User servant to gin
Types ¶
type LoginResp ¶
type LoginResp struct { UserInfo ServerInfo ServerInfo `json:"server_info"` JwtToken string `json:"jwt_token"` }
type ServerInfo ¶
type ServerInfo struct {
ApiVer string `json:"api_ver"`
}
type UnimplementedUserBinding ¶
UnimplementedUserBinding can be embedded to have forward compatible implementations.
type UnimplementedUserRender ¶
UnimplementedUserRender can be embedded to have forward compatible implementations.
func (*UnimplementedUserRender) RenderLogin ¶
func (r *UnimplementedUserRender) RenderLogin(c *gin.Context, data *LoginResp, err mir.Error)
func (*UnimplementedUserRender) RenderLogout ¶
func (r *UnimplementedUserRender) RenderLogout(c *gin.Context, err mir.Error)
type UnimplementedUserServant ¶
type UnimplementedUserServant struct { }
UnimplementedUserServant can be embedded to have forward compatible implementations.
func (UnimplementedUserServant) Chain ¶
func (UnimplementedUserServant) Chain() gin.HandlersChain
func (UnimplementedUserServant) Login ¶
func (UnimplementedUserServant) Login(req *LoginReq) (*LoginResp, mir.Error)
func (UnimplementedUserServant) Logout ¶
func (UnimplementedUserServant) Logout() mir.Error
type User ¶
type User interface { // Chain provide handlers chain for gin Chain() gin.HandlersChain Logout() mir.Error Login(*LoginReq) (*LoginResp, mir.Error) // contains filtered or unexported methods }
type UserBinding ¶
Click to show internal directories.
Click to hide internal directories.