sqlite

package
v0.0.0-...-d18bb8d Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(dsn string) *DB

func (*DB) Open

func (db *DB) Open() error

type RoomService

type RoomService struct {
	// contains filtered or unexported fields
}

func NewRoomService

func NewRoomService(db *DB) *RoomService

func (*RoomService) CreateRoom

func (s *RoomService) CreateRoom(ctx context.Context, room *goblin.Room) (err error)

func (*RoomService) DeleteRoom

func (s *RoomService) DeleteRoom(ctx context.Context, id string) error

func (*RoomService) RoomById

func (s *RoomService) RoomById(ctx context.Context, id string) (room *goblin.Room, err error)

type SensorService

type SensorService struct {
	// contains filtered or unexported fields
}

func NewSensorService

func NewSensorService(db *DB) *SensorService

func (*SensorService) CreateSensor

func (s *SensorService) CreateSensor(ctx context.Context, sensor *goblin.Sensor) error

func (*SensorService) DeleteSensor

func (s *SensorService) DeleteSensor(ctx context.Context, id string) error

func (*SensorService) SensorById

func (s *SensorService) SensorById(ctx context.Context, id string) (sensor *goblin.Sensor, err error)

func (*SensorService) UpdateRoom

func (s *SensorService) UpdateRoom(ctx context.Context, id string, roomId string) error

Jump to

Keyboard shortcuts

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