Documentation ¶
Index ¶
- Variables
- type Actor
- type ActorFromContext
- type AddOrRemoveLikeOnPostRequest
- type Comment
- type CommentResponse
- type CommentWithMetadata
- type CreateCommentRequest
- type CreateCommentRequestRepository
- type CreateNewPostRequest
- type CreateNewPostRequestRepository
- type GetComment
- type GetCommentRequest
- type GetListRequest
- type LikeResponse
- type Metadata
- type PostResponse
- type UpdatePostRequest
- type UserPostByMeRequest
- type UserPostRequest
- type UserPostResponse
- type UserPostWithMetadata
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var RoleLabel = map[int64]string{
10: "user",
49: "trainer",
50: "staffRW",
60: "staffKel",
70: "staffKec",
80: "staffKabKota",
88: "staffOPD",
89: "staffSaberhoax",
90: "staffProv",
91: "pimpinan",
99: "admin",
100: "service_account",
}
View Source
var StatusLabel = map[int64]map[string]string{
-1: {"en": "Status Deleted", "id": "Dihapus"},
0: {"en": "Inactived", "id": "Tidak Aktif"},
10: {"en": "Actived", "id": "Aktif"},
}
Functions ¶
This section is empty.
Types ¶
type ActorFromContext ¶
type ActorFromContext struct {
Data map[string]interface{}
}
func (*ActorFromContext) Get ¶
func (ac *ActorFromContext) Get(key string) interface{}
type CommentResponse ¶
type CommentResponse struct { ID int64 `db:"id"` UserPostID sql.NullInt64 `db:"user_post_id"` Comment string `db:"text"` Status int64 `db:"status"` CreatedAt int64 `db:"created_at"` UpdatedAt int64 `db:"updated_at"` CreatedBy sql.NullInt64 `db:"created_by"` UpdatedBy sql.NullInt64 `db:"updated_by"` }
type CommentWithMetadata ¶
type CreateCommentRequest ¶
type CreateNewPostRequest ¶
type CreateNewPostRequest struct { Title string `json:"title"` ImagePathURL string `json:"image_path_url"` Images string `json:"images"` Tags *string `json:"tags,omitempty"` Status int64 `json:"status"` }
CreateNewPostRequest ...
type GetComment ¶
type GetCommentRequest ¶
GetCommentRequest ...
type GetListRequest ¶
type GetListRequest struct { ActivityName *string Username *string Category *string Status *int64 Page *int64 Limit *int64 SortBy string OrderBy string Search *string DistrictID *int64 }
GetListRequest ...
type LikeResponse ¶
type PostResponse ¶
type PostResponse struct { ID int64 `db:"id"` Title string `db:"text"` Tag sql.NullString `db:"tags"` ImagePath sql.NullString `db:"image_path"` Images sql.NullString `db:"images"` LastUserPostCommentID sql.NullInt64 `db:"last_user_post_comment_id"` LikesCount int64 `db:"likes_count"` CommentCounts int64 `db:"comments_count"` Status int64 `db:"status"` CreatedBy sql.NullInt64 `db:"created_by"` UpdatedBy sql.NullInt64 `db:"updated_by"` CreatedAt int64 `db:"created_at"` UpdatedAt int64 `db:"updated_at"` }
type UpdatePostRequest ¶
type UserPostByMeRequest ¶
type UserPostByMeRequest struct { ActorID int64 *UserPostRequest }
type UserPostRequest ¶
type UserPostResponse ¶
type UserPostResponse struct { ID int64 `json:"id"` Title string `json:"text"` Tag string `json:"tags"` ImagePath string `json:"image_path_full"` Images []map[string]interface{} `json:"images"` LastUserPostCommentID *int64 `json:"last_user_post_comment_id"` LastComment *Comment `json:"last_comment"` LikesCount int64 `json:"likes_count"` IsLiked bool `json:"is_liked"` CommentCounts int64 `json:"comments_count"` Status int64 `json:"status"` StatusLabel string `json:"status_label"` CreatedBy int64 `json:"created_by"` Actor *Actor `json:"user"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` }
type UserPostWithMetadata ¶
type UserPostWithMetadata struct { Data []*UserPostResponse `json:"data"` Metadata *Metadata `json:"metadata"` }
type UserResponse ¶
type UserResponse struct { ID int64 `db:"id"` Name sql.NullString `db:"name"` PhotoURL sql.NullString `db:"photo_url"` Role sql.NullInt64 `db:"role"` Regency sql.NullString `db:"regency_name"` District sql.NullString `db:"district_name"` Village sql.NullString `db:"village_name"` RW sql.NullString `db:"rw"` Status int64 `db:"status"` }
Click to show internal directories.
Click to hide internal directories.