Documentation ¶
Index ¶
- type FeatureCreateRequest
- type FeatureDetailRequest
- func (r *FeatureDetailRequest) ToDeleteCommand() command.FeatureDeleteCommand
- func (r *FeatureDetailRequest) ToDisableCommand() command.FeatureDisableCommand
- func (r *FeatureDetailRequest) ToEnableCommand() command.FeatureEnableCommand
- func (r *FeatureDetailRequest) ToQuery() query.AdminFeatureDetailQuery
- type FeatureTranslationRequest
- type FeatureUpdateRequest
- type PaginationRequest
- type PlaceCreateRequest
- type PlaceDetailRequest
- type PlaceFilterRequest
- type PlaceFilterTimeSpentRequest
- type PlaceImageRequest
- type PlaceRestorationRequest
- type PlaceTimeSpentRequest
- type PlaceTranslationRequest
- type PlaceTranslationSeoRequest
- type PlaceUpdateRequest
- type PlaceViewRequest
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureCreateRequest ¶
type FeatureCreateRequest struct { Icon string `json:"icon" validate:"required,min=1,max=255"` Translations []FeatureTranslationRequest `json:"translations" validate:"min=1,max=3,dive,required"` }
func (*FeatureCreateRequest) ToCommand ¶
func (r *FeatureCreateRequest) ToCommand() command.FeatureCreateCommand
type FeatureDetailRequest ¶
type FeatureDetailRequest struct {
UUID string `param:"uuid" validate:"required,object_id"`
}
func (*FeatureDetailRequest) ToDeleteCommand ¶
func (r *FeatureDetailRequest) ToDeleteCommand() command.FeatureDeleteCommand
func (*FeatureDetailRequest) ToDisableCommand ¶
func (r *FeatureDetailRequest) ToDisableCommand() command.FeatureDisableCommand
func (*FeatureDetailRequest) ToEnableCommand ¶
func (r *FeatureDetailRequest) ToEnableCommand() command.FeatureEnableCommand
func (*FeatureDetailRequest) ToQuery ¶
func (r *FeatureDetailRequest) ToQuery() query.AdminFeatureDetailQuery
type FeatureUpdateRequest ¶
type FeatureUpdateRequest struct { UUID string Icon string `json:"icon" validate:"required,min=1,max=255"` Translations []FeatureTranslationRequest `json:"translations" validate:"min=1,max=3,dive,required"` }
func (*FeatureUpdateRequest) Load ¶
func (r *FeatureUpdateRequest) Load(req *FeatureDetailRequest) *FeatureUpdateRequest
func (*FeatureUpdateRequest) ToCommand ¶
func (r *FeatureUpdateRequest) ToCommand() command.FeatureUpdateCommand
type PaginationRequest ¶
type PaginationRequest struct { Page *int64 `query:"page" validate:"omitempty,gt=0"` Limit *int64 `query:"limit" validate:"omitempty,gt=0"` }
func (*PaginationRequest) Default ¶
func (r *PaginationRequest) Default()
type PlaceCreateRequest ¶
type PlaceCreateRequest struct { FeatureUUIDs []string `json:"featureUUIDs" validate:"required,min=1,max=10,dive,object_id"` Images []PlaceImageRequest `json:"images" validate:"required,min=1,max=10,dive,required"` Coordinates []float64 `json:"coordinates" validate:"required,min=2,max=2,dive,required"` TimeSpent PlaceTimeSpentRequest `json:"timeSpent" validate:"required,dive,required"` Translations []PlaceTranslationRequest `json:"translations" validate:"required,min=1,max=3,dive,required"` Restorations []PlaceRestorationRequest `json:"restorations" validate:"omitempty,min=0,max=100,dive,required"` IsPayed *bool `json:"isPayed" validate:"required"` Type string `` /* 174-byte string literal not displayed */ }
func (*PlaceCreateRequest) ToCommand ¶
func (r *PlaceCreateRequest) ToCommand() command.PlaceCreateCommand
type PlaceDetailRequest ¶
type PlaceDetailRequest struct {
UUID string `param:"uuid" validate:"required,object_id"`
}
func (*PlaceDetailRequest) ToDeleteCommand ¶
func (r *PlaceDetailRequest) ToDeleteCommand() command.PlaceDeleteCommand
func (*PlaceDetailRequest) ToDisableCommand ¶
func (r *PlaceDetailRequest) ToDisableCommand() command.PlaceDisableCommand
func (*PlaceDetailRequest) ToEnableCommand ¶
func (r *PlaceDetailRequest) ToEnableCommand() command.PlaceEnableCommand
func (*PlaceDetailRequest) ToQuery ¶
func (r *PlaceDetailRequest) ToQuery() query.AdminPlaceViewQuery
type PlaceFilterRequest ¶
type PlaceFilterRequest struct { Page int64 Limit int64 Query string `json:"query,omitempty" validate:"omitempty,max=100"` Coordinates []float64 `json:"coordinates,omitempty" validate:"omitempty,min=2,max=2"` FeatureUUIDs []string `json:"featureUUIDs,omitempty" validate:"omitempty,min=1,max=10,dive,object_id"` TimeSpent *PlaceFilterTimeSpentRequest `json:"timeSpent,omitempty" validate:"omitempty,dive"` Distance *float64 `json:"distance,omitempty" validate:"omitempty,gt=6,lt=19"` IsPayed *bool `json:"isPayed,omitempty" validate:"omitempty"` MinReview *int16 `json:"minReview,omitempty" validate:"omitempty,gt=0"` MaxReview *int16 `json:"maxReview,omitempty" validate:"omitempty,gt=0"` MinAveragePoint *float32 `json:"minAveragePoint,omitempty" validate:"omitempty,gt=0"` MaxAveragePoint *float32 `json:"maxAveragePoint,omitempty" validate:"omitempty,gt=0"` Type []place.Type `json:"types,omitempty" validate:"omitempty,dive,required"` Sort place.Sort `json:"sort,omitempty" validate:"omitempty,oneof=most_recent nearest"` Order place.Order `json:"order,omitempty" validate:"omitempty,oneof=asc desc"` }
func (*PlaceFilterRequest) LoadPagination ¶
func (r *PlaceFilterRequest) LoadPagination(pagination *PaginationRequest) *PlaceFilterRequest
func (*PlaceFilterRequest) ToAdminQuery ¶
func (r *PlaceFilterRequest) ToAdminQuery(locale string) query.PlaceAdminFilterQuery
func (*PlaceFilterRequest) ToQuery ¶
func (r *PlaceFilterRequest) ToQuery(locale string) query.PlaceFilterQuery
type PlaceImageRequest ¶
type PlaceRestorationRequest ¶
type PlaceTimeSpentRequest ¶
type PlaceTimeSpentRequest struct { Min int16 `json:"min" validate:"required,min=0,max=2000"` Max int16 `json:"max" validate:"required,min=0,max=2000"` }
func (*PlaceTimeSpentRequest) ToTimeSpent ¶
func (r *PlaceTimeSpentRequest) ToTimeSpent() place.TimeSpent
type PlaceTranslationRequest ¶
type PlaceTranslationRequest struct { Title string `json:"title" validate:"required,min=1,max=255"` Description string `json:"description" validate:"required,min=1,max=255"` Locale string `json:"locale" validate:"required,min=1,max=255"` Seo PlaceTranslationSeoRequest `json:"seo" validate:"required,dive,required"` }
type PlaceTranslationSeoRequest ¶
type PlaceTranslationSeoRequest struct { Title string `json:"title" validate:"required,min=1,max=255"` Description string `json:"description" validate:"required,min=1,max=255"` Keywords string `json:"keywords" validate:"required,min=1,max=255"` }
func (*PlaceTranslationSeoRequest) ToSeo ¶
func (r *PlaceTranslationSeoRequest) ToSeo() place.Seo
type PlaceUpdateRequest ¶
type PlaceUpdateRequest struct { UUID string FeatureUUIDs []string `json:"featureUUIDs" validate:"required,min=1,max=10,dive,object_id"` Images []PlaceImageRequest `json:"images" validate:"required,min=1,max=10,dive,required"` Coordinates []float64 `json:"coordinates" validate:"required,min=2,max=2,dive,required"` TimeSpent PlaceTimeSpentRequest `json:"timeSpent" validate:"required,dive,required"` Translations []PlaceTranslationRequest `json:"translations" validate:"required,min=1,max=3,dive,required"` Restorations []PlaceRestorationRequest `json:"restorations" validate:"omitempty,min=0,max=100,dive,required"` IsPayed *bool `json:"isPayed" validate:"required"` Type string `` /* 174-byte string literal not displayed */ }
func (*PlaceUpdateRequest) Load ¶
func (r *PlaceUpdateRequest) Load(req *PlaceDetailRequest) *PlaceUpdateRequest
func (*PlaceUpdateRequest) ToCommand ¶
func (r *PlaceUpdateRequest) ToCommand() command.PlaceUpdateCommand
type PlaceViewRequest ¶
type PlaceViewRequest struct {
Slug string `param:"slug" validate:"required,slug"`
}
func (*PlaceViewRequest) ToQuery ¶
func (r *PlaceViewRequest) ToQuery(locale string) query.PlaceViewQuery
type Request ¶
type Request interface { FeatureDetail() *FeatureDetailRequest Pagination() *PaginationRequest FeatureCreate() *FeatureCreateRequest FeatureUpdate() *FeatureUpdateRequest PlaceDetail() *PlaceDetailRequest PlaceFilter() *PlaceFilterRequest PlaceCreate() *PlaceCreateRequest PlaceUpdate() *PlaceUpdateRequest PlaceView() *PlaceViewRequest }
Click to show internal directories.
Click to hide internal directories.