Documentation ¶
Index ¶
- Variables
- func DateFormat(date *time.Time) string
- type BestAvailableParams
- type BestAvailableResult
- type BestAvailableStatusChangeParams
- type Category
- type CategoryKey
- type ChangeObjectStatusInBatchResult
- type ChangeObjectStatusResult
- type Channel
- type Channels
- func (channels *Channels) AddObjects(eventKey string, channelKey string, objects []string) error
- func (channels *Channels) Create(eventKey string, params ...*CreateChannelParams) error
- func (channels *Channels) Delete(eventKey string, channelKey string) error
- func (channels *Channels) RemoveObjects(eventKey string, channelKey string, objects []string) error
- func (channels *Channels) Replace(eventKey string, newChannels ...CreateChannelParams) error
- func (channels *Channels) Update(eventKey string, channelKey string, params UpdateChannelParams) error
- type CreateChannelParams
- type CreateChannelParamsOption
- type CreateEventParams
- type CreateEventResult
- type CreateMultipleEventParams
- type CreateMultipleEventsRequest
- type Event
- type EventObjectInfo
- type EventParams
- type Events
- func (events *Events) Book(eventKey string, objectIds ...string) (*ChangeObjectStatusResult, error)
- func (events *Events) BookBestAvailable(eventKey string, params BestAvailableParams) (*BestAvailableResult, error)
- func (events *Events) BookBestAvailableWithHoldToken(eventKey string, params BestAvailableParams, holdToken string) (*BestAvailableResult, error)
- func (events *Events) BookBestAvailableWithOptions(eventKey string, params BestAvailableStatusChangeParams) (*BestAvailableResult, error)
- func (events *Events) BookWithHoldToken(eventKey string, objectIds []string, holdToken *string) (*ChangeObjectStatusResult, error)
- func (events *Events) BookWithObjectProperties(eventKey string, objectProperties ...ObjectProperties) (*ChangeObjectStatusResult, error)
- func (events *Events) BookWithObjectPropertiesAndHoldToken(eventKey string, objectProperties []ObjectProperties, holdToken *string) (*ChangeObjectStatusResult, error)
- func (events *Events) BookWithOptions(statusChangeParams *StatusChangeParams) (*ChangeObjectStatusResult, error)
- func (events *Events) ChangeBestAvailableObjectStatus(eventKey string, ...) (*BestAvailableResult, error)
- func (events *Events) ChangeObjectStatus(eventKeys []string, objects []string, status ObjectStatus) (*ChangeObjectStatusResult, error)
- func (events *Events) ChangeObjectStatusInBatch(statusChangeInBatchParams ...StatusChangeInBatchParams) (*ChangeObjectStatusInBatchResult, error)
- func (events *Events) ChangeObjectStatusWithOptions(statusChangeparams *StatusChangeParams) (*ChangeObjectStatusResult, error)
- func (events *Events) Create(params *CreateEventParams) (*Event, error)
- func (events *Events) CreateMultiple(chartKey string, params ...CreateMultipleEventParams) (*CreateEventResult, error)
- func (events *Events) Delete(eventKey string) error
- func (events *Events) Hold(eventKey string, objectIds []string, holdToken *string) (*ChangeObjectStatusResult, error)
- func (events *Events) HoldBestAvailable(eventKey string, params BestAvailableParams, holdToken string) (*BestAvailableResult, error)
- func (events *Events) HoldWithObjectProperties(eventKey string, objectProperties []ObjectProperties, holdToken *string) (*ChangeObjectStatusResult, error)
- func (events *Events) HoldWithOptions(statusChangeParams *StatusChangeParams) (*ChangeObjectStatusResult, error)
- func (events *Events) ListAll(opts ...shared.PaginationParamsOption) ([]Event, error)
- func (events *Events) ListFirstPage(opts ...shared.PaginationParamsOption) (*shared.Page[Event], error)
- func (events *Events) ListPageAfter(id int64, opts ...shared.PaginationParamsOption) (*shared.Page[Event], error)
- func (events *Events) ListPageBefore(id int64, opts ...shared.PaginationParamsOption) (*shared.Page[Event], error)
- func (events *Events) MarkAsForSale(eventKey string, forSaleConfig *ForSaleConfigParams) error
- func (events *Events) MarkAsNotForSale(eventKey string, forSaleConfig *ForSaleConfigParams) error
- func (events *Events) MarkEverythingAsForSale(eventKey string) error
- func (events *Events) OverrideSeasonObjectStatus(eventKey string, objects ...string) error
- func (events *Events) Release(eventKey string, objectIds ...string) (*ChangeObjectStatusResult, error)
- func (events *Events) ReleaseWithHoldToken(eventKey string, objectIds []string, holdToken *string) (*ChangeObjectStatusResult, error)
- func (events *Events) ReleaseWithOptions(statusChangeParams *StatusChangeParams) (*ChangeObjectStatusResult, error)
- func (events *Events) RemoveCategories(eventKey string) error
- func (events *Events) RemoveObjectCategories(eventKey string) error
- func (events *Events) Retrieve(eventKey string) (*Event, error)
- func (events *Events) RetrieveObjectInfo(eventKey string, objectLabels ...string) (map[string]EventObjectInfo, error)
- func (events *Events) StatusChanges(eventKey string, opts ...ListParamsOption) *shared.Lister[StatusChange]
- func (events *Events) StatusChangesForObject(eventKey string, objectLabel string) *shared.Lister[StatusChange]
- func (events *Events) Update(eventKey string, params *UpdateEventParams) error
- func (events *Events) UpdateExtraData(eventKey string, extraData map[string]ExtraData) error
- func (events *Events) UseSeasonObjectStatus(eventKey string, objects ...string) error
- type ExtraData
- type ForSaleConfig
- type ForSaleConfigParams
- type IDs
- type LabelAndType
- type Labels
- type ListParamsOption
- type Mode
- type ObjectProperties
- type ObjectStatus
- type StatusChange
- type StatusChangeInBatchParams
- type StatusChangeInBatchRequest
- type StatusChangeOrigin
- type StatusChangeParams
- type StatusChanges
- type TableBookingConfig
- type TableBookingMode
- type TableBookingModeSupportNS
- type UpdateChannelParams
- type UpdateEventParams
Constants ¶
This section is empty.
Variables ¶
View Source
var EventSupport eventSupportNS
Functions ¶
func DateFormat ¶
Types ¶
type BestAvailableParams ¶
type BestAvailableParams struct { Number int `json:"number"` Categories []CategoryKey `json:"categories,omitempty"` ExtraData []ExtraData `json:"extraData,omitempty"` TicketTypes []string `json:"ticketTypes,omitempty"` }
type BestAvailableResult ¶
type BestAvailableResult struct { NextToEachOther bool `json:"nextToEachOther"` Objects []string `json:"objects"` ObjectDetails map[string]EventObjectInfo `json:"objectDetails"` }
type BestAvailableStatusChangeParams ¶
type BestAvailableStatusChangeParams struct { Status ObjectStatus `json:"status"` BestAvailable BestAvailableParams `json:"bestAvailable"` HoldToken string `json:"holdToken,omitempty"` OrderId string `json:"orderId,omitempty"` KeepExtraData bool `json:"keepExtraData"` IgnoreChannels bool `json:"ignoreChannels"` ChannelKeys []string `json:"channelKeys,omitempty"` }
type Category ¶
type Category struct { Key CategoryKey `json:"key"` Label string `json:"label"` Color string `json:"color"` Accessible bool `json:"accessible"` }
type CategoryKey ¶
type CategoryKey struct {
Key interface{}
}
func (CategoryKey) KeyAsString ¶
func (categoryKey CategoryKey) KeyAsString() string
func (CategoryKey) MarshalJSON ¶
func (categoryKey CategoryKey) MarshalJSON() ([]byte, error)
func (*CategoryKey) UnmarshalJSON ¶
func (categoryKey *CategoryKey) UnmarshalJSON(data []byte) error
type ChangeObjectStatusInBatchResult ¶
type ChangeObjectStatusInBatchResult struct {
Results []ChangeObjectStatusResult `json:"results"`
}
type ChangeObjectStatusResult ¶
type ChangeObjectStatusResult struct {
Objects map[string]EventObjectInfo `json:"objects"`
}
type Channels ¶
type Channels struct {
Client *req.Client
}
func (*Channels) AddObjects ¶
func (*Channels) Create ¶
func (channels *Channels) Create(eventKey string, params ...*CreateChannelParams) error
func (*Channels) RemoveObjects ¶
type CreateChannelParams ¶
type CreateChannelParamsOption ¶
type CreateChannelParamsOption func(Params *CreateChannelParams)
type CreateEventParams ¶
type CreateEventParams struct { ChartKey string `json:"chartKey"` ForSaleConfig *ForSaleConfig `json:"forSaleConfig,omitempty"` *EventParams }
type CreateEventResult ¶
type CreateEventResult struct {
Events []Event `json:"events"`
}
type CreateMultipleEventParams ¶
type CreateMultipleEventParams struct { ForSaleConfig *ForSaleConfig `json:"forSaleConfig,omitempty"` *EventParams }
type CreateMultipleEventsRequest ¶
type CreateMultipleEventsRequest struct { ChartKey string `json:"chartKey"` Events []CreateMultipleEventParams `json:"events"` }
type Event ¶
type Event struct { Id int64 `json:"id,omitempty"` Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` Date string `json:"date,omitempty"` ChartKey string `json:"chartKey"` HoldToken string `json:"holdToken,omitempty"` TableBookingConfig TableBookingConfig `json:"tableBookingConfig,omitempty"` SupportsBestAvailable bool `json:"supportsBestAvailable,omitempty"` ForSaleConfig *ForSaleConfig `json:"forSaleConfig,omitempty"` CreatedOn *time.Time `json:"createdOn"` UpdatedOn *time.Time `json:"updatedOn,omitempty"` Categories []Category `json:"categories,omitempty"` ObjectCategories map[string]CategoryKey `json:"objectCategories,omitempty"` Channels []Channel `json:"channels,omitempty"` IsInThePast bool `json:"isInThePast"` PartialSeasonKeysForEvent []string `json:"partialSeasonKeysForEvent,omitempty"` }
type EventObjectInfo ¶
type EventObjectInfo struct { Status ObjectStatus `json:"status"` OrderId string `json:"orderId"` ExtraData ExtraData `json:"extraData"` Label string `json:"label"` Labels Labels `json:"labels"` IDs IDs `json:"ids"` CategoryLabel string `json:"categoryLabel"` CategoryKey CategoryKey `json:"categoryKey"` TicketType string `json:"ticketType"` ForSale bool `json:"forSale"` Section string `json:"section"` Entrance string `json:"entrance"` NumBooked int `json:"numBooked"` Capacity int `json:"capacity"` ObjectType string `json:"objectType"` LeftNeighbour string `json:"leftNeighbour"` RightNeighbour string `json:"rightNeighbour"` HoldToken *string `json:"holdToken"` }
type EventParams ¶
type EventParams struct { EventKey string `json:"eventKey,omitempty"` Name string `json:"name,omitempty"` Date string `json:"date,omitempty"` TableBookingConfig *TableBookingConfig `json:"tableBookingConfig,omitempty"` ObjectCategories *map[string]CategoryKey `json:"objectCategories,omitempty"` Categories *[]Category `json:"categories,omitempty"` Channels *[]CreateChannelParams `json:"channels,omitempty"` }
type Events ¶
type Events struct {
Client *req.Client
}
func (*Events) Book ¶
func (events *Events) Book(eventKey string, objectIds ...string) (*ChangeObjectStatusResult, error)
func (*Events) BookBestAvailable ¶
func (events *Events) BookBestAvailable(eventKey string, params BestAvailableParams) (*BestAvailableResult, error)
func (*Events) BookBestAvailableWithHoldToken ¶
func (events *Events) BookBestAvailableWithHoldToken(eventKey string, params BestAvailableParams, holdToken string) (*BestAvailableResult, error)
func (*Events) BookBestAvailableWithOptions ¶
func (events *Events) BookBestAvailableWithOptions(eventKey string, params BestAvailableStatusChangeParams) (*BestAvailableResult, error)
func (*Events) BookWithHoldToken ¶
func (*Events) BookWithObjectProperties ¶
func (events *Events) BookWithObjectProperties(eventKey string, objectProperties ...ObjectProperties) (*ChangeObjectStatusResult, error)
func (*Events) BookWithObjectPropertiesAndHoldToken ¶
func (events *Events) BookWithObjectPropertiesAndHoldToken(eventKey string, objectProperties []ObjectProperties, holdToken *string) (*ChangeObjectStatusResult, error)
func (*Events) BookWithOptions ¶
func (events *Events) BookWithOptions(statusChangeParams *StatusChangeParams) (*ChangeObjectStatusResult, error)
func (*Events) ChangeBestAvailableObjectStatus ¶
func (events *Events) ChangeBestAvailableObjectStatus(eventKey string, bestAvailableStatusChangeParams *BestAvailableStatusChangeParams) (*BestAvailableResult, error)
func (*Events) ChangeObjectStatus ¶
func (events *Events) ChangeObjectStatus(eventKeys []string, objects []string, status ObjectStatus) (*ChangeObjectStatusResult, error)
func (*Events) ChangeObjectStatusInBatch ¶
func (events *Events) ChangeObjectStatusInBatch(statusChangeInBatchParams ...StatusChangeInBatchParams) (*ChangeObjectStatusInBatchResult, error)
func (*Events) ChangeObjectStatusWithOptions ¶
func (events *Events) ChangeObjectStatusWithOptions(statusChangeparams *StatusChangeParams) (*ChangeObjectStatusResult, error)
func (*Events) CreateMultiple ¶
func (events *Events) CreateMultiple(chartKey string, params ...CreateMultipleEventParams) (*CreateEventResult, error)
func (*Events) HoldBestAvailable ¶
func (events *Events) HoldBestAvailable(eventKey string, params BestAvailableParams, holdToken string) (*BestAvailableResult, error)
func (*Events) HoldWithObjectProperties ¶
func (events *Events) HoldWithObjectProperties(eventKey string, objectProperties []ObjectProperties, holdToken *string) (*ChangeObjectStatusResult, error)
func (*Events) HoldWithOptions ¶
func (events *Events) HoldWithOptions(statusChangeParams *StatusChangeParams) (*ChangeObjectStatusResult, error)
func (*Events) ListAll ¶
func (events *Events) ListAll(opts ...shared.PaginationParamsOption) ([]Event, error)
func (*Events) ListFirstPage ¶
func (*Events) ListPageAfter ¶
func (*Events) ListPageBefore ¶
func (*Events) MarkAsForSale ¶
func (events *Events) MarkAsForSale(eventKey string, forSaleConfig *ForSaleConfigParams) error
func (*Events) MarkAsNotForSale ¶
func (events *Events) MarkAsNotForSale(eventKey string, forSaleConfig *ForSaleConfigParams) error
func (*Events) MarkEverythingAsForSale ¶
func (*Events) OverrideSeasonObjectStatus ¶ added in v6.1.0
func (*Events) Release ¶
func (events *Events) Release(eventKey string, objectIds ...string) (*ChangeObjectStatusResult, error)
func (*Events) ReleaseWithHoldToken ¶
func (*Events) ReleaseWithOptions ¶
func (events *Events) ReleaseWithOptions(statusChangeParams *StatusChangeParams) (*ChangeObjectStatusResult, error)
func (*Events) RemoveCategories ¶
func (*Events) RemoveObjectCategories ¶
func (*Events) RetrieveObjectInfo ¶
func (*Events) StatusChanges ¶
func (events *Events) StatusChanges(eventKey string, opts ...ListParamsOption) *shared.Lister[StatusChange]
func (*Events) StatusChangesForObject ¶
func (*Events) Update ¶
func (events *Events) Update(eventKey string, params *UpdateEventParams) error
func (*Events) UpdateExtraData ¶
type ForSaleConfig ¶
type ForSaleConfigParams ¶
type LabelAndType ¶
type Labels ¶
type Labels struct { Own LabelAndType `json:"own"` Parent LabelAndType `json:"parent"` Section string `json:"section"` }
type ListParamsOption ¶
type ListParamsOption func(Params *shared.PageFetcher[StatusChange])
type ObjectProperties ¶
type ObjectStatus ¶
type ObjectStatus string
const ( FREE ObjectStatus = "free" BOOKED ObjectStatus = "booked" HELD ObjectStatus = "reservedByToken" )
type StatusChange ¶
type StatusChange struct { Id int64 `json:"id"` EventId int64 `json:"eventId"` Status string `json:"status"` Date *time.Time `json:"date"` OrderId string `json:"orderId"` ObjectLabel string `json:"objectLabel"` ExtraData ExtraData `json:"extraData"` Origin StatusChangeOrigin `json:"origin"` IsPresentOnChart bool `json:"isPresentOnChart"` NotPresentOnChartReason string `json:"notPresentOnChartReason"` HoldToken string `json:"holdToken"` }
type StatusChangeInBatchParams ¶
type StatusChangeInBatchParams struct { Event string `json:"event"` StatusChanges }
type StatusChangeInBatchRequest ¶
type StatusChangeInBatchRequest struct {
StatusChanges []StatusChangeInBatchParams `json:"statusChanges"`
}
type StatusChangeOrigin ¶
type StatusChangeParams ¶
type StatusChangeParams struct { Events []string `json:"events"` StatusChanges }
type StatusChanges ¶
type StatusChanges struct { Status ObjectStatus `json:"status"` Objects []ObjectProperties `json:"objects"` HoldToken string `json:"holdToken,omitempty"` OrderId string `json:"orderId,omitempty"` KeepExtraData bool `json:"keepExtraData"` IgnoreChannels bool `json:"ignoreChannels"` ChannelKeys []string `json:"channelKeys,omitempty"` AllowedPreviousStatuses []ObjectStatus `json:"allowedPreviousStatuses,omitempty"` RejectedPreviousStatuses []ObjectStatus `json:"rejectedPreviousStatuses,omitempty"` }
type TableBookingConfig ¶
type TableBookingConfig struct { Mode Mode `json:"mode"` Tables map[string]TableBookingMode `json:"tables,omitempty"` }
type TableBookingMode ¶
type TableBookingMode string
const ( BY_TABLE TableBookingMode = "BY_TABLE" BY_SEAT TableBookingMode = "BY_SEAT" )
type TableBookingModeSupportNS ¶
type TableBookingModeSupportNS struct{}
var TableBookingSupport TableBookingModeSupportNS
func (TableBookingModeSupportNS) AllBySeat ¶
func (TableBookingModeSupportNS) AllBySeat() *TableBookingConfig
func (TableBookingModeSupportNS) AllByTables ¶
func (TableBookingModeSupportNS) AllByTables() *TableBookingConfig
func (TableBookingModeSupportNS) Custom ¶
func (TableBookingModeSupportNS) Custom() *TableBookingConfig
func (TableBookingModeSupportNS) Inherit ¶
func (TableBookingModeSupportNS) Inherit() TableBookingConfig
type UpdateChannelParams ¶
type UpdateEventParams ¶
type UpdateEventParams struct { ChartKey *string `json:"chartKey,omitempty"` IsInThePast *bool `json:"isInThePast,omitempty"` *EventParams }
Click to show internal directories.
Click to hide internal directories.