Documentation ¶
Index ¶
- func ConnectDB() (*sqlx.DB, error)
- type Data
- type Jobs
- type JobsOp
- func (j JobsOp) CreateEncodeData(ed types.EncodeData) *types.EncodeData
- func (j JobsOp) CreateJob(job types.Job) *types.Job
- func (j JobsOp) GetJobByGUID(id string) (*types.Job, error)
- func (j JobsOp) GetJobByID(id int64) (*types.Job, error)
- func (j JobsOp) GetJobStatusByGUID(guid string) (string, error)
- func (j JobsOp) GetJobStatusByID(id int64) (string, error)
- func (j JobsOp) GetJobs(offset, count int) *[]types.Job
- func (j JobsOp) GetJobsCount() int
- func (j JobsOp) GetJobsStats() (*[]Stats, error)
- func (j JobsOp) UpdateEncodeDataByID(id int64, jsonString string) error
- func (j JobsOp) UpdateEncodeProgressByID(id int64, progress float64) error
- func (j JobsOp) UpdateJobByID(id int, job types.Job) *types.Job
- func (j JobsOp) UpdateJobStatusByGUID(guid string, status string) error
- func (j JobsOp) UpdateJobStatusByID(id int, status string) error
- type Presets
- type PresetsOp
- func (p PresetsOp) CreatePreset(preset types.Preset) (*types.Preset, error)
- func (p PresetsOp) GetPresetByID(id int) (*types.Preset, error)
- func (p PresetsOp) GetPresetByName(name string) (*types.Preset, error)
- func (p PresetsOp) GetPresets(offset, count int) *[]types.Preset
- func (p PresetsOp) GetPresetsCount() int
- func (p PresetsOp) UpdatePresetByID(id int, preset types.Preset) *types.Preset
- func (p PresetsOp) UpdatePresetStatusByID(id int, active bool) error
- type Settings
- type SettingsOp
- func (s SettingsOp) CreateOrUpdateSetting(key, value string)
- func (s SettingsOp) CreateSetting(setting types.Setting) *types.Setting
- func (s SettingsOp) GetSetting(key string) types.Setting
- func (s SettingsOp) GetSettings() []types.Setting
- func (s SettingsOp) GetSettingsOptions() []types.SettingsOption
- func (s SettingsOp) SettingExists(optionID int64) bool
- func (s SettingsOp) UpdateSetting(setting types.Setting) *types.Setting
- func (s SettingsOp) UpdateSettings(setting map[string]string) error
- type Stats
- type Users
- type UsersOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Jobs ¶
type Jobs interface { GetJobs(offset, count int) *[]types.Job GetJobByID(id int64) (*types.Job, error) GetJobByGUID(id string) (*types.Job, error) GetJobStatusByID(id int64) (string, error) GetJobStatusByGUID(guid string) (string, error) GetJobsCount() int GetJobsStats() (*[]Stats, error) CreateJob(job types.Job) *types.Job CreateEncodeData(ed types.EncodeData) *types.EncodeData UpdateEncodeDataByID(id int64, jsonString string) error UpdateEncodeProgressByID(id int64, progress float64) error UpdateJobByID(id int, job types.Job) *types.Job UpdateJobStatusByID(id int, status string) error UpdateJobStatusByGUID(guid string, status string) error }
Jobs represents the Jobs database operations.
type JobsOp ¶
type JobsOp struct {
// contains filtered or unexported fields
}
JobsOp represents a job operation.
func (JobsOp) CreateEncodeData ¶
func (j JobsOp) CreateEncodeData(ed types.EncodeData) *types.EncodeData
CreateEncodeData creates encode in database.
func (JobsOp) GetJobByGUID ¶
GetJobByGUID Gets a job by GUID.
func (JobsOp) GetJobByID ¶
GetJobByID Gets a job by ID.
func (JobsOp) GetJobStatusByGUID ¶
GetJobStatusByGUID Gets a job status by GUID.
func (JobsOp) GetJobStatusByID ¶
GetJobStatusByID Gets a job status by GUID.
func (JobsOp) GetJobsCount ¶
GetJobsCount Gets a count of all jobs.
func (JobsOp) GetJobsStats ¶
GetJobsStats Gets a count of each status.
func (JobsOp) UpdateEncodeDataByID ¶
UpdateEncodeDataByID Update encode by ID.
func (JobsOp) UpdateEncodeProgressByID ¶
UpdateEncodeProgressByID Update progress by ID.
func (JobsOp) UpdateJobByID ¶
UpdateJobByID Update job by ID.
func (JobsOp) UpdateJobStatusByGUID ¶
UpdateJobStatusByGUID Update job status by GUID.
type Presets ¶
type Presets interface { GetPresets(offset, count int) *[]types.Preset GetPresetByID(id int) (*types.Preset, error) GetPresetByName(name string) (*types.Preset, error) GetPresetsCount() int CreatePreset(user types.Preset) (*types.Preset, error) UpdatePresetByID(id int, preset types.Preset) *types.Preset UpdatePresetStatusByID(id int, active bool) error }
Presets represents the Presets database operations.
type PresetsOp ¶
type PresetsOp struct {
// contains filtered or unexported fields
}
PresetsOp represents the users operations.
func (PresetsOp) CreatePreset ¶
CreatePreset creates a preset.
func (PresetsOp) GetPresetByID ¶
GetPresetByID Gets a preset by ID.
func (PresetsOp) GetPresetByName ¶
GetPresetByName Gets a preset by name.
func (PresetsOp) GetPresets ¶
GetPresets Gets all presets.
func (PresetsOp) GetPresetsCount ¶
GetPresetsCount Gets a count of all presets.
func (PresetsOp) UpdatePresetByID ¶
UpdatePresetByID Update job by ID.
type Settings ¶
type Settings interface { GetSetting(key string) types.Setting GetSettings() []types.Setting GetSettingsOptions() []types.SettingsOption UpdateSettings(setting map[string]string) error CreateOrUpdateSetting(key, value string) UpdateSetting(setting types.Setting) *types.Setting CreateSetting(setting types.Setting) *types.Setting SettingExists(optionID int64) bool }
Settings represents the Settings database operations.
type SettingsOp ¶
type SettingsOp struct {
// contains filtered or unexported fields
}
SettingsOp represents the settings.
func (SettingsOp) CreateOrUpdateSetting ¶
func (s SettingsOp) CreateOrUpdateSetting(key, value string)
CreateOrUpdateSetting Runs an "upsert"-like transaction for a setting.
func (SettingsOp) CreateSetting ¶
func (s SettingsOp) CreateSetting(setting types.Setting) *types.Setting
CreateSetting Creates a setting.
func (SettingsOp) GetSetting ¶
func (s SettingsOp) GetSetting(key string) types.Setting
GetSetting Gets a setting.
func (SettingsOp) GetSettings ¶
func (s SettingsOp) GetSettings() []types.Setting
GetSettings Gets settings.
func (SettingsOp) GetSettingsOptions ¶
func (s SettingsOp) GetSettingsOptions() []types.SettingsOption
GetSettingsOptions Gets all available setting options.
func (SettingsOp) SettingExists ¶
func (s SettingsOp) SettingExists(optionID int64) bool
SettingExists Queries a setting exists.
func (SettingsOp) UpdateSetting ¶
func (s SettingsOp) UpdateSetting(setting types.Setting) *types.Setting
UpdateSetting updates an existing setting.
func (SettingsOp) UpdateSettings ¶
func (s SettingsOp) UpdateSettings(setting map[string]string) error
UpdateSettings Updates settings.
type Users ¶
type Users interface { CreateUser(user types.User) (*types.User, error) GetUserByUsername(username string) (*types.User, error) GetUserID(username string) int64 }
Users represents the Users database operations.
type UsersOp ¶
type UsersOp struct {
// contains filtered or unexported fields
}
UsersOp represents the users operations.
func (UsersOp) CreateUser ¶
CreateUser creates a user.
func (UsersOp) GetUserByUsername ¶
GetUserByUsername Gets a user by username.