model

package
v0.0.0-...-8e7039a Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateNew          = "new"
	StateConfigured   = "configured"
	StateRunning      = "running"
	StateCanceling    = "canceling"
	StateNotification = "notifications"
	StateFinished     = "finished"
	StateFailed       = "failed"
	StateCanceled     = "canceled"

	TypeBackup  = "backup"
	TypeRestore = "restore"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ID        string `json:"id,omitempty"`
	Name      string `json:"name"`
	Address   string `json:"address"`
	PublicKey string `json:"publickey"`
}

Agent defines and agent

type Job

type Job struct {
	ID         string         `json:"id"`
	Agent      *Agent         `json:"agent,omitempty"`
	Definition *JobDefinition `json:"definition"`
	Meta       *JobMeta       `json:"meta"`
}

type JobDefinition

type JobDefinition struct {
	ID            string                    `json:"id,omitempty"`
	Type          string                    `json:"type"`
	To            []engine.Definition       `json:"to"`
	From          *engine.Definition        `json:"from,omitempty"`
	Modifications []modification.Definition `json:"modifications"`
	Paths         []Path                    `json:"paths,omitempty"`
	Files         []files.File              `json:"files,omitempty"`
}

type JobFile

type JobFile struct {
	File  files.File `json:"file"`
	State string     `json:"state"`
	Error string     `json:"error,omitempty"`
}

type JobMeta

type JobMeta struct {
	State    string    `json:"state"`
	Start    time.Time `json:"start"`
	End      time.Time `json:"end"`
	Message  string    `json:"message"`
	Total    int       `json:"total"`
	Complete int       `json:"complete"`
	Errors   int       `json:"errors"`
}

type Path

type Path struct {
	Root     string   `json:"root"`
	Excludes []string `json:"excludes"`
}

type Schedule

type Schedule struct {
	ID              string `json:"id,omitempty"`
	JobDefinitionID string `json:"jobDefinitionId"`
	AgentID         string `json:"agentID"`
	Seconds         string `json:"seconds"`
	Minutes         string `json:"minutes"`
	Hour            string `json:"hour"`
	DOM             string `json:"dom"`
	MON             string `json:"mon"`
	DOW             string `json:"dow"`
}

Schedule defines when a backup should run

func (*Schedule) String

func (s *Schedule) String() string

type User

type User struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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