Documentation
¶
Index ¶
Constants ¶
View Source
const ( PATTERN string = "^(([0-9]+):)?([0-9]+):([0-9]+)$" REPLACEMENT string = "0${2}h${3}m${4}s" ZERO string = "00:00:00" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct { ID uint `json:"id" gorm:"primary_key"` VideoID uint `json:"video_id" gorm:"index:idx_video"` Type uint `json:"type" gorm:"index:idx_type"` Title string `json:"title"` Notes string `json:"notes"` Start TimeStamp `json:"start"` End TimeStamp `json:"end"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` // Associations Video *Video `json:"video" gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` }
type DataAccessInterface ¶
type DataAccessInterface interface { Association(string) *gorm.Association AutoMigrate(...interface{}) error Create(interface{}) *gorm.DB Delete(interface{}, ...interface{}) *gorm.DB First(interface{}, ...interface{}) *gorm.DB Find(interface{}, ...interface{}) *gorm.DB Joins(string, ...interface{}) *gorm.DB Model(interface{}) *gorm.DB Preload(string, ...interface{}) *gorm.DB Scan(interface{}) *gorm.DB Select(interface{}, ...interface{}) *gorm.DB Updates(interface{}) *gorm.DB Where(interface{}, ...interface{}) *gorm.DB }
type MockedDataAccessInterface ¶
type MockedDataAccessInterface interface { gorm.DB DataAccessInterface }
type TimeStamp ¶
type TimeStamp int64
func (*TimeStamp) MarshalJSON ¶
func (*TimeStamp) UnmarshalJSON ¶
type User ¶
type Video ¶
type Video struct { ID uint `json:"id" gorm:"primary_key"` UserID uint `json:"user_id" gorm:"index:idx_user;index:unq_user_video,unique"` Title string `json:"title"` Description string `json:"description"` Link string `json:"link" gorm:"index:unq_user_video,unique"` Duration TimeStamp `json:"duration"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime:milli"` // Associations Annotations []Annotation `json:"annotations" gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` }
Click to show internal directories.
Click to hide internal directories.