mongo

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	store.Store
	// contains filtered or unexported fields
}

func NewStore

func NewStore(db *mgo.Database) *Store

func (*Store) AddDevice

func (s *Store) AddDevice(ctx context.Context, d models.Device) error

func (*Store) CreateSession

func (s *Store) CreateSession(ctx context.Context, session models.Session) (*models.Session, error)

func (*Store) DeactivateSession

func (s *Store) DeactivateSession(ctx context.Context, uid models.UID) error

func (*Store) DeleteDevice

func (s *Store) DeleteDevice(ctx context.Context, uid models.UID) error

func (*Store) GetDevice

func (s *Store) GetDevice(ctx context.Context, uid models.UID) (*models.Device, error)

func (*Store) GetStats

func (s *Store) GetStats(ctx context.Context) (*models.Stats, error)

func (*Store) GetUserByTenant

func (s *Store) GetUserByTenant(ctx context.Context, tenant string) (*models.User, error)

func (*Store) GetUserByUsername

func (s *Store) GetUserByUsername(ctx context.Context, username string) (*models.User, error)

func (*Store) KeepAliveSession

func (s *Store) KeepAliveSession(ctx context.Context, uid models.UID) error

func (*Store) ListDevices

func (s *Store) ListDevices(ctx context.Context) ([]models.Device, error)

func (*Store) ListSessions

func (s *Store) ListSessions(ctx context.Context) ([]models.Session, error)

func (*Store) LookupDevice

func (s *Store) LookupDevice(ctx context.Context, namespace, name string) (*models.Device, error)

func (*Store) RenameDevice

func (s *Store) RenameDevice(ctx context.Context, uid models.UID, name string) error

func (*Store) UpdateDeviceStatus

func (s *Store) UpdateDeviceStatus(ctx context.Context, uid models.UID, online bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL