package models import "context" type Bridge struct { ID int `json:"id" db:"id"` Name string `json:"name" db:"name"` Driver DriverKind `json:"driver" db:"driver"` Address string `json:"address" db:"address"` Token string `json:"-" db:"token"` } type BridgeRepository interface { Find(ctx context.Context, id int) (Bridge, error) FetchAll(ctx context.Context) ([]Bridge, error) Save(ctx context.Context, bridge *Bridge) error Delete(ctx context.Context, bridge *Bridge) error } type DriverKind string var ( DTHue DriverKind = "Hue" DTNanoLeaf DriverKind = "Nanoleaf" ) var ValidDriverKinds = []DriverKind{ DTHue, DTNanoLeaf, }