Documentation
¶
Index ¶
Constants ¶
View Source
const ( JobQueued = "queued" JobDownloading = "downloading" JobProbing = "probing" JobEncoding = "encoding" JobUploading = "uploading" JobCompleted = "completed" JobError = "error" JobCancelled = "cancelled" JobRestarting = "restarting" )
Job status types.
View Source
const ( AWSAccessKey = "AWS_ACCESS_KEY" AWSSecretKey = "AWS_SECRET_KEY" DigitalOceanAccessToken = "DIGITAL_OCEAN_ACCESS_TOKEN" SlackWebhook = "SLACK_WEBHOOK" S3InboundBucket = "S3_INBOUND_BUCKET" S3InboundBucketRegion = "S3_INBOUND_BUCKET_REGION" S3OutboundBucket = "S3_OUTBOUND_BUCKET" S3OutboundBucketRegion = "S3_OUTBOUND_BUCKET_REGION" S3Provider = "S3_PROVIDER" DigitalOcean = "DIGITALOCEAN" AWS = "AWS" )
Settings types.
View Source
const ( Guest = 0 Admin = 1 Operator = 2 )
User roles.
Variables ¶
View Source
var JobStatuses = []string{ JobQueued, JobDownloading, JobProbing, JobEncoding, JobUploading, JobCompleted, JobError, JobCancelled, JobRestarting, }
JobStatuses All job status types.
Functions ¶
This section is empty.
Types ¶
type EncodeData ¶
type EncodeData struct { EncodeDataID int64 `db:"id" json:"-"` JobID int64 `db:"job_id" json:"-"` Data NullString `db:"data" json:"encode,omitempty"` Progress NullFloat64 `db:"progress" json:"progress,omitempty"` }
EncodeData describes the encode data.
type Job ¶
type Job struct { ID int64 `db:"id" json:"id"` GUID string `db:"guid" json:"guid"` Preset string `db:"preset" json:"preset"` CreatedDate string `db:"created_date" json:"created_date"` Status string `db:"status" json:"status"` Source NullString `db:"source" json:"source"` Destination NullString `db:"destination" json:"destination"` // EncodeData. EncodeData `db:"encode"` LocalSource string `json:"local_source,omitempty"` LocalDestination string `json:"local_destination,omitempty"` }
Job describes the job info.
type NullFloat64 ¶
type NullFloat64 struct {
sql.NullFloat64
}
NullFloat64 is an alias for sql.NullFloat64 data type
func (*NullFloat64) MarshalJSON ¶
func (nf *NullFloat64) MarshalJSON() ([]byte, error)
MarshalJSON for NullFloat64
type NullInt64 ¶
NullInt64 is an alias for sql.NullInt64 data type
func (*NullInt64) MarshalJSON ¶
MarshalJSON for NullInt64
type NullString ¶
type NullString struct {
sql.NullString
}
NullString is an alias for sql.NullString data type
func (*NullString) MarshalJSON ¶
func (ns *NullString) MarshalJSON() ([]byte, error)
MarshalJSON for NullString
type Preset ¶
type Preset struct { ID int64 `db:"id" json:"id,omitempty"` Name string `db:"name" json:"name"` Description string `db:"description" json:"description"` Data string `db:"data" json:"data"` Output string `db:"output" json:"output"` Active *bool `db:"active" json:"active"` }
Preset contains user models.
type Setting ¶
type Setting struct { ID int64 `db:"id" json:"-"` UserID int64 `db:"user_id" json:"-"` SettingsOptionID int64 `db:"settings_option_id" json:"-"` SettingsOption `db:"settings_option"` Value string `db:"value" json:"value"` Encrypted bool `db:"encrypted" json:"encrypted"` }
Setting defines a setting for a user.
type SettingsForm ¶
Click to show internal directories.
Click to hide internal directories.