Documentation ¶
Index ¶
- func Data(config StoreConfig) mongo.DBConn
- func StoreConfigs(dbName string, collections []string, local bool) map[string]StoreConfig
- type AccessStore
- type BedUserStore
- type BuildingBedStore
- type BuildingStore
- type MachineStore
- type MongoStore
- type RoomSharingStore
- type StoreConfig
- type UsageStore
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Data ¶
func Data(config StoreConfig) mongo.DBConn
func StoreConfigs ¶
func StoreConfigs(dbName string, collections []string, local bool) map[string]StoreConfig
Types ¶
type AccessStore ¶
type AccessStore interface { CreateAccessCode(bedAccess types.BedAccess) error GetAccess(bedId string) (types.BedAccess, error) }
func NewAccessStore ¶
func NewAccessStore(config StoreConfig) AccessStore
type BedUserStore ¶
type BedUserStore interface { CreateBedUser(bedUser types.BedUser) error GetBed(bedId string) (types.BedUser, error) GetBedUserByUserId(userId string) (types.BedUser, error) GetByBuildingId(buildingId string) ([]types.BedUser, error) GetUsersByBedIds(bedIds []string) ([]types.BedUser, error) DeleteBedUser(bedUser types.BedUser) error }
func NewBedUserStore ¶
func NewBedUserStore(config StoreConfig) BedUserStore
type BuildingBedStore ¶
type BuildingBedStore interface { CreateBeds(buildingBeds []types.BuildingBed) error GetByBedId(bedId string) (types.BuildingBed, error) GetBedsByBuildingId(buildingId string) ([]types.BuildingBed, error) }
func NewBuildingBedStore ¶
func NewBuildingBedStore(config StoreConfig) BuildingBedStore
type BuildingStore ¶
type BuildingStore interface { Create(building types.Building) error GetById(id string) (types.Building, error) GetBuildings() ([]types.Building, error) }
func NewBuildingStore ¶
func NewBuildingStore(config StoreConfig) BuildingStore
type MachineStore ¶
type MachineStore interface { CreateMachines(machine []types.Machine) error GetMachines(buildingId string) ([]types.Machine, error) GetMachine(id string) (types.Machine, error) UpdateMachine(machine types.Machine) ([]types.Machine, error) }
func NewMachineStore ¶
func NewMachineStore(config StoreConfig) MachineStore
type MongoStore ¶
func NewStoreConn ¶
func NewStoreConn(config StoreConfig) *MongoStore
type RoomSharingStore ¶
type RoomSharingStore interface {
CreateRooms(roomSharing []types.RoomSharing) error
}
func NewRoomSharingStore ¶
func NewRoomSharingStore(config StoreConfig) RoomSharingStore
type StoreConfig ¶
type UsageStore ¶
type UsageStore interface { Create(usage types.Usage) error GetByMachineId(machineId string) (types.Usage, error) GetByMachineIds(machineIds []string) ([]types.Usage, error) SaveUsage(usage types.Usage) error DeleteUsage(machineId string) error }
func NewUsageStore ¶
func NewUsageStore(config StoreConfig) UsageStore
type UserStore ¶
type UserStore interface { CreateUser(user types.User) error GetUser(id string) (types.User, error) GetByUsername(username string) (types.User, error) GetUsers(ids []string) ([]types.User, error) GetByUsernames(usernames []string) ([]types.User, error) GetByRole(role role.Role) ([]types.User, error) UpdateUser(user types.User) error }
func NewUserStore ¶
func NewUserStore(config StoreConfig) UserStore
Click to show internal directories.
Click to hide internal directories.