Documentation ¶
Index ¶
- Variables
- func DbMigrationsUrl() string
- func RunDBMigrationUp(dbSource string) error
- type Config
- type CreateSleepLogParams
- type CreateUserParams
- type DBTX
- type DeleteSleepLogByIDParams
- type GetSleepLogsByUserIDParams
- type Querier
- type Queries
- func (q *Queries) CreateSleepLog(ctx context.Context, arg CreateSleepLogParams) (SleepLog, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteSleepLogByID(ctx context.Context, arg DeleteSleepLogByIDParams) error
- func (q *Queries) GetSleepLogCountByUserID(ctx context.Context, userID uuid.UUID) (int64, error)
- func (q *Queries) GetSleepLogsByUserID(ctx context.Context, arg GetSleepLogsByUserIDParams) ([]SleepLog, error)
- func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) UpdateSleepLogById(ctx context.Context, arg UpdateSleepLogByIdParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SleepLog
- type SqlStore
- type Store
- type TestDatabase
- type UpdateSleepLogByIdParams
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRecordNotFound = pgx.ErrNoRows
Functions ¶
func DbMigrationsUrl ¶
func DbMigrationsUrl() string
func RunDBMigrationUp ¶
Types ¶
type Config ¶
type CreateSleepLogParams ¶
type CreateUserParams ¶
type Querier ¶
type Querier interface { CreateSleepLog(ctx context.Context, arg CreateSleepLogParams) (SleepLog, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) DeleteSleepLogByID(ctx context.Context, arg DeleteSleepLogByIDParams) error GetSleepLogCountByUserID(ctx context.Context, userID uuid.UUID) (int64, error) GetSleepLogsByUserID(ctx context.Context, arg GetSleepLogsByUserIDParams) ([]SleepLog, error) GetUserByUsername(ctx context.Context, username string) (User, error) UpdateSleepLogById(ctx context.Context, arg UpdateSleepLogByIdParams) error }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateSleepLog ¶
func (*Queries) CreateUser ¶
func (*Queries) DeleteSleepLogByID ¶
func (q *Queries) DeleteSleepLogByID(ctx context.Context, arg DeleteSleepLogByIDParams) error
func (*Queries) GetSleepLogCountByUserID ¶
func (*Queries) GetSleepLogsByUserID ¶
func (*Queries) GetUserByUsername ¶
func (*Queries) UpdateSleepLogById ¶
func (q *Queries) UpdateSleepLogById(ctx context.Context, arg UpdateSleepLogByIdParams) error
type TestDatabase ¶
type TestDatabase struct { Config Config // contains filtered or unexported fields }
func NewTestDatabase ¶
func NewTestDatabase() *TestDatabase
func (*TestDatabase) Close ¶
func (td *TestDatabase) Close()
Click to show internal directories.
Click to hide internal directories.