Documentation
¶
Index ¶
- type Archive
- type ArchiveFilter
- type AuthID
- type AuthMethod
- type AuthProvider
- type AuthToken
- type BacklogStatus
- type Client
- func (c *Client) AuthID() (*AuthID, error)
- func (c *Client) AuthProvider(id string) (*AuthProvider, error)
- func (c *Client) AuthProviderAnonymous(id string) (*AuthProvider, error)
- func (c *Client) AuthProviders() ([]*AuthProvider, error)
- func (c *Client) Authenticate(auth AuthMethod) error
- func (c *Client) Banish(tenant *Tenant, users []*User) (Response, error)
- func (c *Client) CancelTask(parent *Tenant, in *Task) (Response, error)
- func (c *Client) ChangePassword(oldpw, newpw string) (Response, error)
- func (c *Client) CheckTimespec(spec string) (bool, string, error)
- func (c *Client) CreateArchive(parent *Tenant, in *Archive) (*Archive, error)
- func (c *Client) CreateAuthToken(t *AuthToken) (*AuthToken, error)
- func (c *Client) CreateGlobalStore(in *Store) (*Store, error)
- func (c *Client) CreateJob(parent *Tenant, job *Job) (*Job, error)
- func (c *Client) CreateStore(parent *Tenant, in *Store) (*Store, error)
- func (c *Client) CreateTarget(parent *Tenant, in *Target) (*Target, error)
- func (c *Client) CreateTask(parent *Tenant, in *Task) (*Task, error)
- func (c *Client) CreateTenant(in *Tenant) (*Tenant, error)
- func (c *Client) CreateUser(in *User) (*User, error)
- func (c *Client) Curl(method, path, body string) (int, string, error)
- func (c *Client) Debugf(s string, args ...interface{})
- func (c *Client) DeleteArchive(parent *Tenant, in *Archive) (Response, error)
- func (c *Client) DeleteGlobalStore(in *Store) (Response, error)
- func (c *Client) DeleteJob(parent *Tenant, in *Job) (Response, error)
- func (c *Client) DeleteSession(in *Session) (Response, error)
- func (c *Client) DeleteStore(parent *Tenant, in *Store) (Response, error)
- func (c *Client) DeleteTarget(parent *Tenant, in *Target) (Response, error)
- func (c *Client) DeleteTenant(in *Tenant, recurse bool) (Response, error)
- func (c *Client) DeleteUser(in *User) (Response, error)
- func (c *Client) FindArchive(tenant *Tenant, q string, fuzzy bool) (*Archive, error)
- func (c *Client) FindGlobalStore(q string, fuzzy bool) (*Store, error)
- func (c *Client) FindJob(tenant *Tenant, q string, fuzzy bool) (*Job, error)
- func (c *Client) FindMyTenant(q string, fuzzy bool) (*Tenant, error)
- func (c *Client) FindStore(tenant *Tenant, q string, fuzzy bool) (*Store, error)
- func (c *Client) FindTarget(tenant *Tenant, q string, fuzzy bool) (*Target, error)
- func (c *Client) FindTenant(q string, fuzzy bool) (*Tenant, error)
- func (c *Client) FindUsableStore(tenant *Tenant, q string, fuzzy bool) (*Store, error)
- func (c *Client) FindUser(q string, fuzzy bool) (*User, error)
- func (c *Client) GetArchive(parent *Tenant, uuid string) (*Archive, error)
- func (c *Client) GetGlobalStore(uuid string) (*Store, error)
- func (c *Client) GetJob(parent *Tenant, uuid string) (*Job, error)
- func (c *Client) GetMyTenants() ([]*Tenant, error)
- func (c *Client) GetSession(uuid string) (*Session, error)
- func (c *Client) GetStore(parent *Tenant, uuid string) (*Store, error)
- func (c *Client) GetTarget(parent *Tenant, uuid string) (*Target, error)
- func (c *Client) GetTask(parent *Tenant, uuid string) (*Task, error)
- func (c *Client) GetTenant(uuid string) (*Tenant, error)
- func (c *Client) GetUser(uuid string) (*User, error)
- func (c *Client) GlobalStatus() (*Status, error)
- func (c *Client) Info() (*Info, error)
- func (c *Client) Initialize(master string) (string, error)
- func (c *Client) Invite(tenant *Tenant, role string, users []*User) (Response, error)
- func (c *Client) ListArchives(parent *Tenant, filter *ArchiveFilter) ([]*Archive, error)
- func (c *Client) ListAuthTokens() ([]*AuthToken, error)
- func (c *Client) ListGlobalStores(filter *StoreFilter) ([]*Store, error)
- func (c *Client) ListJobs(parent *Tenant, filter *JobFilter) ([]*Job, error)
- func (c *Client) ListSessions(filter *SessionFilter) ([]*Session, error)
- func (c *Client) ListStores(parent *Tenant, filter *StoreFilter) ([]*Store, error)
- func (c *Client) ListTargets(parent *Tenant, filter *TargetFilter) ([]*Target, error)
- func (c *Client) ListTasks(parent *Tenant, filter *TaskFilter) ([]*Task, error)
- func (c *Client) ListTenants(filter *TenantFilter) ([]*Tenant, error)
- func (c *Client) ListUsers(filter *UserFilter) ([]*User, error)
- func (c *Client) Lock() error
- func (c *Client) Logout() error
- func (c *Client) PauseJob(parent *Tenant, job *Job) (Response, error)
- func (c *Client) Rekey(oldmaster, newmaster string, rotateFixed bool) (string, error)
- func (c *Client) RestoreArchive(parent *Tenant, a *Archive, t *Target) (*Task, error)
- func (c *Client) RevokeAuthToken(t *AuthToken) error
- func (c *Client) RunJob(parent *Tenant, job *Job) (Response, error)
- func (c *Client) SchedulerStatus() (*SchedulerStatus, error)
- func (c *Client) SplitKey(s string, n int) string
- func (c *Client) StreamEvents(fn func(Event)) error
- func (c *Client) TenantStatus(tenant *Tenant) (*Status, error)
- func (c *Client) Unlock(master string) error
- func (c *Client) UnpauseJob(parent *Tenant, job *Job) (Response, error)
- func (c *Client) UpdateArchive(parent *Tenant, in *Archive) (*Archive, error)
- func (c *Client) UpdateGlobalStore(in *Store) (*Store, error)
- func (c *Client) UpdateJob(parent *Tenant, job *Job) (*Job, error)
- func (c *Client) UpdateStore(parent *Tenant, in *Store) (*Store, error)
- func (c *Client) UpdateTarget(parent *Tenant, in *Target) (*Target, error)
- func (c *Client) UpdateTask(parent *Tenant, in *Task) (*Task, error)
- func (c *Client) UpdateTenant(in *Tenant) (*Tenant, error)
- func (c *Client) UpdateUser(in *User) (*User, error)
- type Error
- type Event
- type Info
- type Job
- type JobFilter
- type LocalAuth
- type Response
- type SchedulerStatus
- type Session
- type SessionFilter
- type Status
- type StatusHealth
- type StatusJobs
- type StatusStats
- type StatusStorage
- type Store
- type StoreFilter
- type Target
- type TargetFilter
- type Task
- type TaskFilter
- type Tenant
- type TenantFilter
- type TokenAuth
- type User
- type UserFilter
- type WorkerStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct {
UUID string `json:"uuid,omitempty"`
Key string `json:"key"`
Status string `json:"status"`
Notes string `json:"notes"`
Target *Target `json:"target,omitempty"`
Store *Store `json:"store,omitempty"`
Compression string `json:"compression"`
EncryptionType string `json:"encryption_type"`
Size int64 `json:"size"`
}
type ArchiveFilter ¶
type AuthID ¶
type AuthID struct {
Unauthenticated bool `json:"unauthenticated,omitempty"`
User struct {
Name string `json:"name"`
Account string `json:"account"`
Backend string `json:"backend"`
SysRole string `json:"sysrole"`
} `json:"user"`
Tenants []struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Role string `json:"role"`
} `json:"tenants"`
Tenant struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Role string `json:"role"`
} `json:"tenant"`
Is struct {
System struct {
Admin bool `json:"admin"`
Manager bool `json:"manager"`
Engineer bool `json:"engineer"`
} `json:"system"`
Tenants map[string]struct {
Admin bool `json:"admin"`
Engineer bool `json:"engineer"`
Operator bool `json:"operator"`
} `json:"tenant"`
} `json:"is"`
}
type AuthMethod ¶
type AuthProvider ¶
type BacklogStatus ¶
type BacklogStatus struct {
Priority int `json:"priority"`
Position int `json:"position"`
TaskUUID string `json:"task_uuid"`
Op string `json:"op"`
Agent string `json:"agent"`
Tenant *struct {
UUID string `json:"uuid"`
Name string `json:"name"`
} `json:"tenant,omitempty"`
Store *struct {
UUID string `json:"uuid"`
Name string `json:"name"`
} `json:"store,omitempty"`
System *struct {
UUID string `json:"uuid"`
Name string `json:"name"`
} `json:"system,omitempty"`
Job *struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Schedule string `json:"schedule"`
} `json:"job,omitempty"`
Archive *struct {
UUID string `json:"uuid"`
Size int64 `json:"size"`
} `json:"archive,omitempty"`
}
type Client ¶
type Client struct {
URL string
Debug bool
Trace bool
InsecureSkipVerify bool
TrustSystemCAs bool
CACertificate string
Timeout int
Session string
// contains filtered or unexported fields
}
func (*Client) AuthProvider ¶
func (c *Client) AuthProvider(id string) (*AuthProvider, error)
func (*Client) AuthProviderAnonymous ¶
func (c *Client) AuthProviderAnonymous(id string) (*AuthProvider, error)
func (*Client) AuthProviders ¶
func (c *Client) AuthProviders() ([]*AuthProvider, error)
func (*Client) Authenticate ¶
func (c *Client) Authenticate(auth AuthMethod) error
func (*Client) ChangePassword ¶
func (*Client) CreateArchive ¶
func (*Client) CreateStore ¶
func (*Client) CreateTarget ¶
func (*Client) DeleteArchive ¶
func (*Client) DeleteStore ¶
func (*Client) DeleteTarget ¶
func (*Client) DeleteTenant ¶
func (*Client) FindArchive ¶
func (*Client) FindGlobalStore ¶
func (*Client) FindTarget ¶
func (*Client) FindUsableStore ¶
func (*Client) GetArchive ¶
func (*Client) GetMyTenants ¶
func (*Client) GlobalStatus ¶
func (*Client) ListArchives ¶
func (c *Client) ListArchives(parent *Tenant, filter *ArchiveFilter) ([]*Archive, error)
func (*Client) ListAuthTokens ¶
func (*Client) ListGlobalStores ¶
func (c *Client) ListGlobalStores(filter *StoreFilter) ([]*Store, error)
func (*Client) ListSessions ¶
func (c *Client) ListSessions(filter *SessionFilter) ([]*Session, error)
func (*Client) ListStores ¶
func (c *Client) ListStores(parent *Tenant, filter *StoreFilter) ([]*Store, error)
func (*Client) ListTargets ¶
func (c *Client) ListTargets(parent *Tenant, filter *TargetFilter) ([]*Target, error)
func (*Client) ListTasks ¶
func (c *Client) ListTasks(parent *Tenant, filter *TaskFilter) ([]*Task, error)
func (*Client) ListTenants ¶
func (c *Client) ListTenants(filter *TenantFilter) ([]*Tenant, error)
func (*Client) RestoreArchive ¶
func (*Client) RevokeAuthToken ¶
func (*Client) SchedulerStatus ¶
func (c *Client) SchedulerStatus() (*SchedulerStatus, error)
func (*Client) StreamEvents ¶
func (*Client) UpdateArchive ¶
func (*Client) UpdateStore ¶
func (*Client) UpdateTarget ¶
type Error ¶
type Job ¶
type Job struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name"`
Summary string `json:"summary"`
Schedule string `json:"schedule"`
KeepDays int `json:"keep_days"`
KeepN int `json:"keep_n"`
Retain string `json:"-"`
Paused bool `json:"paused"`
Agent string `json:"agent"`
LastStatus string `json:"status"`
LastRun int64 `json:"last_run"`
FixedKey bool `json:"fixed_key"`
TargetUUID string `json:"-"`
Target struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Agent string `json:"agent"`
Plugin string `json:"plugin"`
Endpoint string `json:"endpoint,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
} `json:"target"`
StoreUUID string `json:"-"`
Store struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Agent string `json:"agent"`
Plugin string `json:"plugin"`
Summary string `json:"summary"`
Endpoint string `json:"endpoint,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
} `json:"store"`
AgentHost string `json:"-"`
AgentPort int `json:"-"`
}
type SchedulerStatus ¶
type SchedulerStatus struct {
Backlog []BacklogStatus `json:"backlog"`
Workers []WorkerStatus `json:"workers"`
}
type Session ¶
type Session struct {
UUID string `json:"uuid"`
UserUUID string `json:"user_uuid"`
CreatedAt int64 `json:"created_at"`
LastSeen int64 `json:"last_seen_at"`
Token string `json:"token_uuid"`
Name string `json:"name"`
IP string `json:"ip_addr"`
UserAgent string `json:"user_agent"`
UserAccount string `json:"user_account"`
CurrentSession bool `json:"current_session"`
}
type SessionFilter ¶
type Status ¶
type Status struct {
Health StatusHealth `json:"health"`
Storage StatusStorage `json:"storage"`
Jobs StatusJobs `json:"jobs"`
Stats StatusStats `json:"stats"`
}
type StatusHealth ¶
type StatusJobs ¶
type StatusStats ¶
type StatusStorage ¶
type StoreFilter ¶
type TargetFilter ¶
type Task ¶
type Task struct {
UUID string `json:"uuid,omitempty"`
Type string `json:"type"`
Status string `json:"status"`
Owner string `json:"owner"`
StartedAt int64 `json:"started_at"`
StoppedAt int64 `json:"stopped_at"`
RequestedAt int64 `json:"requested_at"`
Log string `json:"log"`
OK bool `json:"ok"`
Notes string `json:"notes"`
Clear string `json:"clear"`
JobUUID string `json:"job_uuid"`
ArchiveUUID string `json:"archive_uuid"`
}
type TaskFilter ¶
type Tenant ¶
type Tenant struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name"`
Members []struct {
UUID string `json:"uuid,omitempty"`
Fuzzy bool `json:"exact:f:t"`
Name string `json:"name"`
Account string `json:"account"`
Backend string `json:"backend"`
Role string `json:"role"`
} `json:"members"`
}
type TenantFilter ¶
type User ¶
type User struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name"`
Account string `json:"account"`
SysRole string `json:"sysrole"`
Password string `json:"password,omitempty"`
Tenants []struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Role string `json:"role"`
} `json:"tenants"`
}
type UserFilter ¶
type WorkerStatus ¶
type WorkerStatus struct {
ID int `json:"id"`
Idle bool `json:"idle"`
TaskUUID string `json:"task_uuid"`
Op string `json:"op"`
Status string `json:"status"`
Agent string `json:"agent"`
Tenant *struct {
UUID string `json:"uuid"`
Name string `json:"name"`
} `json:"tenant,omitempty"`
Store *struct {
UUID string `json:"uuid"`
Name string `json:"name"`
} `json:"store,omitempty"`
System *struct {
UUID string `json:"uuid"`
Name string `json:"name"`
} `json:"system,omitempty"`
Job *struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Schedule string `json:"schedule"`
} `json:"job,omitempty"`
Archive *struct {
UUID string `json:"uuid"`
Size int64 `json:"size"`
} `json:"archive,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.