Documentation ¶
Index ¶
- Variables
- func Pattern(glob string) string
- func ValidateEffectiveUnix(effective time.Time) int64
- type AnnotatedArchive
- type AnnotatedJob
- type AnnotatedRetentionPolicy
- type AnnotatedSchedule
- type AnnotatedStore
- type AnnotatedTarget
- type AnnotatedTask
- type ArchiveFilter
- type DB
- func (db *DB) Alias(name string, sql string) error
- func (db *DB) AnnotateArchive(id uuid.UUID, notes string) error
- func (db *DB) AnnotateJob(id uuid.UUID, name string, summary string) error
- func (db *DB) AnnotateRetentionPolicy(id uuid.UUID, name string, summary string) error
- func (db *DB) AnnotateSchedule(id uuid.UUID, name string, summary string) error
- func (db *DB) AnnotateStore(id uuid.UUID, name string, summary string) error
- func (db *DB) AnnotateTarget(id uuid.UUID, name string, summary string) error
- func (db *DB) CancelTask(id uuid.UUID, effective time.Time) error
- func (db *DB) CheckCurrentSchema() error
- func (db *DB) CompleteTask(id uuid.UUID, effective time.Time) error
- func (db *DB) Connect() error
- func (db *DB) Connected() bool
- func (db *DB) Copy() *DB
- func (db *DB) Count(sql_or_name string, args ...interface{}) (uint, error)
- func (db *DB) CreateBackupTask(owner string, job uuid.UUID) (uuid.UUID, error)
- func (db *DB) CreateJob(target, store, schedule, retention string, paused bool) (uuid.UUID, error)
- func (db *DB) CreatePurgeTask(owner string, archive *AnnotatedArchive) (uuid.UUID, error)
- func (db *DB) CreateRestoreTask(owner string, archive, target uuid.UUID) (uuid.UUID, error)
- func (db *DB) CreateRetentionPolicy(expiry uint) (uuid.UUID, error)
- func (db *DB) CreateSchedule(ts string) (uuid.UUID, error)
- func (db *DB) CreateStore(plugin string, endpoint interface{}) (uuid.UUID, error)
- func (db *DB) CreateTarget(plugin string, endpoint interface{}, agent string) (uuid.UUID, error)
- func (db *DB) CreateTaskArchive(id uuid.UUID, key string, effective time.Time) (uuid.UUID, error)
- func (db *DB) DeleteArchive(id uuid.UUID) (bool, error)
- func (db *DB) DeleteJob(id uuid.UUID) (bool, error)
- func (db *DB) DeleteRetentionPolicy(id uuid.UUID) (bool, error)
- func (db *DB) DeleteSchedule(id uuid.UUID) (bool, error)
- func (db *DB) DeleteStore(id uuid.UUID) (bool, error)
- func (db *DB) DeleteTarget(id uuid.UUID) (bool, error)
- func (db *DB) Disconnect() error
- func (db *DB) Exec(sql_or_name string, args ...interface{}) error
- func (db *DB) ExpireArchive(id uuid.UUID) error
- func (db *DB) FailTask(id uuid.UUID, effective time.Time) error
- func (db *DB) GetAllAnnotatedArchives(filter *ArchiveFilter) ([]*AnnotatedArchive, error)
- func (db *DB) GetAllAnnotatedJobs(filter *JobFilter) ([]*AnnotatedJob, error)
- func (db *DB) GetAllAnnotatedRetentionPolicies(filter *RetentionFilter) ([]*AnnotatedRetentionPolicy, error)
- func (db *DB) GetAllAnnotatedSchedules(filter *ScheduleFilter) ([]*AnnotatedSchedule, error)
- func (db *DB) GetAllAnnotatedStores(filter *StoreFilter) ([]*AnnotatedStore, error)
- func (db *DB) GetAllAnnotatedTargets(filter *TargetFilter) ([]*AnnotatedTarget, error)
- func (db *DB) GetAllAnnotatedTasks(filter *TaskFilter) ([]*AnnotatedTask, error)
- func (db *DB) GetAnnotatedArchive(id uuid.UUID) (*AnnotatedArchive, error)
- func (db *DB) GetAnnotatedJob(id uuid.UUID) (*AnnotatedJob, error)
- func (db *DB) GetAnnotatedRetentionPolicy(id uuid.UUID) (*AnnotatedRetentionPolicy, error)
- func (db *DB) GetAnnotatedSchedule(id uuid.UUID) (*AnnotatedSchedule, error)
- func (db *DB) GetAnnotatedStore(id uuid.UUID) (*AnnotatedStore, error)
- func (db *DB) GetAnnotatedTarget(id uuid.UUID) (*AnnotatedTarget, error)
- func (db *DB) GetAnnotatedTask(id uuid.UUID) (*AnnotatedTask, error)
- func (db *DB) GetArchivesNeedingPurge() ([]*AnnotatedArchive, error)
- func (db *DB) GetExpiredArchives() ([]*AnnotatedArchive, error)
- func (db *DB) GetRestoreTaskDetails(archive, target uuid.UUID, ...) error
- func (db *DB) InvalidateArchive(id uuid.UUID) error
- func (db *DB) PauseJob(id uuid.UUID) (bool, error)
- func (db *DB) PauseOrUnpauseJob(id uuid.UUID, pause bool) (bool, error)
- func (db *DB) PurgeArchive(id uuid.UUID) error
- func (db *DB) Query(sql_or_name string, args ...interface{}) (*sql.Rows, error)
- func (db *DB) SchemaVersion() (int, error)
- func (db *DB) Setup() error
- func (db *DB) StartTask(id uuid.UUID, effective time.Time) error
- func (db *DB) UnpauseJob(id uuid.UUID) (bool, error)
- func (db *DB) UpdateJob(id uuid.UUID, target, store, schedule, retention string) error
- func (db *DB) UpdateRetentionPolicy(id uuid.UUID, expiry uint) error
- func (db *DB) UpdateSchedule(id uuid.UUID, ts string) error
- func (db *DB) UpdateStore(id uuid.UUID, plugin string, endpoint interface{}) error
- func (db *DB) UpdateTarget(id uuid.UUID, plugin string, endpoint interface{}, agent string) error
- func (db *DB) UpdateTaskLog(id uuid.UUID, more string) error
- type JobFilter
- type RetentionFilter
- type ScheduleFilter
- type Schema
- type StoreFilter
- type TargetFilter
- type TaskFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrentSchema int = currentSchema()
View Source
var Schemas = map[int]Schema{
1: v1Schema{},
2: v2Schema{},
}
Functions ¶
func ValidateEffectiveUnix ¶ added in v0.4.1
Types ¶
type AnnotatedArchive ¶
type AnnotatedArchive struct { UUID string `json:"uuid"` StoreKey string `json:"key"` TakenAt Timestamp `json:"taken_at"` ExpiresAt Timestamp `json:"expires_at"` Notes string `json:"notes"` Status string `json:"status"` PurgeReason string `json:"purge_reason"` TargetUUID string `json:"target_uuid"` TargetPlugin string `json:"target_plugin"` TargetEndpoint string `json:"target_endpoint"` StoreUUID string `json:"store_uuid"` StorePlugin string `json:"store_plugin"` StoreEndpoint string `json:"store_endpoint"` }
type AnnotatedJob ¶
type AnnotatedJob struct { UUID string `json:"uuid"` Name string `json:"name"` Summary string `json:"summary"` RetentionName string `json:"retention_name"` RetentionUUID string `json:"retention_uuid"` Expiry int `json:"expiry"` ScheduleName string `json:"schedule_name"` ScheduleUUID string `json:"schedule_uuid"` ScheduleWhen string `json:"schedule_when"` Paused bool `json:"paused"` StoreUUID string `json:"store_uuid"` StoreName string `json:"store_name"` StorePlugin string `json:"store_plugin"` StoreEndpoint string `json:"store_endpoint"` TargetUUID string `json:"target_uuid"` TargetName string `json:"target_name"` TargetPlugin string `json:"target_plugin"` TargetEndpoint string `json:"target_endpoint"` Agent string `json:"agent"` }
type AnnotatedSchedule ¶
type AnnotatedStore ¶
type AnnotatedTarget ¶
type AnnotatedTask ¶
type AnnotatedTask struct { UUID string `json:"uuid"` Owner string `json:"owner"` Op string `json:"type"` JobUUID string `json:"job_uuid"` ArchiveUUID string `json:"archive_uuid"` Status string `json:"status"` StartedAt Timestamp `json:"started_at"` StoppedAt Timestamp `json:"stopped_at"` Log string `json:"log"` }
type ArchiveFilter ¶
type ArchiveFilter struct { ForTarget string ForStore string Before *time.Time After *time.Time ExpiresBefore *time.Time WithStatus []string WithOutStatus []string Limit string }
func (*ArchiveFilter) Args ¶
func (f *ArchiveFilter) Args() []interface{}
func (*ArchiveFilter) Query ¶
func (f *ArchiveFilter) Query() string
type DB ¶
func (*DB) AnnotateRetentionPolicy ¶
func (*DB) AnnotateSchedule ¶
func (*DB) AnnotateStore ¶
func (*DB) AnnotateTarget ¶
func (*DB) CheckCurrentSchema ¶
func (*DB) CreateBackupTask ¶
func (*DB) CreatePurgeTask ¶
func (*DB) CreateRestoreTask ¶
func (*DB) CreateRetentionPolicy ¶
func (*DB) CreateStore ¶
func (*DB) CreateTarget ¶
func (*DB) CreateTaskArchive ¶
func (*DB) GetAllAnnotatedArchives ¶
func (db *DB) GetAllAnnotatedArchives(filter *ArchiveFilter) ([]*AnnotatedArchive, error)
func (*DB) GetAllAnnotatedJobs ¶
func (db *DB) GetAllAnnotatedJobs(filter *JobFilter) ([]*AnnotatedJob, error)
func (*DB) GetAllAnnotatedRetentionPolicies ¶
func (db *DB) GetAllAnnotatedRetentionPolicies(filter *RetentionFilter) ([]*AnnotatedRetentionPolicy, error)
func (*DB) GetAllAnnotatedSchedules ¶
func (db *DB) GetAllAnnotatedSchedules(filter *ScheduleFilter) ([]*AnnotatedSchedule, error)
func (*DB) GetAllAnnotatedStores ¶
func (db *DB) GetAllAnnotatedStores(filter *StoreFilter) ([]*AnnotatedStore, error)
func (*DB) GetAllAnnotatedTargets ¶
func (db *DB) GetAllAnnotatedTargets(filter *TargetFilter) ([]*AnnotatedTarget, error)
func (*DB) GetAllAnnotatedTasks ¶
func (db *DB) GetAllAnnotatedTasks(filter *TaskFilter) ([]*AnnotatedTask, error)
func (*DB) GetAnnotatedArchive ¶
func (db *DB) GetAnnotatedArchive(id uuid.UUID) (*AnnotatedArchive, error)
func (*DB) GetAnnotatedJob ¶
func (db *DB) GetAnnotatedJob(id uuid.UUID) (*AnnotatedJob, error)
func (*DB) GetAnnotatedRetentionPolicy ¶
func (db *DB) GetAnnotatedRetentionPolicy(id uuid.UUID) (*AnnotatedRetentionPolicy, error)
func (*DB) GetAnnotatedSchedule ¶
func (db *DB) GetAnnotatedSchedule(id uuid.UUID) (*AnnotatedSchedule, error)
func (*DB) GetAnnotatedStore ¶
func (db *DB) GetAnnotatedStore(id uuid.UUID) (*AnnotatedStore, error)
func (*DB) GetAnnotatedTarget ¶
func (db *DB) GetAnnotatedTarget(id uuid.UUID) (*AnnotatedTarget, error)
func (*DB) GetAnnotatedTask ¶
func (db *DB) GetAnnotatedTask(id uuid.UUID) (*AnnotatedTask, error)
func (*DB) GetArchivesNeedingPurge ¶
func (db *DB) GetArchivesNeedingPurge() ([]*AnnotatedArchive, error)
func (*DB) GetExpiredArchives ¶
func (db *DB) GetExpiredArchives() ([]*AnnotatedArchive, error)
func (*DB) GetRestoreTaskDetails ¶
func (*DB) PauseOrUnpauseJob ¶
func (*DB) SchemaVersion ¶
func (*DB) UpdateRetentionPolicy ¶
func (*DB) UpdateStore ¶
func (*DB) UpdateTarget ¶
type JobFilter ¶
type RetentionFilter ¶
func (*RetentionFilter) Args ¶ added in v0.4.1
func (f *RetentionFilter) Args() []interface{}
func (*RetentionFilter) Query ¶
func (f *RetentionFilter) Query() string
type ScheduleFilter ¶
func (*ScheduleFilter) Args ¶ added in v0.4.1
func (f *ScheduleFilter) Args() []interface{}
func (*ScheduleFilter) Query ¶
func (f *ScheduleFilter) Query() string
type StoreFilter ¶
func (*StoreFilter) Args ¶
func (f *StoreFilter) Args() []interface{}
func (*StoreFilter) Query ¶
func (f *StoreFilter) Query() string
type TargetFilter ¶
func (*TargetFilter) Args ¶
func (f *TargetFilter) Args() []interface{}
func (*TargetFilter) Query ¶
func (f *TargetFilter) Query() string
type TaskFilter ¶
type TaskFilter struct { UUID string SkipActive bool SkipInactive bool ForStatus string Limit string }
func (*TaskFilter) Args ¶
func (f *TaskFilter) Args() []interface{}
func (*TaskFilter) Query ¶
func (f *TaskFilter) Query() string
Click to show internal directories.
Click to hide internal directories.