Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) GetJobs() ([]Job, error)
- func (c *Client) GetLastFullRunID(sid int64, dir string) (int64, error)
- func (c *Client) GetRuns() ([]Run, error)
- func (c *Client) GetServers() ([]Server, error)
- func (c *Client) GetVolumes() ([]Volume, error)
- func (c *Client) InsertJob(j Job) (int64, error)
- func (c *Client) InsertRun(r Run) (int64, error)
- func (c *Client) InsertServer(s Server) (int64, error)
- func (c *Client) InsertVolume(v Volume) (int64, error)
- func (c *Client) UpdateJob(j Job) error
- func (c *Client) UpdateRun(r Run) error
- func (c *Client) UpdateServer(s Server) error
- func (c *Client) UpdateVolume(v Volume) error
- type Handler
- type Job
- type Run
- type Server
- type Volume
Constants ¶
View Source
const ( ErrQueryFailed = logs.Err("Query failed to execute.") ErrScan = logs.Err("Failed to scan query rows.") ErrNotFound = logs.Err("Query not found.") ErrConFail = logs.Err("DB connection failed.") )
View Source
const ( Full = iota Diff )
View Source
const ( StatusGood = iota StatusWait StatusFail )
View Source
const ( SrvSSH = iota SrvFTP SrvHTTP SrvSSBD )
View Source
const ( // todo FileDir-->VolFileDir FileDir = iota SSH AWS RBD )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetLastFullRunID ¶
func (*Client) GetServers ¶
GetServers returns all Servers.
func (*Client) GetVolumes ¶
GetVolumes returns all volumes.
func (*Client) InsertServer ¶
InsertServer inserts Server s.
func (*Client) InsertVolume ¶
InsertVolume inserts a new volume v.
func (*Client) UpdateServer ¶
UpdateServer updates a Server s identified by s.ServerID.
func (*Client) UpdateVolume ¶
UpdateVolume updates a volume v identified by v.VolumeID.
type Handler ¶
type Handler interface { // Volumes GetVolumes() ([]Volume, error) InsertVolume(v Volume) (int64, error) UpdateVolume(v Volume) error // Servers GetServers() ([]Server, error) InsertServer(s Server) (int64, error) UpdateServer(s Server) error // Jobs GetJobs() ([]Job, error) InsertJob(j Job) (int64, error) UpdateJob(j Job) error // RunHistory GetRuns() ([]Run, error) GetLastFullRunID(sid int64, dir string) (int64, error) InsertRun(r Run) (int64, error) UpdateRun(r Run) error Close() error }
Click to show internal directories.
Click to hide internal directories.