Documentation ¶
Index ¶
- type Client
- type ClientAdapter
- func (a *ClientAdapter) AppServices(names []string) ([]*client.AppInfo, error)
- func (a *ClientAdapter) Conf(name string) (map[string]interface{}, error)
- func (a *ClientAdapter) List(names []string, opts *client.ListOptions) ([]Snap, error)
- func (a *ClientAdapter) SetConf(name string, patch map[string]interface{}) (string, error)
- func (a *ClientAdapter) SetProxy(http, https, ftp string) error
- type Snap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { AppServices(names []string) ([]*client.AppInfo, error) Conf(name string) (map[string]interface{}, error) List(names []string, opts *client.ListOptions) ([]Snap, error) SetConf(name string, patch map[string]interface{}) (string, error) SetProxy(http, https, ftp string) error }
Client is a client of the snapd REST API
type ClientAdapter ¶
type ClientAdapter struct {
// contains filtered or unexported fields
}
ClientAdapter adapts our expectations to the snapd client API.
func NewClientAdapter ¶
func NewClientAdapter() *ClientAdapter
NewClientAdapter creates a new ClientAdapter as a singleton
func (*ClientAdapter) AppServices ¶
func (a *ClientAdapter) AppServices(names []string) ([]*client.AppInfo, error)
AppServices requests the status of the application services
func (*ClientAdapter) Conf ¶
func (a *ClientAdapter) Conf(name string) (map[string]interface{}, error)
Conf gets the snap's current configuration
func (*ClientAdapter) List ¶
func (a *ClientAdapter) List(names []string, opts *client.ListOptions) ([]Snap, error)
List returns the list of all snaps installed on the system with names in the given list; if the list is empty, all snaps.
func (*ClientAdapter) SetConf ¶
func (a *ClientAdapter) SetConf(name string, patch map[string]interface{}) (string, error)
SetConf requests a snap to apply the provided patch to the configuration
func (*ClientAdapter) SetProxy ¶
func (a *ClientAdapter) SetProxy(http, https, ftp string) error
SetProxy sets the proxy configuration
type Snap ¶
type Snap struct { Name string `json:"name"` Title string `json:"title"` Summary string `json:"summary"` Description string `json:"description"` InstalledSize int64 `json:"installedSize"` InstalledDate time.Time `json:"installedDate"` Status string `json:"status"` Channel string `json:"channel"` Confinement string `json:"confinement"` Version string `json:"version"` Revision int `json:"revision"` Devmode bool `json:"devmode"` Config string `json:"config"` }
Snap holds the details of snap on a device
Click to show internal directories.
Click to hide internal directories.