Documentation
¶
Index ¶
- Variables
- func NotFound(e error) bool
- type DB
- type Mock
- 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
Constants ¶
This section is empty.
Variables ¶
View Source
var NotFoundError = errors.New("NotFound")
Functions ¶
Types ¶
type DB ¶
type DB struct {
Sessions map[string]*types.Session `json:"sessions"`
Instances map[string]*types.Instance `json:"instances"`
Clients map[string]*types.Client `json:"clients"`
WindowsInstances map[string]*types.WindowsInstance `json:"windows_instances"`
LoginRequests map[string]*types.LoginRequest `json:"login_requests"`
Users map[string]*types.User `json:"user"`
Playgrounds map[string]*types.Playground `json:"playgrounds"`
WindowsInstancesBySessionId map[string][]string `json:"windows_instances_by_session_id"`
InstancesBySessionId map[string][]string `json:"instances_by_session_id"`
ClientsBySessionId map[string][]string `json:"clients_by_session_id"`
UsersByProvider map[string]string `json:"users_by_providers"`
}
type Mock ¶
func (*Mock) ClientCount ¶
func (*Mock) ClientDelete ¶
func (*Mock) ClientFindBySessionId ¶
func (*Mock) InstanceCount ¶
func (*Mock) InstanceDelete ¶
func (*Mock) InstanceFindBySessionId ¶
func (*Mock) LoginRequestDelete ¶
func (*Mock) LoginRequestGet ¶
func (m *Mock) LoginRequestGet(id string) (*types.LoginRequest, error)
func (*Mock) LoginRequestPut ¶
func (m *Mock) LoginRequestPut(loginRequest *types.LoginRequest) error
func (*Mock) PlaygroundGet ¶
func (m *Mock) PlaygroundGet(id string) (*types.Playground, error)
func (*Mock) PlaygroundGetAll ¶
func (m *Mock) PlaygroundGetAll() ([]*types.Playground, error)
func (*Mock) PlaygroundPut ¶
func (m *Mock) PlaygroundPut(playground *types.Playground) error
func (*Mock) SessionCount ¶
func (*Mock) SessionDelete ¶
func (*Mock) UserFindByProvider ¶
func (*Mock) WindowsInstanceDelete ¶
func (*Mock) WindowsInstanceGetAll ¶
func (m *Mock) WindowsInstanceGetAll() ([]*types.WindowsInstance, error)
func (*Mock) WindowsInstancePut ¶
func (m *Mock) WindowsInstancePut(instance *types.WindowsInstance) error
type StorageApi ¶
type StorageApi interface {
SessionGet(id string) (*types.Session, error)
SessionGetAll() ([]*types.Session, error)
SessionPut(session *types.Session) error
SessionDelete(id string) error
SessionCount() (int, error)
InstanceGet(name string) (*types.Instance, error)
InstancePut(instance *types.Instance) error
InstanceDelete(name string) error
InstanceCount() (int, error)
InstanceFindBySessionId(sessionId string) ([]*types.Instance, error)
WindowsInstanceGetAll() ([]*types.WindowsInstance, error)
WindowsInstancePut(instance *types.WindowsInstance) error
WindowsInstanceDelete(id string) error
ClientGet(id string) (*types.Client, error)
ClientPut(client *types.Client) error
ClientDelete(id string) error
ClientCount() (int, error)
ClientFindBySessionId(sessionId string) ([]*types.Client, error)
LoginRequestPut(loginRequest *types.LoginRequest) error
LoginRequestGet(id string) (*types.LoginRequest, error)
LoginRequestDelete(id string) error
UserFindByProvider(providerName, providerUserId string) (*types.User, error)
UserPut(user *types.User) error
UserGet(id string) (*types.User, error)
PlaygroundPut(playground *types.Playground) error
PlaygroundGet(id string) (*types.Playground, error)
PlaygroundGetAll() ([]*types.Playground, error)
}
func NewFileStorage ¶
func NewFileStorage(path string) (StorageApi, error)
Click to show internal directories.
Click to hide internal directories.