Documentation ¶
Index ¶
- Constants
- Variables
- func GetBool(b *bool) bool
- func GetInt(i *int) int
- func GetString(s *string) string
- type AdminDesktop
- type Client
- func (c *Client) AdminDesktopList(ctx context.Context) ([]*AdminDesktop, error)
- func (c *Client) AdminGroupCreate(ctx context.Context, ...) (*Group, error)
- func (c *Client) AdminHypervisorOnlyForced(ctx context.Context, id string, onlyForced bool) error
- func (c *Client) AdminHypervisorUpdate(ctx context.Context, h *Hypervisor) error
- func (c *Client) AdminTemplateList(ctx context.Context) ([]*Template, error)
- func (c *Client) AdminUserCreate(ctx context.Context, ...) (*User, error)
- func (c *Client) AdminUserDelete(ctx context.Context, id string) error
- func (c *Client) AdminUserList(ctx context.Context) ([]*User, error)
- func (c *Client) AuthForm(ctx context.Context, category, usr, pwd string) (string, error)
- func (c *Client) DesktopCreate(ctx context.Context, name, templateID string) (*Desktop, error)
- func (c *Client) DesktopCreateFromScratch(ctx context.Context, name string, xml string) (*Desktop, error)
- func (c *Client) DesktopDelete(ctx context.Context, id string) error
- func (c *Client) DesktopGet(ctx context.Context, id string) (*Desktop, error)
- func (c *Client) DesktopList(ctx context.Context) ([]*Desktop, error)
- func (c *Client) DesktopStart(ctx context.Context, id string) error
- func (c *Client) DesktopStop(ctx context.Context, id string) error
- func (c *Client) DesktopUpdate(ctx context.Context, id string, opts DesktopUpdateOptions) error
- func (c *Client) DesktopViewer(ctx context.Context, t DesktopViewer, id string) (string, error)
- func (c *Client) HypervisorGet(ctx context.Context, id string) (*Hypervisor, error)
- func (c *Client) HypervisorList(ctx context.Context) ([]*Hypervisor, error)
- func (c *Client) Maintenance(ctx context.Context) (bool, error)
- func (c *Client) OrchestratorHypervisorAddToDeadRow(ctx context.Context, id string) (time.Time, error)
- func (c *Client) OrchestratorHypervisorGet(ctx context.Context, id string) (*OrchestratorHypervisor, error)
- func (c *Client) OrchestratorHypervisorList(ctx context.Context) ([]*OrchestratorHypervisor, error)
- func (c *Client) OrchestratorHypervisorManage(ctx context.Context, id string) error
- func (c *Client) OrchestratorHypervisorRemoveFromDeadRow(ctx context.Context, id string) error
- func (c *Client) OrchestratorHypervisorStopDesktops(ctx context.Context, id string) error
- func (c *Client) OrchestratorHypervisorUnmanage(ctx context.Context, id string) error
- func (c *Client) SetBeforeRequestHook(hook func(*Client) error)
- func (c *Client) SetToken(tkn string)
- func (c *Client) StatsCategoryList(ctx context.Context) ([]*StatsCategory, error)
- func (c *Client) StatsDeploymentByCategory(ctx context.Context) ([]*StatsDeploymentByCategory, error)
- func (c *Client) StatsDesktops(ctx context.Context) ([]*StatsDesktop, error)
- func (c *Client) StatsHypervisors(ctx context.Context) ([]*StatsHypervisor, error)
- func (c *Client) StatsTemplates(ctx context.Context) ([]*StatsTemplate, error)
- func (c *Client) StatsUsers(ctx context.Context) ([]*StatsUser, error)
- func (c *Client) TemplateCreateFromDesktop(ctx context.Context, name string, desktopID string) (*Template, error)
- func (c *Client) TemplateList(ctx context.Context) ([]*Template, error)
- func (c *Client) URL() *url.URL
- func (c *Client) UserOwnsDesktop(ctx context.Context, opts *UserOwnsDesktopOpts) error
- func (c *Client) UserVPN(ctx context.Context) (string, error)
- func (c *Client) Version(ctx context.Context) (string, error)
- type Desktop
- type DesktopUpdateOptions
- type DesktopViewer
- type DesktopViewerRsp
- type Err
- type Group
- type Hypervisor
- type HypervisorStatus
- type Interface
- type OrchestratorHypervisor
- type OrchestratorHypervisorStats
- type OrchestratorHypervisorStatsCPU
- type OrchestratorHypervisorStatsMem
- type OrchestratorResourceLoad
- type StatsCategory
- type StatsDeploymentByCategory
- type StatsDesktop
- type StatsHypervisor
- type StatsTemplate
- type StatsUser
- type Template
- type User
- type UserOwnsDesktopOpts
- type UserVPNRsp
Constants ¶
View Source
const Version = "v0.33.3"
Variables ¶
View Source
var ( ErrNotFound = &Err{ Err: &errNotFoundErr, Msg: &errNotFoundMsg, } ErrForbidden = &Err{ Err: &errForbiddenErr, Msg: &errForbiddenMsg, } )
Functions ¶
Types ¶
type AdminDesktop ¶ added in v0.8.0
type AdminDesktop struct { ID *string `json:"id,omitempty"` State *string `json:"status,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` User *string `json:"user,omitempty"` HypervisorStarted *string `json:"hyp_started,omitempty"` }
TODO: This should be removed when the admin/domains endpoint and the user/desktops endpoints are unified
type Client ¶
type Client struct { BaseURL *url.URL UserAgent string Token string BeforeRequestHook func(*Client) error // contains filtered or unexported fields }
func (*Client) AdminDesktopList ¶ added in v0.8.0
func (c *Client) AdminDesktopList(ctx context.Context) ([]*AdminDesktop, error)
func (*Client) AdminGroupCreate ¶ added in v0.14.0
func (*Client) AdminHypervisorOnlyForced ¶ added in v0.18.0
func (*Client) AdminHypervisorUpdate ¶ added in v0.18.0
func (c *Client) AdminHypervisorUpdate(ctx context.Context, h *Hypervisor) error
func (*Client) AdminTemplateList ¶ added in v0.8.0
func (*Client) AdminUserCreate ¶ added in v0.6.0
func (*Client) AdminUserDelete ¶ added in v0.6.0
func (*Client) AdminUserList ¶ added in v0.6.0
func (*Client) DesktopCreate ¶
func (*Client) DesktopCreateFromScratch ¶
func (*Client) DesktopGet ¶
func (*Client) DesktopUpdate ¶
func (*Client) DesktopViewer ¶
func (*Client) HypervisorGet ¶ added in v0.17.0
func (*Client) HypervisorList ¶
func (c *Client) HypervisorList(ctx context.Context) ([]*Hypervisor, error)
func (*Client) Maintenance ¶ added in v0.16.0
func (*Client) OrchestratorHypervisorAddToDeadRow ¶ added in v0.24.0
func (*Client) OrchestratorHypervisorGet ¶ added in v0.25.0
func (*Client) OrchestratorHypervisorList ¶ added in v0.24.0
func (c *Client) OrchestratorHypervisorList(ctx context.Context) ([]*OrchestratorHypervisor, error)
func (*Client) OrchestratorHypervisorManage ¶ added in v0.24.0
func (*Client) OrchestratorHypervisorRemoveFromDeadRow ¶ added in v0.24.0
func (*Client) OrchestratorHypervisorStopDesktops ¶ added in v0.25.0
func (*Client) OrchestratorHypervisorUnmanage ¶ added in v0.24.0
func (*Client) SetBeforeRequestHook ¶ added in v0.23.1
func (*Client) StatsCategoryList ¶ added in v0.13.0
func (c *Client) StatsCategoryList(ctx context.Context) ([]*StatsCategory, error)
func (*Client) StatsDeploymentByCategory ¶ added in v0.20.0
func (c *Client) StatsDeploymentByCategory(ctx context.Context) ([]*StatsDeploymentByCategory, error)
func (*Client) StatsDesktops ¶ added in v0.28.0
func (c *Client) StatsDesktops(ctx context.Context) ([]*StatsDesktop, error)
func (*Client) StatsHypervisors ¶ added in v0.28.0
func (c *Client) StatsHypervisors(ctx context.Context) ([]*StatsHypervisor, error)
func (*Client) StatsTemplates ¶ added in v0.28.0
func (c *Client) StatsTemplates(ctx context.Context) ([]*StatsTemplate, error)
func (*Client) StatsUsers ¶ added in v0.28.0
func (*Client) TemplateCreateFromDesktop ¶
func (*Client) TemplateList ¶
func (*Client) UserOwnsDesktop ¶ added in v0.32.0
func (c *Client) UserOwnsDesktop(ctx context.Context, opts *UserOwnsDesktopOpts) error
type DesktopUpdateOptions ¶
type DesktopUpdateOptions struct {
ForcedHyp []string `json:"forced_hyp,omitempty"`
}
type DesktopViewer ¶
type DesktopViewer string
const ( DesktopViewerSpice DesktopViewer = "spice" DesktopViewerVNCBrowser DesktopViewer = "vnc-browser" DesktopViewerRdpGW DesktopViewer = "rdp-gw" DesktopViewerRdpVPN DesktopViewer = "rdp-vpn" DesktopViewerRdpBrowser DesktopViewer = "rdp-browser" )
type DesktopViewerRsp ¶
type Group ¶ added in v0.14.0
type Group struct { ID *string `json:"id,omitempty"` UID *string `json:"uid,omitempty"` Category *string `json:"parent_category,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` ExternalAppID *string `json:"external_app_id,omitempty"` ExternalGID *string `json:"external_gid,omitempty"` }
type Hypervisor ¶
type Hypervisor struct { ID *string `json:"id,omitempty"` URI *string `json:"uri,omitempty"` Status *HypervisorStatus `json:"status,omitempty"` OnlyForced *bool `json:"only_forced,omitempty"` Buffering *bool `json:"buffering_hyper,omitempty"` }
type HypervisorStatus ¶ added in v0.18.0
type HypervisorStatus string
const ( HypervisorStatusOnline HypervisorStatus = "Online" HypervisorStatusOffline HypervisorStatus = "Offline" HypervisorStatusError HypervisorStatus = "Error" HypervisorStatusDeleting HypervisorStatus = "Deleting" )
type Interface ¶ added in v0.19.0
type Interface interface { URL() *url.URL Version(context.Context) (string, error) Maintenance(context.Context) (bool, error) SetBeforeRequestHook(func(*Client) error) AuthForm(ctx context.Context, category, usr, pwd string) (string, error) SetToken(string) UserVPN(context.Context) (string, error) UserOwnsDesktop(context.Context, *UserOwnsDesktopOpts) error AdminUserList(ctx context.Context) ([]*User, error) AdminUserCreate(ctx context.Context, provider, role, category, group, uid, username, pwd string) (*User, error) AdminUserDelete(ctx context.Context, id string) error AdminGroupCreate(ctx context.Context, category, uid, name, description, externalAppID, externalGID string) (*Group, error) AdminDesktopList(context.Context) ([]*AdminDesktop, error) AdminTemplateList(context.Context) ([]*Template, error) AdminHypervisorUpdate(context.Context, *Hypervisor) error AdminHypervisorOnlyForced(ctx context.Context, id string, onlyForced bool) error HypervisorList(context.Context) ([]*Hypervisor, error) HypervisorGet(ctx context.Context, id string) (*Hypervisor, error) DesktopList(context.Context) ([]*Desktop, error) DesktopGet(ctx context.Context, id string) (*Desktop, error) DesktopCreate(ctx context.Context, name, templateID string) (*Desktop, error) DesktopCreateFromScratch(ctx context.Context, name, xml string) (*Desktop, error) DesktopUpdate(ctx context.Context, id string, opts DesktopUpdateOptions) error DesktopDelete(ctx context.Context, id string) error DesktopStart(ctx context.Context, id string) error DesktopStop(ctx context.Context, id string) error DesktopViewer(ctx context.Context, t DesktopViewer, id string) (string, error) TemplateList(context.Context) ([]*Template, error) TemplateCreateFromDesktop(ctx context.Context, name, desktopID string) (*Template, error) StatsCategoryList(context.Context) ([]*StatsCategory, error) StatsDeploymentByCategory(ctx context.Context) ([]*StatsDeploymentByCategory, error) StatsUsers(ctx context.Context) ([]*StatsUser, error) StatsDesktops(ctx context.Context) ([]*StatsDesktop, error) StatsTemplates(ctx context.Context) ([]*StatsTemplate, error) StatsHypervisors(ctx context.Context) ([]*StatsHypervisor, error) OrchestratorHypervisorList(ctx context.Context) ([]*OrchestratorHypervisor, error) OrchestratorHypervisorGet(ctx context.Context, id string) (*OrchestratorHypervisor, error) OrchestratorHypervisorManage(ctx context.Context, id string) error OrchestratorHypervisorUnmanage(ctx context.Context, id string) error OrchestratorHypervisorAddToDeadRow(ctx context.Context, id string) (time.Time, error) OrchestratorHypervisorRemoveFromDeadRow(ctx context.Context, id string) error OrchestratorHypervisorStopDesktops(ctx context.Context, id string) error }
type OrchestratorHypervisor ¶ added in v0.24.0
type OrchestratorHypervisor struct { ID string `json:"id,omitempty"` Status HypervisorStatus `json:"status,omitempty"` OnlyForced bool `json:"only_forced,omitempty"` Buffering bool `json:"buffering_hyper,omitempty"` DestroyTime time.Time `json:"destroy_time,omitempty"` Stats OrchestratorHypervisorStats `json:"stats,omitempty"` MinFreeMemGB int `json:"min_free_mem_gb,omitempty"` OrchestratorManaged bool `json:"orchestrator_managed,omitempty"` DesktopsStarted int `json:"desktops_started,omitempty"` CPU OrchestratorResourceLoad `json:"-"` RAM OrchestratorResourceLoad `json:"-"` }
type OrchestratorHypervisorStats ¶ added in v0.24.0
type OrchestratorHypervisorStats struct { CPUCurrent OrchestratorHypervisorStatsCPU `json:"cpu_current,omitempty"` CPU5Min OrchestratorHypervisorStatsCPU `json:"cpu_5min,omitempty"` Mem OrchestratorHypervisorStatsMem `json:"mem_stats,omitempty"` }
type OrchestratorHypervisorStatsCPU ¶ added in v0.24.0
type OrchestratorHypervisorStatsMem ¶ added in v0.24.0
type OrchestratorResourceLoad ¶ added in v0.24.0
type StatsCategory ¶ added in v0.13.0
type StatsDeploymentByCategory ¶ added in v0.20.0
type StatsDesktop ¶ added in v0.28.0
type StatsHypervisor ¶ added in v0.28.0
type StatsHypervisor struct { ID *string `json:"id,omitempty"` Status *HypervisorStatus `json:"status,omitempty"` OnlyForced *bool `json:"only_forced,omitempty"` }
type StatsTemplate ¶ added in v0.28.0
type StatsTemplate struct {
ID *string `json:"id,omitempty"`
}
type User ¶ added in v0.6.0
type User struct { ID *string `json:"id,omitempty"` Provider *string `json:"provider,omitempty"` Role *string `json:"role,omitempty"` Category *string `json:"category,omitempty"` Group *string `json:"group,omitempty"` UID *string `json:"uid,omitempty"` Username *string `json:"username,omitempty"` Name *string `json:"name,omitempty"` }
type UserOwnsDesktopOpts ¶ added in v0.32.0
type UserVPNRsp ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.