Documentation ¶
Index ¶
- Constants
- func NewSignedHTTPClient(accessKey, secretKey string, timeoutSecs int) *signedHTTPClient
- func ParseDatabaseType(s string) (databaseType, error)
- func ParseRetentionType(s string) (retentionType, error)
- func ParseScheduleType(s string) (scheduleType, error)
- type Client
- func (c *Client) CreateRetention(name string, retentionType retentionType, count int) (retention Retention, err error)
- func (c *Client) CreateSchedule(name string, scheduleType scheduleType, hours string, days string) (schedule Schedule, err error)
- func (c *Client) CreateServer(name string, dbType databaseType, readonly bool, ...) (server Server, err error)
- func (c *Client) CreateStorage(name string, storageType StorageType, ...) (storage Storage, err error)
- func (c *Client) DeleteRetention(id int) error
- func (c *Client) DeleteSchedule(id int) error
- func (c *Client) DeleteServer(id int) error
- func (c *Client) DeleteStorage(id int) error
- func (c *Client) GetBackupKeys() (body []byte, err error)
- func (c *Client) GetRetention(id int) (retention Retention, err error)
- func (c *Client) GetSchedule(id int) (schedule Schedule, err error)
- func (c *Client) GetServer(id int) (server Server, err error)
- func (c *Client) GetServerInstall(id int) (body []byte, err error)
- func (c *Client) GetStorage(id int) (storage Storage, err error)
- func (c *Client) String() string
- func (c *Client) UpdateRetention(r Retention) error
- func (c *Client) UpdateSchedule(s Schedule) error
- func (c *Client) UpdateServer(s Server) error
- func (c *Client) UpdateStorage(s Storage) error
- type Retention
- type Schedule
- type Server
- type Storage
- type StorageType
Constants ¶
View Source
const ( RETENTION_BY_DAYS retentionType = 1 RETENTION_BY_COUNT retentionType = 2 )
View Source
const ( SCHEDULE_ON_DEMAND scheduleType = 1 SCHEDULE_HOURLY scheduleType = 2 SCHEDULE_DAILY scheduleType = 3 SCHEDULE_WEEKLY scheduleType = 4 SCHEDULE_MONTHLY scheduleType = 5 )
View Source
const ( DB_MYSQL databaseType = 1 DB_MONGO databaseType = 2 DB_POSTGRES databaseType = 3 )
View Source
const ISO_8601_FORMAT = "2006-01-02T15:04:05-0700"
Variables ¶
This section is empty.
Functions ¶
func NewSignedHTTPClient ¶
func ParseDatabaseType ¶
func ParseRetentionType ¶
func ParseScheduleType ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewAPIClient ¶
func (*Client) CreateRetention ¶
func (*Client) CreateSchedule ¶
func (*Client) CreateServer ¶
func (*Client) CreateStorage ¶
func (*Client) DeleteRetention ¶
func (*Client) DeleteSchedule ¶
func (*Client) DeleteServer ¶
func (*Client) DeleteStorage ¶
func (*Client) GetBackupKeys ¶
func (*Client) GetRetention ¶
func (*Client) GetServerInstall ¶
func (*Client) UpdateRetention ¶
func (*Client) UpdateSchedule ¶
func (*Client) UpdateServer ¶
func (*Client) UpdateStorage ¶
type Retention ¶
type Retention struct { ID int `json:"id"` Name string `json:"name"` RetentionType retentionType `json:"retentionType"` Count int `json:"count"` }
func (Retention) JSONString ¶
type Schedule ¶
type Schedule struct { ID int `json:"id"` Name string `json:"name"` ScheduleType scheduleType `json:"scheduleType"` ScheduleHours string `json:"scheduleHours"` ScheduleDays string `json:"scheduleDays"` }
func (Schedule) JSONString ¶
type Server ¶
type Server struct { ID int `json:"id"` Name string `json:"name"` DbType databaseType `json:"dbTypeId"` Readonly bool `json:"readonly"` DbHost string `json:"dbHost"` DbPort string `json:"dbPort"` DbUser string `json:"dbUser"` DbPass string `json:"dbPass"` }
func (Server) JSONString ¶
type Storage ¶
type Storage struct { ID int `json:"id"` Name string `json:"name"` StorageType StorageType `json:"storageType"` LocalPath string `json:"localPath"` Bucket string `json:"bucket"` AccessKey string `json:"storage-access-key"` SecretKey string `json:"storage-secret-key"` RegionEndpoint string `json:"region-endpoint"` }
func (Storage) JSONString ¶
type StorageType ¶
type StorageType int
const ( STORAGE_LOCAL StorageType = 1 STORAGE_S3 StorageType = 2 STORAGE_GOOGLE StorageType = 5 STORAGE_DIGITALOCEAN StorageType = 6 STORAGE_ALIBABA StorageType = 7 )
func ParseStorageType ¶
func ParseStorageType(s string) (StorageType, error)
func (StorageType) String ¶
func (s StorageType) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.