model

package
v0.0.0-...-de73faa Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 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 Channel

type Channel struct {
	ID              uint
	CID             string `gorm:"column:cid;size:32"`
	Name            string `gorm:"index"`
	Bitrate         int
	ContentType     string
	Listeners       int
	Relays          int
	Age             uint
	Genre           string
	Description     string
	Url             string
	Comment         string
	TrackArtist     string
	TrackTitle      string
	TrackAlbum      string
	TrackGenre      string
	TrackContact    string
	HiddenListeners bool
	TrackerIP       string `gorm:"size:53"`
	TrackerDirect   bool
	IsPlaying       bool      `gorm:"index" json:"-"`
	CreatedAt       time.Time `json:"-"`
	UpdatedAt       time.Time `json:"-"`
}

type ChannelDailySummary

type ChannelDailySummary struct {
	ID               uint
	LogDate          time.Time `gorm:"type:date;unique_index:uix_channel_daily_logs_log_date_name"`
	Name             string    `gorm:"unique_index:uix_channel_daily_logs_log_date_name"`
	NumLogs          int
	MaxListeners     int
	AverageListeners float32
	CreatedAt        time.Time `json:"-"`
	UpdatedAt        time.Time `json:"-"`
}

type ChannelList

type ChannelList []*Channel

func (ChannelList) HideListeners

func (list ChannelList) HideListeners() ChannelList

type ChannelLog

type ChannelLog struct {
	ID              uint
	LogTime         time.Time `gorm:"type:datetime;unique_index:uix_channel_logs_log_time_name"`
	ChannelID       uint      `gorm:"index"`
	CID             string    `gorm:"column:cid;size:32"`
	Name            string    `gorm:"unique_index:uix_channel_logs_log_time_name"`
	Bitrate         int
	ContentType     string
	Listeners       int
	Relays          int
	Age             uint
	Genre           string
	Description     string
	Url             string
	Comment         string
	TrackArtist     string
	TrackTitle      string
	TrackAlbum      string
	TrackGenre      string
	TrackContact    string
	HiddenListeners bool
	CreatedAt       time.Time `json:"-"`
	UpdatedAt       time.Time `json:"-"`
}

type Information

type Information struct {
	ID          uint
	Name        string
	Description string
	Priority    int `gorm:"default:-10"`
	CreatedAt   time.Time
	UpdatedAt   time.Time
	DeletedAt   *time.Time
}

Jump to

Keyboard shortcuts

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