Documentation
¶
Overview ¶
Package postgres contains repository implementations using PostgreSQL as the underlying database.
Index ¶
- func Connect(cfg Config) (*sqlx.DB, error)
- func NewGroupMembershipsRepository(db dbutil.Database) things.GroupMembershipsRepository
- func NewGroupRepository(db dbutil.Database) things.GroupRepository
- func NewProfileRepository(db dbutil.Database) things.ProfileRepository
- func NewThingRepository(db dbutil.Database) things.ThingRepository
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect creates a connection to the PostgreSQL instance and applies any unapplied database migrations. A non-nil error is returned to indicate failure.
func NewGroupMembershipsRepository ¶ added in v0.30.1
func NewGroupMembershipsRepository(db dbutil.Database) things.GroupMembershipsRepository
NewGroupMembershipsRepository instantiates a PostgreSQL implementation of membership repository.
func NewGroupRepository ¶
func NewGroupRepository(db dbutil.Database) things.GroupRepository
NewGroupRepository instantiates a PostgreSQL implementation of group repository.
func NewProfileRepository ¶ added in v0.24.0
func NewProfileRepository(db dbutil.Database) things.ProfileRepository
NewProfileRepository instantiates a PostgreSQL implementation of profile repository.
func NewThingRepository ¶
func NewThingRepository(db dbutil.Database) things.ThingRepository
NewThingRepository instantiates a PostgreSQL implementation of thing repository.
Types ¶
Click to show internal directories.
Click to hide internal directories.