structures

package
v0.0.0-...-1081ff4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiTranscodeUpdate

type ApiTranscodeUpdate struct {
	VodID   primitive.ObjectID `json:"vod_id"`
	Variant VodVariant         `json:"variant"`
	Error   string             `json:"error"`
}

type Chat

type Chat struct {
	ID    primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	VodID primitive.ObjectID `json:"vod_id" bson:"vod_id"`

	Twitch ChatTwitch `json:"twitch" bson:"twitch"`

	Timestamp time.Time `json:"timestamp" bson:"timestamp"`

	Content string `json:"content" bson:"content"`

	Badges []ChatBadge `json:"badges" bson:"badges"`
	Emotes []ChatEmote `json:"emotes" bson:"chat_emote"`
}

func (Chat) ToModel

func (c Chat) ToModel() *model.Chat

type ChatBadge

type ChatBadge struct {
	Name string   `json:"name" bson:"name"`
	URLs []string `json:"urls" bson:"urls"`
}

func (ChatBadge) ToModel

func (c ChatBadge) ToModel() *model.ChatBadge

type ChatEmote

type ChatEmote struct {
	Name      string   `json:"name" bson:"name"`
	ZeroWidth bool     `json:"zero_width" bson:"zero_width"`
	URLs      []string `json:"urls" bson:"urls"`
}

func (ChatEmote) ToModel

func (c ChatEmote) ToModel() *model.ChatEmote

type ChatTwitch

type ChatTwitch struct {
	ID          string `json:"id" bson:"id"`
	UserID      string `json:"user_id" bson:"user_id"`
	Login       string `json:"login" bson:"login"`
	DisplayName string `json:"display_name" bson:"display_name"`
	Color       string `json:"color" bson:"color"`
}

func (ChatTwitch) ToModel

func (c ChatTwitch) ToModel() *model.ChatTwitch

type User

type User struct {
	ID primitive.ObjectID `json:"id" bson:"_id,omitempty"`

	Twitch UserTwitch `json:"twitch" bson:"twitch"`

	StreamKey string `json:"stream_key" bson:"stream_key"`
}

func (User) ToModel

func (u User) ToModel() *model.User

type UserTwitch

type UserTwitch struct {
	ID             string `json:"id" bson:"id"`
	Login          string `json:"login" bson:"login"`
	DisplayName    string `json:"display_name" bson:"display_name"`
	ProfilePicture string `json:"profile_picture" bson:"profile_picture"`
}

func (UserTwitch) ToModel

func (u UserTwitch) ToModel() *model.UserTwitch

type Vod

type Vod struct {
	ID     primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	UserID primitive.ObjectID `json:"user_id" bson:"user_id"`

	Title string `json:"title" bson:"title"`

	Categories []VodCategory `json:"categories" bson:"categories"`

	State      VodState      `json:"vod_state" bson:"vod_state"`
	Visibility VodVisibility `json:"vod_visibility" bson:"vod_visibility"`

	Variants []VodVariant `json:"variants" bson:"variants"`

	Thumbnail struct {
		Static   string `json:"static" bson:"static"`
		Animated string `json:"animated" bson:"animated"`
	} `json:"thumbnail" bson:"thumbnail"`

	StartedAt time.Time `json:"started_at" bson:"started_at"`
	EndedAt   time.Time `json:"ended_at" bson:"ended_at"`
}

func (Vod) ToModel

func (v Vod) ToModel() *model.Vod

type VodCategory

type VodCategory struct {
	Timestamp time.Time `json:"timestamp" bson:"timestamp"`
	Name      string    `json:"name" bson:"name"`
	ID        string    `json:"id" bson:"id"`
	URL       string    `json:"url" bson:"url"`
}

func (VodCategory) ToModel

func (v VodCategory) ToModel() *model.VodCategory

type VodState

type VodState int32
const (
	VodStateLive VodState = iota
	VodStateQueued
	VodStateProcessing
	VodStateReady
	VodStateStorage
	VodStateFailed
	VodStateCanceled
)

func (VodState) ToModel

func (v VodState) ToModel() model.VodState

type VodTranscodeJob

type VodTranscodeJob struct {
	VodID   primitive.ObjectID `json:"vod_id"`
	Variant VodVariant         `json:"variant"`
}

type VodVariant

type VodVariant struct {
	Name    string `json:"name" bson:"name"`
	Width   int    `json:"width" bson:"width"`
	Height  int    `json:"height" bson:"height"`
	FPS     int    `json:"fps" bson:"fps"`
	Bitrate int    `json:"bitrate" bson:"bitrate"`
	Ready   bool   `json:"ready" bson:"ready"`
}

func (VodVariant) ToModel

func (v VodVariant) ToModel() *model.VodVariant

type VodVisibility

type VodVisibility int32
const (
	VodVisibilityPublic VodVisibility = iota
	VodVisibilityDeleted
)

func (VodVisibility) ToModel

func (v VodVisibility) ToModel() model.VodVisibility

Jump to

Keyboard shortcuts

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