Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UppercaseString ¶
type UppercaseString string
func (*UppercaseString) Scan ¶
func (us *UppercaseString) Scan(src interface{}) error
type User ¶
type User struct { ID int `json:"id" example:"1"` Email string `json:"email" example:"example@example.com"` Name UppercaseString `json:"name" example:"muchlis"` Password string `json:"-"` Roles []string `json:"roles" example:"ADMIN,NORMAL"` CreatedAt int64 `json:"created_at" example:"1631341964"` UpdatedAt int64 `json:"updated_at" example:"1631341964"` }
type UserEditRequest ¶
type UserEditRequest struct { Email string `json:"email" example:"example@example.com"` Name string `json:"name" example:"muchlis"` Roles []string `json:"roles" example:"ADMIN,NORMAL"` }
func (UserEditRequest) Validate ¶
func (u UserEditRequest) Validate() error
type UserLoginRequest ¶
UserLoginResponse balikan user ketika sukses login dengan tambahan AccessToken
type UserLoginResponse ¶
type UserLoginResponse struct { ID int `json:"id" example:"1"` Email string `json:"email" example:"example@example.com"` Name string `json:"name" example:"muchlis"` Roles []string `json:"roles" example:"ADMIN,NORMAL,BASIC"` AccessToken string `json:"access_token" example:"eyJhbGciOiJIUzI1N.ywibmFtZSI6IkR5cGUiOjB9.aFjz4esDQ4-_K3dMUmo"` RefreshToken string `json:"refresh_token" example:"eyJhbGciOiJIUzI1N.ywibmFtZSI6IkR5cGUiOjB9.aFjz4esDQ4-_K3dMUmo"` Expired int64 `json:"expired" example:"1631341964"` }
UserLoginResponse balikan user ketika sukses login dengan tambahan AccessToken
type UserRefreshTokenRequest ¶
type UserRefreshTokenRequest struct {
RefreshToken string `json:"refresh_token" example:"eyJhbGciOiJIUzI1N.ywibmFtZSI6IkR5cGUiOjB9.aFjz4esDQ4-_K3dMUmo"`
}
type UserRefreshTokenResponse ¶
type UserRefreshTokenResponse struct { AccessToken string `json:"access_token" example:"eyJhbGciOiJIUzI1N.ywibmFtZSI6IkR5cGUiOjB9.aFjz4esDQ4-_K3dMUmo"` Expired int64 `json:"expired" example:"1631341964"` }
UserRefreshTokenResponse mengembalikan token dengan claims yang sama dengan token sebelumnya dengan expired yang baru
type UserRegisterReq ¶
type UserRegisterReq struct { ID int `json:"id" example:"1"` Email string `json:"email" example:"example@example.com"` Name string `json:"name" example:"muchlis"` Password string `json:"password" example:"password123"` Roles []string `json:"roles" example:"ADMIN,NORMAL,BASIC"` }
func (UserRegisterReq) Validate ¶
func (u UserRegisterReq) Validate() error
Click to show internal directories.
Click to hide internal directories.