types

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 2 Imported by: 0

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

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

type NullInt64 struct {
	sql.NullInt64
}

NullInt64 is an alias for sql.NullInt64 data type

func (*NullInt64) MarshalJSON

func (ni *NullInt64) MarshalJSON() ([]byte, error)

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

type SettingsForm struct {
	Name        string `json:"name"`
	Title       string `json:"title"`
	Value       string `json:"value"`
	Description string `json:"description"`
	Secure      bool   `json:"secure"`
}

type SettingsOption

type SettingsOption struct {
	ID          int64  `db:"id" json:"-"`
	Name        string `db:"name" json:"name"`
	Title       string `db:"title" json:"title"`
	Description string `db:"description" json:"description"`
	Secure      bool   `db:"secure" json:"secure"`
}

SettingsOption defines a setting option.

type User

type User struct {
	ID       int64  `db:"id" json:"id,omitempty"`
	Username string `db:"username" json:"username" valid:"email,required"`
	Password string `db:"password" json:"password" valid:"password,required"`
	Role     string `db:"role" json:"role" valid:"required"`
}

User contains user models.

Jump to

Keyboard shortcuts

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