Documentation ¶
Index ¶
- func AddPermissionsForUser(ctx context.Context, dbtx DBTX, id int64, codes model.PermissionCodes) error
- func AttachBeanAssociations(ctx context.Context, dbtx DBTX, bean *model.BeanDB) error
- func AttachManyBeanAssociations(ctx context.Context, dbtx DBTX, beans []*model.BeanDB) error
- func AttachManyRoasterAssociations(ctx context.Context, dbtx DBTX, roasters []*model.RoasterDB) error
- func AttachRoasterAssociations(ctx context.Context, dbtx DBTX, roaster *model.RoasterDB) error
- func CreateBean(ctx context.Context, dbtx DBTX, p *model.BeanCreateParams) (*model.BeanDB, error)
- func CreateRoaster(ctx context.Context, dbtx DBTX, p *model.RoasterCreateParams) (*model.RoasterDB, error)
- func CreateUser(ctx context.Context, dbtx DBTX, p *model.UserCreateParams) (*model.UserDB, error)
- func DeleteBean(ctx context.Context, dbtx DBTX, id int64) error
- func DeleteRoaster(ctx context.Context, dbtx DBTX, id int64) error
- func FindBeans(ctx context.Context, dbtx DBTX, p *model.BeanFilterParams) ([]*model.BeanDB, error)
- func FindRoasters(ctx context.Context, dbtx DBTX, p *model.RoasterFilterParams) ([]*model.RoasterDB, error)
- func GetBean(ctx context.Context, dbtx DBTX, id int64) (*model.BeanDB, error)
- func GetBeansForRoaster(ctx context.Context, dbtx DBTX, id int64) ([]*model.BeanDB, error)
- func GetPermissionsForUser(ctx context.Context, dbtx DBTX, id int64) (model.PermissionCodes, error)
- func GetRoaster(ctx context.Context, dbtx DBTX, id int64) (*model.RoasterDB, error)
- func GetUser(ctx context.Context, dbtx DBTX, id int64) (*model.UserDB, error)
- func GetUserByEmail(ctx context.Context, dbtx DBTX, email string) (*model.UserDB, error)
- func UpdateBean(ctx context.Context, dbtx DBTX, p *model.BeanEditParams) (*model.BeanDB, error)
- func UpdateRoaster(ctx context.Context, dbtx DBTX, p *model.RoasterEditParams) (*model.RoasterDB, error)
- func UserExists(ctx context.Context, dbtx DBTX, id int64) (bool, error)
- type DBTX
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPermissionsForUser ¶
func AttachBeanAssociations ¶
func CreateBean ¶
func CreateRoaster ¶
func CreateUser ¶
func FindRoasters ¶
func GetBeansForRoaster ¶
TODO: move this functionality into FindBeans
func GetPermissionsForUser ¶
func GetRoaster ¶
func GetUserByEmail ¶
func UpdateBean ¶
func UpdateRoaster ¶
Types ¶
type DBTX ¶
type DBTX interface { Exec(query string, args ...any) (sql.Result, error) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) Query(query string, args ...any) (*sql.Rows, error) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error) QueryRow(query string, args ...any) *sql.Row QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row }
Click to show internal directories.
Click to hide internal directories.