types

package
v0.0.0-...-a73e80e Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioFormat

type AudioFormat struct {
	*Format
	Bitrate  uint   `json:"bitrate"`
	Encoding string `json:"encoding"`
}

type Celebrity

type Celebrity struct {
	Name        string `json:"name"`
	ProfileLink string `json:"profileLink"`
	Tags        []*Tag `json:"tags"`
}

type Credential

type Credential interface {
	GetSession() *Session
	IsValid() bool
}

type DBInterface

type DBInterface interface {
	GetVideo(id string) *Video
	GetSnippet(id string) *Snippet
	InsertSnippet(s *Snippet)
	GetVideoMedia(id string) *VideoMedia
	InsertVideoMedia(vm *VideoMedia)
}

type Format

type Format struct {
	Filename string `json:"filename"`
	Filesize uint   `json:"filesize"`
	Language string `json:"lang"`
}

type Media

type Media struct {
	Title *Title `json:"title"`
	Tags  []*Tag `json:"tags"`
}

type MovieMedia

type MovieMedia struct {
	*Media
	Cuts      []*Video     `json:"videos"`
	Actors    []*Celebrity `json:"actors"`
	Directors []*Celebrity `json:"directors"`
}

type MusikMedia

type MusikMedia struct {
	*Media
	Variants   []*Video     `json:"variants"`
	Artists    []*Celebrity `json:"artists"`
	CleanAudio *VideoMedia  `json:"cleanAudio"`
	BestVideo  *VideoMedia  `json:"bestVideo"`
}

type MySQL

type MySQL struct{}

func (*MySQL) GetSnippet

func (m *MySQL) GetSnippet(id string) *Snippet

func (*MySQL) GetVideo

func (m *MySQL) GetVideo(id string) *Video

func (*MySQL) GetVideoMedia

func (m *MySQL) GetVideoMedia(id string) *VideoMedia

func (*MySQL) InsertSnippet

func (m *MySQL) InsertSnippet(id *Snippet)

func (*MySQL) InsertVideoMedia

func (m *MySQL) InsertVideoMedia(vm *VideoMedia)

type Password

type Password struct {
	Hash string `json:"hash"`
	Salt string `json:"salt"`
}

func (*Password) GetSession

func (p *Password) GetSession() *Session

func (*Password) IsValid

func (p *Password) IsValid() bool

type Playable

type Playable interface {
	GetStart() uint
	GetLength() uint
	GetAudioFormat() []*AudioFormat
	GetVideoFormat() []*VideoFormat
	GetSubtitleFormat() []*SubtitleFormat
	IsSnippet() bool
	DoSnip(title Title, snipStart uint, snipLength uint) *Snippet
}

type Playlist

type Playlist struct {
	Title *Title          `json:"title"`
	Items []*PlaylistItem `json:"items"`
}

type PlaylistItem

type PlaylistItem struct {
	Idx       uint   `json:"idx"`
	Item      *Media `json:"item"`
	AddedAt   uint   `json:"addedAt"`
	RemovedAt uint   `json:"removedAt"`
}

type RememberMeToken

type RememberMeToken struct {
	Token string `json:"token"`
}

func (*RememberMeToken) GetSession

func (rm *RememberMeToken) GetSession() *Session

func (*RememberMeToken) IsValid

func (rm *RememberMeToken) IsValid() bool

type Session

type Session struct {
	User          *User `json:"user"`
	IsDirectLogin bool  `json:"isDirectLogin"`
}

type Snippet

type Snippet struct {
	Title  *Title `json:"title"`
	Start  uint   `json:"start"`
	Length uint   `json:"length"`
	Parent *Video `json:"parent"`
}

func (*Snippet) DoSnip

func (S *Snippet) DoSnip(title Title, snipStart uint, snipLength uint) *Snippet

func (*Snippet) GetAudioFormat

func (S *Snippet) GetAudioFormat() []*AudioFormat

func (*Snippet) GetLength

func (S *Snippet) GetLength() uint

func (*Snippet) GetStart

func (S *Snippet) GetStart() uint

func (*Snippet) GetSubtitleFormat

func (S *Snippet) GetSubtitleFormat() []*SubtitleFormat

func (*Snippet) GetVideoFormat

func (S *Snippet) GetVideoFormat() []*VideoFormat

type SubtitleFormat

type SubtitleFormat struct {
	*Format
}

type Tag

type Tag struct {
	Title *Title `json:"title"`
}

type Title

type Title struct {
	Title     string `json:"title"`
	Language  string `json:"lang"`
	PrevTitle *Title `json:"prev"`
	NextTitle *Title `json:"next"`
}

func (*Title) String

func (t *Title) String() string

type User

type User struct {
	Username    string        `json:"username"`
	DisplayName string        `json:"displayName"`
	Credentials []*Credential `json:"credentials"`
	Playlists   []*Playlist   `json:"playlists"`
	Snippets    []*Snippet    `json:"snippets"`
	Follows     []*Celebrity  `json:"follows"`
}

type Video

type Video struct {
	ID        string            `json:"id"`
	Title     *Title            `json:"title"`
	Length    uint              `json:"length"`
	AudioF    []*AudioFormat    `json:"audioFormats"`
	VideoF    []*VideoFormat    `json:"videoFormats"`
	SubtitleF []*SubtitleFormat `json:"subtitleFormats"`
}

func (*Video) DoSnip

func (V *Video) DoSnip(title Title, snipStart uint, snipLength uint) *Snippet

func (*Video) GetAudioFormat

func (V *Video) GetAudioFormat() []*AudioFormat

func (*Video) GetLength

func (V *Video) GetLength() uint

func (*Video) GetStart

func (V *Video) GetStart() uint

func (*Video) GetSubtitleFormat

func (V *Video) GetSubtitleFormat() []*SubtitleFormat

func (*Video) GetVideoFormat

func (V *Video) GetVideoFormat() []*VideoFormat

func (*Video) String

func (v *Video) String() string

type VideoFormat

type VideoFormat struct {
	*Format
	Bitrate  uint   `json:"bitrate"`
	Encoding string `json:"encoding"`
}

type VideoMedia

type VideoMedia struct {
	*Media
	Video *Video `json:"video"`
}

func (*VideoMedia) String

func (t *VideoMedia) String() string

Jump to

Keyboard shortcuts

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