endpoint

package
v0.0.0-...-bb74961 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 ...

View Source
var Status = []int64{-1, 0, 10}

Functions

func MakeCheckHealthy

func MakeCheckHealthy(ctx context.Context) endpoint.Endpoint

func MakeCheckReadiness

func MakeCheckReadiness(ctx context.Context, fs usecase.UsecaseI) endpoint.Endpoint

func MakeCreateNewVideo

func MakeCreateNewVideo(ctx context.Context, fs usecase.UsecaseI) endpoint.Endpoint

MakeCreateNewVideo ...

func MakeDeleteVideo

func MakeDeleteVideo(ctx context.Context, fs usecase.UsecaseI) endpoint.Endpoint

func MakeGetDetailVideo

func MakeGetDetailVideo(ctx context.Context, fs usecase.UsecaseI) endpoint.Endpoint

MakeGetDetailVideo ...

func MakeGetListVideo

func MakeGetListVideo(ctx context.Context, fs usecase.UsecaseI) endpoint.Endpoint

MakeGetListVideo ...

func MakeGetVideoStatistic

func MakeGetVideoStatistic(ctx context.Context, fs usecase.UsecaseI) endpoint.Endpoint

MakeGetVideoStatistic ...

func MakeUpdateVideo

func MakeUpdateVideo(ctx context.Context, fs usecase.UsecaseI) endpoint.Endpoint

func ValidateInputs

func ValidateInputs(in interface{}) error

Types

type CreateVideoRequest

type CreateVideoRequest struct {
	Title              string `json:"title"`
	Source             string `json:"source"`
	CategoryID         int64  `json:"category_id"`
	RegencyID          *int64 `json:"kabkota_id"`
	VideoURL           string `json:"video_url"`
	Status             int64  `json:"status"`
	Sequence           int64  `json:"seq"`
	IsPushNotification bool   `json:"is_push_notification"`
}

type GetVideoRequest

type GetVideoRequest struct {
	Search     *string `json:"search"`
	RegencyID  *int64  `json:"regency_id"`
	Page       *int64  `json:"page"`
	Limit      *int64  `json:"limit"`
	Title      *string `json:"title"`
	CategoryID *int64  `json:"category_id"`
	SortBy     string  `json:"sort_by"`
	SortOrder  string  `json:"sort_order"`
	Status     int64   `json:"status"`
}

type Location

type Location struct {
	ID      int64  `json:"id"`
	CodeBPS string `json:"code_bps"`
	Name    string `json:"name"`
}

Location ...

type RequestID

type RequestID struct {
	ID int64 `httpquery:"id" json:"id"`
}

type StatusResponse

type StatusResponse struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

StatusResponse ...

type UpdateVideoRequest

type UpdateVideoRequest struct {
	ID                 *int64  `json:"id"`
	Title              *string `json:"title"`
	Source             *string `json:"source"`
	CategoryID         *int64  `json:"category_id"`
	RegencyID          *int64  `json:"kabkota_id"`
	VideoURL           *string `json:"video_url"`
	Status             *int64  `json:"status"`
	Sequence           *int64  `json:"seq"`
	IsPushNotification *bool   `json:"is_push_notification"`
}

type Video

type Video struct {
	ID                 int64           `json:"id"`
	Title              string          `json:"title"`
	CategoryID         *int64          `json:"category_id"`
	Category           *model.Category `json:"category"`
	Source             string          `json:"source"`
	VideoURL           string          `json:"video_url"`
	RegencyID          *int64          `json:"kabkota_id"`
	Regency            *Location       `json:"kabkota"`
	TotalLike          int64           `json:"total_likes"`
	IsPushNotification bool            `json:"is_push_notification"`
	Sequence           int64           `json:"seq"`
	Status             int64           `json:"status"`
	StatusLabel        string          `json:"status_label"`
	CreatedAt          int64           `json:"created_at"`
	UpdatedAt          int64           `json:"updated_at"`
	CreatedBy          int64           `json:"created_by"`
}

Video ...

type VideoDetail

type VideoDetail struct {
	ID                 int64           `json:"id"`
	Title              string          `json:"title"`
	CategoryID         int64           `json:"category_id"`
	Category           *model.Category `json:"category"`
	Source             string          `json:"source"`
	VideoURL           string          `json:"video_url"`
	TotalLikes         int64           `json:"total_likes"`
	IsPushNotification bool            `json:"is_push_notification"`
	RegencyID          *int64          `json:"kabkota_id"`
	Regency            *model.Location `json:"kabkota"`
	Sequence           int64           `json:"seq"`
	Status             int64           `json:"status"`
	StatusLabel        string          `json:"status_label"`
	CreatedAt          *int64          `json:"created_at"`
	UpdatedAt          *int64          `json:"updated_at"`
	CreatedBy          *int64          `json:"created_by"`
	UpdatedBy          *int64          `json:"updated_by"`
}

VideoDetail ...

type VideoResponse

type VideoResponse struct {
	Data     []*Video        `json:"items"`
	Metadata *model.Metadata `json:"_meta"`
}

VideoResponse ...

type VideoStatisticResponse

type VideoStatisticResponse struct {
	Data     []*model.VideoStatisticUC `json:"items"`
	Metadata *model.Metadata           `json:"_meta"`
}

VideoStatisticResponse ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL