controller

package
v0.13.0-alpha.65 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 17 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 RegistryController

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

func NewRegistryController

func NewRegistryController(key *rsa.PrivateKey, registryService *service.RegistryService) *RegistryController

func (*RegistryController) Create

func (rc *RegistryController) Create(req *restful.Request, resp *restful.Response)

func (*RegistryController) Delete

func (rc *RegistryController) Delete(req *restful.Request, resp *restful.Response)

func (*RegistryController) Get

func (rc *RegistryController) Get(req *restful.Request, resp *restful.Response)

func (*RegistryController) List

func (rc *RegistryController) List(req *restful.Request, resp *restful.Response)

func (*RegistryController) RegisterRoutes

func (rc *RegistryController) RegisterRoutes(ws *restful.WebService)

func (*RegistryController) Update

func (rc *RegistryController) Update(req *restful.Request, resp *restful.Response)

func (*RegistryController) UpdateAllowImages

func (rc *RegistryController) UpdateAllowImages(req *restful.Request, resp *restful.Response)

func (*RegistryController) UpdateAnonymousData

func (rc *RegistryController) UpdateAnonymousData(req *restful.Request, resp *restful.Response)

func (*RegistryController) UpdateIPData

func (rc *RegistryController) UpdateIPData(req *restful.Request, resp *restful.Response)

type RegistryDetailResponse

type RegistryDetailResponse struct {
	RegistryID int64              `json:"registry_id"`
	UserID     int64              `json:"user_id"`
	Domain     string             `json:"domain"`
	Data       model.RegistryAttr `json:"data"`
}

type RegistryRequest

type RegistryRequest struct {
	Domain string             `json:"domain"`
	Data   model.RegistryAttr `json:"data"`
}

type RegistryResponse

type RegistryResponse struct {
	RegistryID int64 `json:"registry_id"`
}

type RegistryUpdateAllowImagesRequest

type RegistryUpdateAllowImagesRequest struct {
	Items        []string `json:"items"`
	BlockMessage string   `json:"block_message"`
}

type RegistryUpdateAnonymousDataRequest

type RegistryUpdateAnonymousDataRequest struct {
	Data model.TokenAttr `json:"data"`
}

type RegistryUpdateIPDataRequest

type RegistryUpdateIPDataRequest struct {
	IPs  []string        `json:"ips"`
	Data model.TokenAttr `json:"data"`
}

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    model.TokenAttr `json:"data"`
}

type TokenRequest

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

type TokenResponse

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

type UpdateNicknameRequest

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

type UpdatePasswordRequest

type UpdatePasswordRequest struct {
	Account     string `json:"account"`
	OldPassword string `json:"old_password"`
	NewPassword string `json:"new_password"`
}

type UserController

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

func NewUserController

func NewUserController(key *rsa.PrivateKey, adminToken string, 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)

func (*UserController) UpdatePassword

func (uc *UserController) UpdatePassword(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"`
}

type UserResponse

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

Jump to

Keyboard shortcuts

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