Documentation ¶
Index ¶
- func DecodeAccessTokenBody2AccessToken(b AccessTokenBody) *user.AccessToken
- func DecodeAccessTokensBody2AccessTokens(bs AccessTokensBody) []*user.AccessToken
- func DecodeAgentTokenBody2AgentToken(b AgentTokenBody) *user.AgentToken
- func DecodeAgentTokensBody2AgentTokens(bs AgentTokensBody) []*user.AgentToken
- func DecodeSignCreateAgentTokenRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeSignCreateAgentTokenResponse(ctx context.Context, res *http.Response) (interface{}, error)
- func DecodeSignCreateUserRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeSignCreateUserResponse(ctx context.Context, res *http.Response) (interface{}, error)
- func DecodeSignDeleteAgentTokenRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeSignDeleteAgentTokenResponse(ctx context.Context, res *http.Response) (interface{}, error)
- func DecodeSignDeleteUserByIDRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeSignDeleteUserByIDResponse(ctx context.Context, res *http.Response) (interface{}, error)
- func DecodeSignGetUserByIDResponse(ctx context.Context, res *http.Response) (interface{}, error)
- func DecodeSignGetUserRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeSignLoginRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeSignLoginResponse(ctx context.Context, res *http.Response) (interface{}, error)
- func DecodeSignLogoutRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeSignLogoutResponse(ctx context.Context, res *http.Response) (interface{}, error)
- func DecodeSignValidateTokenRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeSignValidateTokenResponse(ctx context.Context, res *http.Response) (interface{}, error)
- func DecodeUserBody2User(b UserBody) *user.User
- func EncodeError(ctx context.Context, err error, w http.ResponseWriter)
- func EncodeRequest(ctx context.Context, r *http.Request, request interface{}) error
- func EncodeResponse(ctx context.Context, w http.ResponseWriter, code int, response interface{}) error
- func EncodeSignCreateAgentTokenRequest(ctx context.Context, r *http.Request, request interface{}) error
- func EncodeSignCreateUserRequest(ctx context.Context, r *http.Request, request interface{}) error
- func EncodeSignDeleteAgentTokenRequest(ctx context.Context, r *http.Request, request interface{}) error
- func EncodeSignDeleteUserByIDRequest(ctx context.Context, r *http.Request, request interface{}) error
- func EncodeSignGetUserByIDRequest(ctx context.Context, r *http.Request, request interface{}) error
- func EncodeSignLoginRequest(ctx context.Context, r *http.Request, request interface{}) error
- func EncodeSignLogoutRequest(ctx context.Context, r *http.Request, request interface{}) error
- func EncodeSignValidateTokenRequest(ctx context.Context, r *http.Request, request interface{}) error
- func MakeResponseEncoder(code int) func(context.Context, http.ResponseWriter, interface{}) error
- type AccessTokenBody
- type AccessTokensBody
- type AgentTokenBody
- type AgentTokensBody
- type SignCreateAgentTokenRequest
- type SignCreateAgentTokenResponse
- type SignCreateUserRequest
- type SignCreateUserResponse
- type SignDeleteAgentTokenRequest
- type SignDeleteAgentTokenResponse
- type SignDeleteUserRequest
- type SignDeleteUserResponse
- type SignGetUserRequest
- type SignGetUserResponse
- type SignLoginRequest
- type SignLoginResponse
- type SignLogoutRequest
- type SignLogoutResponse
- type SignValidateTokenRequest
- type SignValidateTokenResponse
- type UserBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAccessTokenBody2AccessToken ¶
func DecodeAccessTokenBody2AccessToken(b AccessTokenBody) *user.AccessToken
func DecodeAccessTokensBody2AccessTokens ¶
func DecodeAccessTokensBody2AccessTokens(bs AccessTokensBody) []*user.AccessToken
func DecodeAgentTokenBody2AgentToken ¶
func DecodeAgentTokenBody2AgentToken(b AgentTokenBody) *user.AgentToken
func DecodeAgentTokensBody2AgentTokens ¶
func DecodeAgentTokensBody2AgentTokens(bs AgentTokensBody) []*user.AgentToken
func DecodeSignLoginRequest ¶
func DecodeSignLoginResponse ¶
func DecodeSignLogoutRequest ¶
func DecodeUserBody2User ¶
func EncodeError ¶
func EncodeError(ctx context.Context, err error, w http.ResponseWriter)
func EncodeRequest ¶
func EncodeResponse ¶
func EncodeSignLoginRequest ¶
func EncodeSignLogoutRequest ¶
func MakeResponseEncoder ¶
Types ¶
type AccessTokenBody ¶
func EncodeAccessToken2AccessTokenBody ¶
func EncodeAccessToken2AccessTokenBody(t *user.AccessToken) AccessTokenBody
type AccessTokensBody ¶
type AccessTokensBody []AccessTokenBody
func EncodeAccessTokens2AccessTokensBody ¶
func EncodeAccessTokens2AccessTokensBody(ts []*user.AccessToken) AccessTokensBody
type AgentTokenBody ¶
func EncodeAgentToken2AgentTokenBody ¶
func EncodeAgentToken2AgentTokenBody(t *user.AgentToken) AgentTokenBody
type AgentTokensBody ¶
type AgentTokensBody []AgentTokenBody
func EncodeAgentTokens2AgentTokensBody ¶
func EncodeAgentTokens2AgentTokensBody(ts []*user.AgentToken) AgentTokensBody
type SignCreateAgentTokenRequest ¶
type SignCreateAgentTokenRequest struct {
Name string `json:"name"`
}
type SignCreateAgentTokenResponse ¶
type SignCreateAgentTokenResponse AgentTokenBody
type SignCreateUserRequest ¶
type SignCreateUserResponse ¶
type SignCreateUserResponse UserBody
type SignDeleteAgentTokenRequest ¶
type SignDeleteAgentTokenRequest struct {
Name string
}
type SignDeleteAgentTokenResponse ¶
type SignDeleteAgentTokenResponse struct{}
func (SignDeleteAgentTokenResponse) StatusCode ¶
func (res SignDeleteAgentTokenResponse) StatusCode() int
type SignDeleteUserRequest ¶
type SignDeleteUserRequest struct {
ID string `json:"-"`
}
type SignDeleteUserResponse ¶
type SignDeleteUserResponse struct{}
type SignGetUserRequest ¶
type SignGetUserRequest struct {
ID string `json:"-"`
}
type SignGetUserResponse ¶
type SignGetUserResponse UserBody
type SignLoginRequest ¶
type SignLoginResponse ¶
type SignLoginResponse UserBody
type SignLogoutRequest ¶
type SignLogoutRequest struct {
ID string `json:"-"`
}
type SignLogoutResponse ¶
type SignLogoutResponse struct{}
func (SignLogoutResponse) StatusCode ¶
func (res SignLogoutResponse) StatusCode() int
type SignValidateTokenRequest ¶
type SignValidateTokenRequest struct{}
type SignValidateTokenResponse ¶
type SignValidateTokenResponse UserBody
func (SignValidateTokenResponse) StatusCode ¶
func (res SignValidateTokenResponse) StatusCode() int
type UserBody ¶
type UserBody struct { ID string `json:"id"` Username string `json:"username"` Email string `json:"email"` AccessTokens []AccessTokenBody `json:"access_tokens"` AgentTokens []AgentTokenBody `json:"agent_tokens"` }
func EncodeUser2UserBody ¶
Click to show internal directories.
Click to hide internal directories.