Documentation ¶
Index ¶
- type Agent
- type AgentFilter
- type Archive
- type ArchiveFilter
- type AuthID
- type AuthMethod
- type AuthProvider
- type AuthToken
- type BacklogStatus
- type Bucket
- type Client
- func (c *Client) ApplyFixup(id string) (Response, error)
- 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) CancelTask(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(in *Archive) (*Archive, error)
- func (c *Client) CreateAuthToken(t *AuthToken) (*AuthToken, error)
- func (c *Client) CreateJob(job *Job) (*Job, error)
- func (c *Client) CreateTarget(in *Target) (*Target, error)
- func (c *Client) CreateTask(in *Task) (*Task, 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) DeleteAgent(in *Agent) (Response, error)
- func (c *Client) DeleteArchive(in *Archive) (Response, error)
- func (c *Client) DeleteJob(in *Job) (Response, error)
- func (c *Client) DeleteSession(in *Session) (Response, error)
- func (c *Client) DeleteTarget(in *Target, force bool) (Response, error)
- func (c *Client) DeleteUser(in *User) (Response, error)
- func (c *Client) Export(task string) (io.Reader, error)
- func (c *Client) FindAgent(q string, fuzzy bool) (*Agent, error)
- func (c *Client) FindArchive(q string, fuzzy bool) (*Archive, error)
- func (c *Client) FindBucket(q string, fuzzy bool) (*Bucket, error)
- func (c *Client) FindBuckets(q string, fuzzy bool) ([]*Bucket, error)
- func (c *Client) FindJob(q string, fuzzy bool) (*Job, error)
- func (c *Client) FindTarget(q string, fuzzy bool) (*Target, error)
- func (c *Client) FindTask(q string, fuzzy bool) (*Task, error)
- func (c *Client) FindUser(q string, fuzzy bool) (*User, error)
- func (c *Client) GetAgent(uuid string) (*Agent, error)
- func (c *Client) GetArchive(uuid string) (*Archive, error)
- func (c *Client) GetBucket(key string) (*Bucket, error)
- func (c *Client) GetFixup(id string) (*Fixup, error)
- func (c *Client) GetJob(uuid string) (*Job, error)
- func (c *Client) GetSession(uuid string) (*Session, error)
- func (c *Client) GetTarget(uuid string) (*Target, error)
- func (c *Client) GetTask(uuid string) (*Task, error)
- func (c *Client) GetUser(uuid string) (*User, error)
- func (c *Client) GlobalStatus() (*Status, error)
- func (c *Client) HideAgent(in *Agent) (Response, error)
- func (c *Client) Import(task, key string, in io.Reader) error
- func (c *Client) Info() (*Info, error)
- func (c *Client) ListAgents(filter *AgentFilter) ([]*Agent, error)
- func (c *Client) ListArchives(filter *ArchiveFilter) ([]*Archive, error)
- func (c *Client) ListAuthTokens() ([]*AuthToken, error)
- func (c *Client) ListBuckets() ([]*Bucket, error)
- func (c *Client) ListFixups(filter *FixupFilter) ([]*Fixup, error)
- func (c *Client) ListJobs(filter *JobFilter) ([]*Job, error)
- func (c *Client) ListSessions(filter *SessionFilter) ([]*Session, error)
- func (c *Client) ListTargets(filter *TargetFilter) ([]*Target, error)
- func (c *Client) ListTasks(filter *TaskFilter) ([]*Task, error)
- func (c *Client) ListUsers(filter *UserFilter) ([]*User, error)
- func (c *Client) Lock() error
- func (c *Client) Logout() error
- func (c *Client) PauseJob(job *Job) (Response, error)
- func (c *Client) RestoreArchive(a *Archive, t *Target) (*Task, error)
- func (c *Client) RevokeAuthToken(t *AuthToken) error
- func (c *Client) RunJob(job *Job) (Response, error)
- func (c *Client) SchedulerStatus() (*SchedulerStatus, error)
- func (c *Client) ShowAgent(in *Agent) (Response, error)
- func (c *Client) StreamEvents(fn func(Event)) error
- func (c *Client) Unlock(master string) error
- func (c *Client) UnpauseJob(job *Job) (Response, error)
- func (c *Client) UpdateArchive(in *Archive) (*Archive, error)
- func (c *Client) UpdateJob(job *Job) (*Job, error)
- func (c *Client) UpdateTarget(in *Target) (*Target, error)
- func (c *Client) UpdateTask(in *Task) (*Task, error)
- func (c *Client) UpdateUser(in *User) (*User, error)
- type Config
- type Core
- type Error
- type Event
- type Fixup
- type FixupFilter
- type Info
- type Job
- type JobFilter
- type LocalAuth
- type Plugin
- type Response
- type SchedulerStatus
- type Session
- type SessionFilter
- type Status
- type StatusHealth
- type StatusJobs
- type StatusStats
- type StatusStorage
- type Target
- type TargetFilter
- type Task
- type TaskFilter
- 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 Agent ¶
type Agent struct { UUID string `json:"uuid"` Name string `json:"name"` Address string `json:"address"` Version string `json:"version"` Status string `json:"status"` Hidden bool `json:"hidden"` LastSeenAt int64 `json:"last_seen_at"` LastCheckedAt int64 `json:"last_checked_at"` LastError string `json:"last_error"` Metadata map[string]interface{} `json:"metadata"` Problems []string `json:"problems"` }
type AgentFilter ¶
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"` Is struct { System struct { Admin bool `json:"admin"` Manager bool `json:"manager"` Engineer bool `json:"engineer"` Operator bool `json:"operator"` } `json:"system"` } `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"` 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) DeleteTarget ¶
func (*Client) GlobalStatus ¶
func (*Client) ListAgents ¶
func (c *Client) ListAgents(filter *AgentFilter) ([]*Agent, error)
func (*Client) ListArchives ¶
func (c *Client) ListArchives(filter *ArchiveFilter) ([]*Archive, error)
func (*Client) ListAuthTokens ¶
func (*Client) ListBuckets ¶
func (*Client) ListFixups ¶
func (c *Client) ListFixups(filter *FixupFilter) ([]*Fixup, error)
func (*Client) ListSessions ¶
func (c *Client) ListSessions(filter *SessionFilter) ([]*Session, error)
func (*Client) ListTargets ¶
func (c *Client) ListTargets(filter *TargetFilter) ([]*Target, error)
func (*Client) RestoreArchive ¶
func (*Client) RevokeAuthToken ¶
func (*Client) SchedulerStatus ¶
func (c *Client) SchedulerStatus() (*SchedulerStatus, error)
func (*Client) StreamEvents ¶
type Config ¶
func ReadConfig ¶
type Error ¶
type FixupFilter ¶
type FixupFilter struct { }
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:"last_task_status"` LastRun int64 `json:"last_run"` 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"` Bucket string `json:"bucket"` AgentHost string `json:"-"` AgentPort int `json:"-"` }
type Plugin ¶
func ParseAgentMetadata ¶
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 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 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"` 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"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.