controller

package
v0.13.0-alpha.39 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type Session

type Session struct {
	UserID int64 `json:"user_id"`
}

type TokenController

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

func NewTokenController

func NewTokenController(key *rsa.PrivateKey, tokenService *service.TokenService) *TokenController

func (*TokenController) Create

func (tc *TokenController) Create(req *restful.Request, resp *restful.Response)

func (*TokenController) Delete

func (tc *TokenController) Delete(req *restful.Request, resp *restful.Response)

func (*TokenController) Get

func (tc *TokenController) Get(req *restful.Request, resp *restful.Response)

func (*TokenController) List

func (tc *TokenController) List(req *restful.Request, resp *restful.Response)

func (*TokenController) RegisterRoutes

func (tc *TokenController) RegisterRoutes(ws *restful.WebService)

type TokenDetailResponse

type TokenDetailResponse struct {
	TokenID int64  `json:"token_id"`
	Account string `json:"account"`
	Data    string `json:"data"`
}

type TokenRequest

type TokenRequest struct {
	Account  string `json:"account"`
	Password string `json:"password"`
	Data     string `json:"data"`
}

type TokenResponse

type TokenResponse struct {
	TokenID int64 `json:"token_id"`
}

type UpdateNicknameRequest

type UpdateNicknameRequest struct {
	Nickname string `json:"nickname"`
}

type UserController

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

func NewUserController

func NewUserController(key *rsa.PrivateKey, userService *service.UserService) *UserController

func (*UserController) Create

func (uc *UserController) Create(req *restful.Request, resp *restful.Response)

func (*UserController) Get

func (uc *UserController) Get(req *restful.Request, resp *restful.Response)

func (*UserController) GetUserLogin

func (uc *UserController) GetUserLogin(req *restful.Request, resp *restful.Response)

func (*UserController) RegisterRoutes

func (uc *UserController) RegisterRoutes(ws *restful.WebService)

func (*UserController) UpdateNickname

func (uc *UserController) UpdateNickname(req *restful.Request, resp *restful.Response)

type UserDetailResponse

type UserDetailResponse struct {
	UserID   int64  `json:"user_id"`
	Nickname string `json:"nickname"`
}

type UserLoginRequest

type UserLoginRequest struct {
	Account  string `json:"account"`
	Password string `json:"password"`
}

type UserLoginResponse

type UserLoginResponse struct {
	Token string `json:"token"`
}

type UserRequest

type UserRequest struct {
	Nickname string `json:"nickname,omitempty"`
	Account  string `json:"account"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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