Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimeSpans ¶
func GetTimeSpans(s Service) gin.HandlerFunc
GetTimeSpans @Param body body TimespansRequest true "body" @Success 200 {array} ItemResponse
func ValidateTimespansRequest ¶
func ValidateTimespansRequest(sl validator.StructLevel)
Types ¶
type ItemResponse ¶
type Service ¶
type Service interface {
GetTimespans(ctx context.Context, request TimespansRequest) ([]ItemResponse, error)
}
type TimespansRequest ¶
type TimespansRequest struct { StartAt datetime.CpsTime `json:"start_at" binding:"required" swaggertype:"integer"` EndAt datetime.CpsTime `json:"end_at" swaggertype:"integer"` RRule string `json:"rrule"` Type string `json:"type" binding:"required"` Exdates []pbehaviorexception.ExdateRequest `json:"exdates" binding:"dive"` Exceptions []string `json:"exceptions"` ViewFrom datetime.CpsTime `json:"view_from" binding:"required" swaggertype:"integer"` ViewTo datetime.CpsTime `json:"view_to" binding:"required" swaggertype:"integer"` }
Click to show internal directories.
Click to hide internal directories.