Documentation
¶
Index ¶
- Constants
- func MockLxdServerInfo(f func(ctx context.Context) (*api.Resources, error)) func()
- func MockWorkshopFs(f func(conn lxd.InstanceServer, pid, w string) (fsutil.Fs, error)) func()
- type Backend
- func (b *Backend) Initialize() error
- func (b *Backend) Name() interfaces.SecuritySystem
- func (b *Backend) NewSpecification(user string, sdk string) (interfaces.Specification, error)
- func (b *Backend) Remove(ctx context.Context, sdkRef sdk.Ref) error
- func (b *Backend) Setup(ctx context.Context, sdkRef sdk.Ref, repo *interfaces.Repository) error
- type Specification
- func (s *Specification) AddConnectedPlug(iface interfaces.Interface, plug *interfaces.ConnectedPlug, ...) error
- func (s *Specification) AddConnectedSlot(iface interfaces.Interface, plug *interfaces.ConnectedPlug, ...) error
- func (s *Specification) AddCustomDevice(device workshop.CustomDevice) error
- func (s *Specification) AddMountEntry(dev workshop.Mount) error
- func (s *Specification) AddPermanentPlug(iface interfaces.Interface, plug *sdk.PlugInfo) error
- func (s *Specification) AddPermanentSlot(iface interfaces.Interface, slot *sdk.SlotInfo) error
- func (s *Specification) AddTunnelEntry(tunnel workshop.Tunnel) error
- func (s *Specification) SetCamera(camera workshop.Camera) error
- func (s *Specification) SetDesktop(desktop workshop.Desktop) error
- func (s *Specification) SetGpu(gpu workshop.Gpu) error
- func (s *Specification) SetSshAgent(agent workshop.SshAgent) error
Constants ¶
View Source
const (
LxdSock = "/var/snap/lxd/common/lxd/unix.socket"
)
Variables ¶
This section is empty.
Functions ¶
func MockLxdServerInfo ¶
MockLxdServerInfo replaces the LXD server info function used by NewSpecification and returns a restore function.
func MockWorkshopFs ¶
Types ¶
type Backend ¶
type Backend struct {
}
func (*Backend) Initialize ¶
func (*Backend) Name ¶
func (b *Backend) Name() interfaces.SecuritySystem
Name returns the name of the backend.
func (*Backend) NewSpecification ¶
func (b *Backend) NewSpecification(user string, sdk string) (interfaces.Specification, error)
NewSpecification returns a new SDK specification.
func (*Backend) Remove ¶
Remove removes profile of a given sdk.
This method should be called after removing a sdk.
func (*Backend) Setup ¶
func (b *Backend) Setup(ctx context.Context, sdkRef sdk.Ref, repo *interfaces.Repository) error
Setup creates mount profile specific to a given sdk.
type Specification ¶
type Specification struct {
Profile workshop.SdkProfile
User *user.User
Environment map[string]string
// contains filtered or unexported fields
}
func NewSpecification ¶
func NewSpecification(user string, sdk string) (*Specification, error)
func (*Specification) AddConnectedPlug ¶
func (s *Specification) AddConnectedPlug(iface interfaces.Interface, plug *interfaces.ConnectedPlug, slot *interfaces.ConnectedSlot) error
AddConnectedPlug records side-effects of having a connected plug.
func (*Specification) AddConnectedSlot ¶
func (s *Specification) AddConnectedSlot(iface interfaces.Interface, plug *interfaces.ConnectedPlug, slot *interfaces.ConnectedSlot) error
AddConnectedSlot records side-effects of having a connected slot.
func (*Specification) AddCustomDevice ¶ added in v0.9.1
func (s *Specification) AddCustomDevice(device workshop.CustomDevice) error
func (*Specification) AddMountEntry ¶
func (s *Specification) AddMountEntry(dev workshop.Mount) error
func (*Specification) AddPermanentPlug ¶
func (s *Specification) AddPermanentPlug(iface interfaces.Interface, plug *sdk.PlugInfo) error
AddPermanentPlug records side-effects of having a plug.
func (*Specification) AddPermanentSlot ¶
func (s *Specification) AddPermanentSlot(iface interfaces.Interface, slot *sdk.SlotInfo) error
AddPermanentSlot records side-effects of having a slot.
func (*Specification) AddTunnelEntry ¶
func (s *Specification) AddTunnelEntry(tunnel workshop.Tunnel) error
func (*Specification) SetDesktop ¶
func (s *Specification) SetDesktop(desktop workshop.Desktop) error
func (*Specification) SetSshAgent ¶
func (s *Specification) SetSshAgent(agent workshop.SshAgent) error
Click to show internal directories.
Click to hide internal directories.