Documentation ¶
Index ¶
- Variables
- func MakeAddPhonebook(ctx context.Context, usecase usecase.Provider) endpoint.Endpoint
- func MakeCheckHealthy(ctx context.Context) endpoint.Endpoint
- func MakeCheckReadiness(ctx context.Context, usecase usecase.Provider) endpoint.Endpoint
- func MakeDeletePhonebook(ctx context.Context, usecase usecase.Provider) endpoint.Endpoint
- func MakeGetDetail(ctx context.Context, usecase usecase.Provider) endpoint.Endpoint
- func MakeGetList(ctx context.Context, usecase usecase.Provider) endpoint.Endpoint
- func MakeIsExistPhoneNumber(ctx context.Context, usecase usecase.Provider) endpoint.Endpoint
- func MakeUpdatePhonebook(ctx context.Context, usecase usecase.Provider) endpoint.Endpoint
- type AddPhonebookRequest
- type GetDetailRequest
- type GetListRequest
- type IsExistPhoneNumber
- type Metadata
- type PhoneBookWithMeta
- type PhoneNumber
- type Phonebook
- type PhonebookDetail
- type PhonebookWithMeta
- type StatusResponse
- type UpdatePhonebookRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var GetStatusLabel = map[int64]map[string]string{
-1: {"en": "status deleted", "id": "Dihapus"},
0: {"en": "Not Active", "id": "Tidak Aktif"},
10: {"en": "Active", "id": "Aktif"},
}
GetStatusLabel ...
Functions ¶
func MakeAddPhonebook ¶
MakeAddPhonebook ...
func MakeCheckReadiness ¶
func MakeDeletePhonebook ¶
MakeDeletePhonebook ...
func MakeGetDetail ¶
MakeGetDetail ...
func MakeGetList ¶
MakeGetList ...
func MakeIsExistPhoneNumber ¶
MakeIsExistPhoneNumber ...
Types ¶
type AddPhonebookRequest ¶
type AddPhonebookRequest struct { Name string `json:"name"` Description *string `json:"description"` PhoneNumbers []*PhoneNumber `json:"phone_numbers"` RegencyID *int64 `json:"kabkota_id"` DistrictID *int64 `json:"kec_id"` VillageID *int64 `json:"kel_id"` Status *int64 `json:"status"` Latitude *string `json:"latitude"` Longitude *string `json:"longitude"` CategoryID *int64 `json:"category_id"` CoverImagePath *string `json:"cover_image_path"` Address *string `json:"address"` Sequence *int64 `json:"seq"` }
AddPhonebookRequest ...
type GetDetailRequest ¶
type GetDetailRequest struct {
ID int64 `httpparams:"id"`
}
GetDetailRequest ...
type GetListRequest ¶
type GetListRequest struct { Search string `httpquery:"search"` Name string `httpquery:"name"` PhoneNumber string `httpquery:"phone"` RegencyID int64 `httpquery:"kabkota_id"` DistrictID int64 `httpquery:"kec_id"` VillageID int64 `httpquery:"kel_id"` Status *int64 `httpquery:"status"` Latitude string `httpquery:"latitude"` Longitude string `httpquery:"longitude"` Limit int64 `httpquery:"limit"` Page int64 `httpquery:"page"` SortBy string `httpquery:"sort_by"` OrderBy string `httpquery:"sort_order"` }
GetListRequest ...
type IsExistPhoneNumber ¶
type IsExistPhoneNumber struct {
PhoneNumber string `httpquery:"phone_number"`
}
IsExistPhoneNumber ...
type Metadata ¶
type Metadata struct { TotalCount int64 `json:"totalCount"` PageCount float64 `json:"pageCount"` CurrentPage int64 `json:"currentPage"` PerPage int64 `json:"perPage"` }
Metadata ...
type PhoneBookWithMeta ¶
type PhoneBookWithMeta struct {
Data *PhonebookWithMeta `json:"data"`
}
PhoneBookWithMeta ...
type PhoneNumber ¶
PhoneNumber ...
type Phonebook ¶
type Phonebook struct { ID interface{} `json:"id"` PhoneNumbers []*PhoneNumber `json:"phone_numbers"` Description *string `json:"description"` Name *string `json:"name"` Address *string `json:"address"` Latitude *string `json:"latitude"` Longitude *string `json:"longitude"` Status int64 `json:"status"` StatusLabel string `json:"status_label"` CoverImageURL *string `json:"cover_image_url"` CategoryID *int64 `json:"category_id"` Category interface{} `json:"category"` Sequence int64 `json:"seq"` Distance interface{} `json:"distance,omitempty"` RegencyID *int64 `json:"kabkota_id"` Regency *model.Location `json:"kabkota"` DistrictID *int64 `json:"kec_id"` District *model.Location `json:"kecamatan"` VillageID *int64 `json:"kel_id"` Village *model.Location `json:"kelurahan"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` }
Phonebook ...
func EncodePhonebook ¶
EncodePhonebook ...
type PhonebookDetail ¶
type PhonebookDetail struct { ID interface{} `json:"id"` Name string `json:"name"` CategoryID int64 `json:"category_id"` Category interface{} `json:"category"` Address string `json:"address"` Description string `json:"description"` PhoneNumbers []*PhoneNumber `json:"phone_numbers"` RegencyID *int64 `json:"kabkota_id"` Regency *model.Location `json:"kabkota"` DistrictID *int64 `json:"kec_id"` District *model.Location `json:"kecamatan"` VillageID *int64 `json:"kel_id"` Village *model.Location `json:"kelurahan"` Latitude string `json:"latitude"` Longitude string `json:"longitude"` Sequence int64 `json:"seq"` CoverImagePath *string `json:"cover_image_url"` Status int64 `json:"status"` StatusLabel string `json:"status_label"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` }
PhonebookDetail ...
type PhonebookWithMeta ¶
type PhonebookWithMeta struct { Phonebooks []*Phonebook `json:"items"` Meta *Metadata `json:"_meta"` }
PhonebookWithMeta ...
type StatusResponse ¶
StatusResponse ...
type UpdatePhonebookRequest ¶
type UpdatePhonebookRequest struct { ID int64 `json:"id"` Name string `json:"name"` Description *string `json:"description"` PhoneNumbers []*PhoneNumber `json:"phone_numbers"` RegencyID *int64 `json:"kabkota_id"` DistrictID *int64 `json:"kec_id"` VillageID *int64 `json:"kel_id"` Status *int64 `json:"status"` Latitude *string `json:"latitude"` Longitude *string `json:"longitude"` CategoryID *int64 `json:"category_id"` CoverImagePath *string `json:"cover_image_path"` Address *string `json:"address"` Sequence *int64 `json:"seq,omitempty"` }
UpdatePhonebookRequest ...
Click to show internal directories.
Click to hide internal directories.