Documentation ¶
Index ¶
- Variables
- type MigrationDirection
- type PostgresStore
- func (p *PostgresStore) UserDelete(id uuid.UUID) error
- func (p *PostgresStore) UserInsert(email, password string, id uuid.UUID, admin bool) (*store.User, error)
- func (p *PostgresStore) UserList(userListParmas store.UserListParams) (*store.UsersList, error)
- func (p *PostgresStore) UserRetrieve(id uuid.UUID) (*store.User, error)
- func (p *PostgresStore) UserRetrieveByEmail(email string) (*store.User, error)
- func (p *PostgresStore) UserUpdateAdmin(id uuid.UUID, newAdminValue bool) error
- func (p *PostgresStore) UserUpdatePassword(id uuid.UUID, newPassword string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConnectingToPostgres = errors.New("error connecting to postgres")
View Source
var ErrCreatingPostgresPool = errors.New("error creating postgres pool")
View Source
var ErrInvalidMigrationDirection = errors.New("invalid migration direction passed")
Functions ¶
This section is empty.
Types ¶
type MigrationDirection ¶
type MigrationDirection int
const ( DirectionNull MigrationDirection = iota DirectionUP DirectionDown )
type PostgresStore ¶
type PostgresStore struct {
// contains filtered or unexported fields
}
func NewPostgresStore ¶
func NewPostgresStore(dbString string, autoMigrate bool) (*PostgresStore, func(), error)
func (*PostgresStore) UserDelete ¶
func (p *PostgresStore) UserDelete(id uuid.UUID) error
func (*PostgresStore) UserInsert ¶
func (*PostgresStore) UserList ¶
func (p *PostgresStore) UserList(userListParmas store.UserListParams) (*store.UsersList, error)
func (*PostgresStore) UserRetrieve ¶
func (*PostgresStore) UserRetrieveByEmail ¶
func (p *PostgresStore) UserRetrieveByEmail(email string) (*store.User, error)
func (*PostgresStore) UserUpdateAdmin ¶
func (p *PostgresStore) UserUpdateAdmin(id uuid.UUID, newAdminValue bool) error
func (*PostgresStore) UserUpdatePassword ¶
func (p *PostgresStore) UserUpdatePassword(id uuid.UUID, newPassword string) error
Click to show internal directories.
Click to hide internal directories.