Documentation ¶
Index ¶
- type DeviceRepo
- func (d *DeviceRepo) CreateDevice(device *models.Device) (*models.Device, error)
- func (d *DeviceRepo) GetDevice(id string) (*models.Device, error)
- func (d *DeviceRepo) GetDevices() ([]*models.Device, error)
- func (d *DeviceRepo) GetDevicesByRoomID(deviceID string) ([]*models.Device, error)
- func (d *DeviceRepo) UpdateDevice(id string, device *models.Device) (*models.Device, error)
- type EmailRepo
- type RoomRepo
- func (d *RoomRepo) CreateRoom(room *models.Room) (*models.Room, error)
- func (d *RoomRepo) GetRoom(id string) (*models.Room, error)
- func (d *RoomRepo) GetRooms(filter *models.RoomFilter, limit *int, offset *int) ([]*models.Room, error)
- func (d *RoomRepo) UpdateRoom(id string, room *models.Room) (*models.Room, error)
- type UserRepo
- func (d *UserRepo) CreateUser(user *models.User) (*models.User, error)
- func (d *UserRepo) GetUser(id string) (*models.User, error)
- func (d *UserRepo) GetUserByUsername(username string) (*models.User, error)
- func (d *UserRepo) GetUsers() ([]*models.User, error)
- func (d *UserRepo) UpdateUser(id string, user *models.User) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceRepo ¶
type DeviceRepo struct {
DB *mongo.Collection
}
DeviceRepo Collection
func (*DeviceRepo) CreateDevice ¶
CreateDevice create device
func (*DeviceRepo) GetDevice ¶
func (d *DeviceRepo) GetDevice(id string) (*models.Device, error)
GetDevice get one device
func (*DeviceRepo) GetDevices ¶
func (d *DeviceRepo) GetDevices() ([]*models.Device, error)
GetDevices get all devices
func (*DeviceRepo) GetDevicesByRoomID ¶
func (d *DeviceRepo) GetDevicesByRoomID(deviceID string) ([]*models.Device, error)
GetDevicesByRoomID get all devices in a Device by deviceID
func (*DeviceRepo) UpdateDevice ¶
UpdateDevice update a device by id
type EmailRepo ¶
type EmailRepo struct {
DB *mongo.Collection
}
EmailRepo Collection
func (*EmailRepo) CreateEmail ¶
CreateEmail create email
type RoomRepo ¶
type RoomRepo struct {
DB *mongo.Collection
}
RoomRepo Collection
func (*RoomRepo) CreateRoom ¶
CreateRoom create room
type UserRepo ¶
type UserRepo struct {
DB *mongo.Collection
}
UserRepo Collection
func (*UserRepo) CreateUser ¶
CreateUser create user
func (*UserRepo) GetUserByUsername ¶
GetUserByUsername get user by username
Click to show internal directories.
Click to hide internal directories.