statistics

package
v0.0.0-...-8eba3d0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigQueryConfig

type BigQueryConfig struct {
	ProjectID string
	DatasetID string
}

type CalendarEntry

type CalendarEntry struct {
	ID       string              `bigquery:"id"`
	EventID  bigquery.NullString `bigquery:"event_id"`
	Title    string              `bigquery:"title"`
	Start    time.Time           `bigquery:"start"`
	End      time.Time           `bigquery:"end"`
	Type     bigquery.NullString `bigquery:"type"`
	IsReplay bool                `bigquery:"is_replay"`
	ItemID   bigquery.NullString `bigquery:"item_id"`
}

func CalendarEntryFromCommon

func CalendarEntryFromCommon(c common.CalendarEntry, _ int) CalendarEntry

type Episode

type Episode struct {
	ID                    int                 `json:"id"`
	UUID                  uuid.UUID           `json:"uuid"`
	Unlisted              bool                `json:"unlisted"`
	Type                  string              `json:"type"`
	PreventPublicIndexing bool                `json:"preventPublicIndexing"`
	SeasonID              bigquery.NullInt64  `json:"seasonId"`
	PublishDate           time.Time           `json:"publishDate"`
	ProductionDate        time.Time           `json:"productionDate"`
	AvailableFrom         time.Time           `json:"availableFrom"`
	AvailableTo           time.Time           `json:"availableTo"`
	Number                int                 `json:"number"`
	ImageIcon             bigquery.NullString `json:"image_icon"`
	ImageFeatured         bigquery.NullString `json:"image_featured"`
	ImagePoster           bigquery.NullString `json:"image_poster"`
	Duration              int                 `json:"duration"`
	AgeRating             string              `json:"ageRating"`
	TagIDs                string              `json:"tagIds"`
	PublicTitle           bigquery.NullString `json:"publicTitle"`
	Title                 bigquery.NullString `json:"title"`
	Description           bigquery.NullString `json:"description"`
	ExtraDescription      bigquery.NullString `json:"extraDescription"`
	Updated               time.Time
	Deleted               *time.Time
	LegacyEpisodeID       bigquery.NullString
	LegacyProgramID       bigquery.NullString
	Audience              bigquery.NullString `json:"audience"`
	ContentType           bigquery.NullString `json:"contentType"`
}

func EpisodeFromCommon

func EpisodeFromCommon(e common.Episode, _ int) Episode

type GetAnswersSinceBQRow

type GetAnswersSinceBQRow struct {
	Message  string    `bigquery:"message"`
	ItemID   uuid.UUID `bigquery:"item_id"`
	Rating   int32     `bigquery:"rating"`
	AgeGroup string    `bigquery:"age_group"`
	OrgID    int       `bigquery:"org_id"`
	Updated  time.Time `bigquery:"updated"`
}

GetAnswersSinceBQRow is a row

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(ctx context.Context, bqConfig BigQueryConfig, q *sqlc.Queries) *Handler

func (*Handler) HandleAnswerExportToBQ

func (h *Handler) HandleAnswerExportToBQ(ctx context.Context) error

func (*Handler) HandleDirectusEvent

func (h *Handler) HandleDirectusEvent(ctx context.Context, collection string, id string) error

type MediaItem

type MediaItem struct {
	ID            string               `json:"id"`
	UserCreated   string               `json:"userCreated" bigquery:"user_created"`
	DateCreated   time.Time            `json:"dateCreated" bigquery:"date_created"`
	UserUpdated   string               `json:"userUpdated" bigquery:"user_updated"`
	DateUpdated   time.Time            `json:"dateUpdated" bigquery:"date_updated"`
	Label         string               `json:"label"`
	Title         bigquery.NullString  `json:"title"`
	Description   bigquery.NullString  `json:"description"`
	Type          string               `json:"type"`
	AssetID       string               `json:"assetId" bigquery:"asset_id"`
	ParentEpisode bigquery.NullInt64   `json:"parentEpisode" bigquery:"parent_episode"`
	ParentStarts  bigquery.NullFloat64 `json:"parentStarts" bigquery:"parent_starts"`
	ParentEnds    bigquery.NullFloat64 `json:"parentEnds" bigquery:"parent_ends"`
}

func MediaItemFromDb

func MediaItemFromDb(mi sqlc.Mediaitem, _ int) MediaItem

type Season

type Season struct {
	ID            int    `json:"id"`
	TagIDs        string `json:"tagIds"`
	Number        int
	AgeRating     string
	PublicTitle   bigquery.NullString `json:"publicTitle"`
	Title         bigquery.NullString `json:"title"`
	Description   bigquery.NullString `json:"description"`
	ShowID        int
	ImageIcon     bigquery.NullString `json:"image_icon"`
	ImageFeatured bigquery.NullString `json:"image_featured"`
	ImagePoster   bigquery.NullString `json:"image_poster"`
	Updated       time.Time
	Deleted       *time.Time
}

Season is the definition of the Season object

func SeasonFromCommon

func SeasonFromCommon(s common.Season, _ int) Season

type Short

type Short struct {
	ID          string               `bigquery:"id"`
	MediaID     string               `bigquery:"media_id"`
	AssetID     string               `bigquery:"asset_id"`
	Label       string               `bigquery:"label"`
	EpisodeID   string               `bigquery:"episode_id"`
	Status      string               `bigquery:"status"`
	StartsAt    bigquery.NullFloat64 `bigquery:"starts_at"`
	EndsAt      bigquery.NullFloat64 `bigquery:"ends_at"`
	Image       bigquery.NullString  `bigquery:"image"`
	DateUpdated time.Time            `bigquery:"date_updated"`
}

func ShortFromCommon

func ShortFromCommon(s common.Short, _ int) Short

type Show

type Show struct {
	ID            int                 `json:"id"`
	Type          string              `json:"type"`
	TagIDs        string              `json:"tagIds"`
	PublicTitle   bigquery.NullString `json:"publicTitle"`
	Title         bigquery.NullString `json:"title"`
	Description   bigquery.NullString `json:"description"`
	ImageIcon     bigquery.NullString `json:"image_icon"`
	ImageFeatured bigquery.NullString `json:"image_featured"`
	ImagePoster   bigquery.NullString `json:"image_poster"`
	Updated       time.Time
	Deleted       *time.Time
}

Show is the definition of the Show object

func ShowFromCommon

func ShowFromCommon(s common.Show, _ int) Show

type TimedMetadata

type TimedMetadata struct {
	ID          string              `json:"id"`
	Type        string              `json:"type"`
	Timestamp   float64             `json:"timestamp"`
	Title       bigquery.NullString `json:"title"`
	Description bigquery.NullString `json:"description"`
	ChapterType bigquery.NullString `json:"chapterType"`
	PersonIDs   string              `json:"personIds"`
	SongID      uuid.NullUUID       `json:"songId"`
}

func TimedMetadataFromCommon

func TimedMetadataFromCommon(tm common.TimedMetadata, _ int) TimedMetadata

Jump to

Keyboard shortcuts

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