Documentation ¶
Index ¶
- type AuthRequest
- type AuthResponse
- type CreateUserRequest
- type CreateUserResponse
- type DeleteUserRequest
- type DeleteUserResponse
- type ErrorResponse
- type GetAlgorithmResponse
- type GetKeyResponse
- type HealthCheckResponse
- type ListupUserResponse
- type LookupUserRequest
- type LookupUserResponse
- type UpdateUserRequest
- type UpdateUserResponse
- type User
- type UserList
- type VerifyResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRequest ¶
AuthRequest represents a request for authenticate user
type AuthResponse ¶
AuthResponse is a response type returned from AuthHandler
type CreateUserRequest ¶
type CreateUserRequest struct { ID string `json:"id"` Username string `json:"username"` Password string `json:"password"` }
CreateUserRequest represents a request for create user
type CreateUserResponse ¶
type CreateUserResponse struct {
Message string `json:"message"`
}
CreateUserResponse is a response type returned from CreateUserHandler
type DeleteUserRequest ¶
DeleteUserRequest represents a request for delete user
type DeleteUserResponse ¶
type DeleteUserResponse struct {
Message string `json:"message"`
}
DeleteUserResponse is a response type returned from DeleteUserHandler
type ErrorResponse ¶
ErrorResponse is a response type returned when HTTP error is raised
type GetAlgorithmResponse ¶
type GetAlgorithmResponse struct {
Algorithm string `json:"algorithm"`
}
GetAlgorithmResponse is a response type returned from GetAlgorithmHandler
type GetKeyResponse ¶
type GetKeyResponse struct {
PublicKey string `json:"publickey"`
}
GetKeyResponse is a response type returned from GetKeyHandler
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Message string `json:"message"`
}
HealthCheckResponse is a response type returned from HealthCheckHandler
type ListupUserResponse ¶
type ListupUserResponse struct {
Users UserList `json:"user"`
}
ListupUserResponse is a response type returned from ListupUserHandler
type LookupUserRequest ¶
type LookupUserRequest struct {
ID string `json:"id"`
}
LookupUserRequest represents a request for read user
type LookupUserResponse ¶
type LookupUserResponse struct {
User User `json:"user"`
}
LookupUserResponse is a response type returned from LookupUserHandler
type UpdateUserRequest ¶
type UpdateUserRequest struct { ID string `json:"id"` Username string `json:"username"` OldPassword string `json:"old_password"` NewPassword string `json:"new_password"` }
UpdateUserRequest represents a request for update upser
type UpdateUserResponse ¶
type UpdateUserResponse struct {
Message string `json:"message"`
}
UpdateUserResponse is a resposne type returned from UpdateUserHandler
type User ¶
type User struct { ID string `json:"id"` Name string `json:"username"` Password string `json:"password,omitempty"` IsAdmin bool `json:"is_admin"` }
User represents an user
type VerifyResponse ¶
type VerifyResponse struct {
Status bool `json:"status"`
}
VerifyResponse is a response type returned from VerifyHandler