Versions in this module Expand all Collapse all v0 v0.0.2 Jun 22, 2020 Changes in this version + var NotFoundError = errors.New("NotFound") + func NotFound(e error) bool + type DB struct + Clients map[string]*types.Client + ClientsBySessionId map[string][]string + Instances map[string]*types.Instance + InstancesBySessionId map[string][]string + LoginRequests map[string]*types.LoginRequest + Playgrounds map[string]*types.Playground + Sessions map[string]*types.Session + Users map[string]*types.User + UsersByProvider map[string]string + WindowsInstances map[string]*types.WindowsInstance + WindowsInstancesBySessionId map[string][]string + type Mock struct + func (m *Mock) ClientCount() (int, error) + func (m *Mock) ClientDelete(id string) error + func (m *Mock) ClientFindBySessionId(sessionId string) ([]*types.Client, error) + func (m *Mock) ClientGet(id string) (*types.Client, error) + func (m *Mock) ClientPut(client *types.Client) error + func (m *Mock) InstanceCount() (int, error) + func (m *Mock) InstanceDelete(name string) error + func (m *Mock) InstanceFindBySessionId(sessionId string) ([]*types.Instance, error) + func (m *Mock) InstanceGet(name string) (*types.Instance, error) + func (m *Mock) InstancePut(instance *types.Instance) error + func (m *Mock) LoginRequestDelete(id string) error + func (m *Mock) LoginRequestGet(id string) (*types.LoginRequest, error) + func (m *Mock) LoginRequestPut(loginRequest *types.LoginRequest) error + func (m *Mock) PlaygroundGet(id string) (*types.Playground, error) + func (m *Mock) PlaygroundGetAll() ([]*types.Playground, error) + func (m *Mock) PlaygroundPut(playground *types.Playground) error + func (m *Mock) SessionCount() (int, error) + func (m *Mock) SessionDelete(id string) error + func (m *Mock) SessionGet(id string) (*types.Session, error) + func (m *Mock) SessionGetAll() ([]*types.Session, error) + func (m *Mock) SessionPut(session *types.Session) error + func (m *Mock) UserFindByProvider(providerName, providerUserId string) (*types.User, error) + func (m *Mock) UserGet(id string) (*types.User, error) + func (m *Mock) UserPut(user *types.User) error + func (m *Mock) WindowsInstanceDelete(id string) error + func (m *Mock) WindowsInstanceGetAll() ([]*types.WindowsInstance, error) + func (m *Mock) WindowsInstancePut(instance *types.WindowsInstance) error + type StorageApi interface + ClientCount func() (int, error) + ClientDelete func(id string) error + ClientFindBySessionId func(sessionId string) ([]*types.Client, error) + ClientGet func(id string) (*types.Client, error) + ClientPut func(client *types.Client) error + InstanceCount func() (int, error) + InstanceDelete func(name string) error + InstanceFindBySessionId func(sessionId string) ([]*types.Instance, error) + InstanceGet func(name string) (*types.Instance, error) + InstancePut func(instance *types.Instance) error + LoginRequestDelete func(id string) error + LoginRequestGet func(id string) (*types.LoginRequest, error) + LoginRequestPut func(loginRequest *types.LoginRequest) error + PlaygroundGet func(id string) (*types.Playground, error) + PlaygroundGetAll func() ([]*types.Playground, error) + PlaygroundPut func(playground *types.Playground) error + SessionCount func() (int, error) + SessionDelete func(id string) error + SessionGet func(id string) (*types.Session, error) + SessionGetAll func() ([]*types.Session, error) + SessionPut func(session *types.Session) error + UserFindByProvider func(providerName, providerUserId string) (*types.User, error) + UserGet func(id string) (*types.User, error) + UserPut func(user *types.User) error + WindowsInstanceDelete func(id string) error + WindowsInstanceGetAll func() ([]*types.WindowsInstance, error) + WindowsInstancePut func(instance *types.WindowsInstance) error + func NewFileStorage(path string) (StorageApi, error)