models

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package models contains the model definitions used within the application

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoorPrice

type DoorPrice = string

DoorPrice is alias of string for now

type Event

type Event struct {
	Id             string    `json:"id"`
	Order          int32     `json:"order"`
	Headline       string    `json:"headline"`
	EventLink      string    `json:"event_link"`
	SmallImageLink string    `json:"image_link"`
	Weekday        string    `json:"week_day"`
	Date           string    `json:"date"`
	StoreLink      string    `json:"store_ink"`
	InStock        bool      `json:"in_stock"`
	UpdatedAt      time.Time `json:"updated_at,omitempty"`
}

Event is an event with some basic information scraped from the shorter description

func (Event) EventURL

func (e Event) EventURL() string

func (Event) ID

func (e Event) ID() string

type EventAscii

type EventAscii struct {
	Ascii     string    `json:"ascii"`
	EventID   string    `json:"event_id"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

EventAscii is a container for events' image which is converted into string

type EventDetails

type EventDetails struct {
	EventID     string            `json:"event_id"`
	Description []string          `json:"summary"`
	ImageLink   string            `json:"image_link"`
	ProductInfo map[string]string `json:"product_info"`
	PlayTimes   []string          `json:"play_times"`
	Tickets     EventTickets      `json:"tickets"`
	DoorPrice   DoorPrice         `json:"door_price"`
	UpdatedAt   time.Time         `json:"updated_at,omitempty"`
}

EventDetails is a more rich information related one to one to event and fetched from the events' page

func (EventDetails) ID

func (ed EventDetails) ID() string

func (EventDetails) ImageURL

func (ed EventDetails) ImageURL() string

type EventDetailsPartial

type EventDetailsPartial interface {
	HasID
	ImageURL() string
}

type EventPartial

type EventPartial interface {
	HasID
	EventURL() string
}

type EventTickets

type EventTickets struct {
	Tickets []Ticket `json:"tickets"`
}

EventTickets tickets for the event, can be emppty as well

type Events

type Events struct {
	Events    []Event   `json:"events"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

Events simple wrapper for event list with a timestamp

type HasID

type HasID interface {
	ID() string
}

HasID interface to allow to use general access to ID variable (usually event.ID)

type Ticket

type Ticket struct {
	Description string `json:"description"`
	Price       string `json:"price"`
}

Ticket single ticket for event

Jump to

Keyboard shortcuts

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