Documentation ¶
Index ¶
- type Account
- type AccountCreateRequest
- type AccountDeleteRequest
- type AccountGetRequest
- type AccountListRequest
- type AccountPasswordUpdateRequest
- type AccountResponse
- type AccountUpdateRequest
- type AuthRequest
- type AuthResponse
- type ErrorResponse
- type Post
- type PostCreateRequest
- type PostDeleteRequest
- type PostGetRequest
- type PostListRequest
- type PostResponse
- type PostUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID int64 Name string Email string Password string CreatedAt time.Time UpdatedAt sql.NullTime }
func (*Account) GenerateClaims ¶
type AccountCreateRequest ¶
type AccountDeleteRequest ¶
type AccountDeleteRequest struct {
ID int64
}
type AccountGetRequest ¶
type AccountGetRequest struct {
ID int64
}
type AccountListRequest ¶
type AccountResponse ¶
type AccountResponse struct { ID int64 `json:"id"` Name string `json:"name"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` }
func NewAccountListResponse ¶
func NewAccountListResponse(payloads []*Account) []*AccountResponse
func NewAccountResponse ¶
func NewAccountResponse(payload *Account) *AccountResponse
type AccountUpdateRequest ¶
type AuthRequest ¶
type AuthResponse ¶
type AuthResponse struct {
Token string `json:"token"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
type PostCreateRequest ¶
type PostDeleteRequest ¶
type PostDeleteRequest struct {
ID int64
}
type PostGetRequest ¶
type PostGetRequest struct {
ID int64
}
type PostListRequest ¶
type PostResponse ¶
type PostResponse struct { ID int64 `json:"id"` Title string `json:"title"` Body string `json:"body"` CreatedAt time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` AccountID int64 `json:"account_id"` Account *AccountResponse `json:"account"` }
func NewPostListResponse ¶
func NewPostListResponse(payloads []*Post) []*PostResponse
func NewPostResponse ¶
func NewPostResponse(payload *Post) *PostResponse
type PostUpdateRequest ¶
Click to show internal directories.
Click to hide internal directories.