Documentation
¶
Index ¶
- func IdPostgresToProto(id pgtype.UUID) (proto_id string, err error)
- func IdProtoToPostgres(id string) (postgres_id pgtype.UUID, err error)
- type Bake
- type CreateBakeParams
- type DBTX
- type Querier
- type Queries
- func (q *Queries) CreateBake(ctx context.Context, arg CreateBakeParams) (Bake, error)
- func (q *Queries) DeleteBake(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) GetAllBake(ctx context.Context) ([]Bake, error)
- func (q *Queries) GetBake(ctx context.Context, id pgtype.UUID) (Bake, error)
- func (q *Queries) UpdateBake(ctx context.Context, arg UpdateBakeParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Repository
- func (r Repository) CreateBake(ctx context.Context, name string) (*Bake, error)
- func (r Repository) GetAllBake(ctx context.Context) (*[]Bake, error)
- func (r Repository) GetBake(ctx context.Context, id pgtype.UUID) (*Bake, error)
- func (r Repository) Ping() error
- func (r Repository) UpdateBake(ctx context.Context, id pgtype.UUID, status StatusEnum) error
- type StatusEnum
- type Topping
- type UpdateBakeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateBakeParams ¶
type CreateBakeParams struct {
Name string
BakeStatus StatusEnum
}
type Querier ¶
type Querier interface {
CreateBake(ctx context.Context, arg CreateBakeParams) (Bake, error)
DeleteBake(ctx context.Context, id pgtype.UUID) error
GetAllBake(ctx context.Context) ([]Bake, error)
GetBake(ctx context.Context, id pgtype.UUID) (Bake, error)
UpdateBake(ctx context.Context, arg UpdateBakeParams) error
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateBake ¶
func (*Queries) DeleteBake ¶
func (*Queries) UpdateBake ¶
func (q *Queries) UpdateBake(ctx context.Context, arg UpdateBakeParams) error
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func (Repository) CreateBake ¶
func (Repository) GetAllBake ¶
func (r Repository) GetAllBake(ctx context.Context) (*[]Bake, error)
func (Repository) Ping ¶
func (r Repository) Ping() error
func (Repository) UpdateBake ¶
func (r Repository) UpdateBake(ctx context.Context, id pgtype.UUID, status StatusEnum) error
type StatusEnum ¶
type StatusEnum string
const ( StatusEnumPreparing StatusEnum = "preparing" StatusEnumBaking StatusEnum = "baking" StatusEnumDone StatusEnum = "done" )
func (*StatusEnum) Scan ¶
func (e *StatusEnum) Scan(src interface{}) error
type UpdateBakeParams ¶
type UpdateBakeParams struct {
ID pgtype.UUID
BakeStatus StatusEnum
}
Click to show internal directories.
Click to hide internal directories.