v1

package
v0.5.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServant

func RegisterUserServant(e *gin.Engine, s User)

RegisterUserServant register User servant to gin

Types

type AgentInfo

type AgentInfo struct {
	Platform  string `json:"platform"`
	UserAgent string `json:"user_agent"`
}

type LoginReq

type LoginReq struct {
	AgentInfo AgentInfo `json:"agent_info"`
	Name      string    `json:"name"`
	Passwd    string    `json:"passwd"`
}

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 UnimplementedUserServant

type UnimplementedUserServant struct{}

UnimplementedUserServant can be embedded to have forward compatible implementations.

func (UnimplementedUserServant) Index

func (UnimplementedUserServant) Index() mir.Error

func (UnimplementedUserServant) Login

func (UnimplementedUserServant) Login(req *LoginReq) (*LoginResp, mir.Error)

func (UnimplementedUserServant) Logout

func (UnimplementedUserServant) Logout() mir.Error

type User

type User interface {
	Logout() mir.Error
	Login(*LoginReq) (*LoginResp, mir.Error)
	Index() mir.Error
	// contains filtered or unexported methods
}

type UserInfo

type UserInfo struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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