Documentation ¶
Overview ¶
Package types provides objects used multiple times in the project
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct { Username string `json:"username"` // author's username AuthorId string `json:"id"` // author's ID CreatedAt time.Time `json:"created_at"` // author's creation date }
Object containing author's properties
type AuthorPosts ¶
type AuthorPosts struct { AuthorInfo Author `json:"author"` // author List []Post `json:"posts"` // author's posts }
Object containing author's properties including all his/her posts
type CustomClaims ¶
type CustomClaims struct { Id string `json:"id"` // author's ID jwt.StandardClaims // standard JWT claims (issuer, expiry, etc.) }
Custom claims for the JSON web token
type DefaultResponse ¶
type DefaultResponse struct { Status string `json:"status"` // status field Message string `json:"message"` // message field }
Default JSON response object
type Post ¶
type Post struct { Id string `json:"id"` // post's ID Title string `json:"title"` // post's title Body string `json:"body"` // post's body CreatedAt time.Time `json:"created_at"` // post's creation date UpdatedAt time.Time `json:"updated_at"` // post's modification date AuthorInfo Author `json:"author"` // post's author }
Object containing post's properties
type ValidResponse ¶
type ValidResponse struct { Status string `json:"status"` // status field Content interface{} `json:"content"` // content field }
Not default JSON response object
Click to show internal directories.
Click to hide internal directories.