Documentation
¶
Index ¶
- Variables
- func ConvertPvzParamsToReceptionsParams(src api.GetPvzParams) db.GetPVZsWithReceptionsParams
- type Models
- func (m *Models) AddPVZ(reqCtx context.Context, req api.PVZ) (db.CreatePVZRow, error)
- func (m *Models) AddProduct(reqCtx context.Context, req api.PostProductsJSONBody) (db.AddProductRow, error)
- func (m *Models) AddReception(reqCtx context.Context, req api.PostReceptionsJSONBody) (db.CreateOrGetReceptionRow, error)
- func (m *Models) CloseLastReception(reqCtx context.Context, req openapi_types.UUID) (db.CloseReceptionRow, error)
- func (m *Models) DeleteLastProduct(reqCtx context.Context, req openapi_types.UUID) error
- func (m *Models) GetPVZ(reqCtx context.Context, req api.GetPvzParams) ([]PVZWithReceptionsResponse, error)
- func (m *Models) Login(reqCtx context.Context, req api.PostLoginJSONBody) (string, error)
- func (m *Models) ReadOnlyTransaction(ctx context.Context, fn func(*db.Queries) error) error
- func (m *Models) Register(reqCtx context.Context, req api.PostRegisterJSONBody) (db.CreateUserRow, error)
- func (m *Models) Transaction(ctx context.Context, fn func(*db.Queries) error) error
- type PVZModel
- type PVZModelv1
- type PVZWithReceptionsResponse
- type ReceptionWithProducts
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRecordNotFound = errors.New("record not found")
)
Functions ¶
func ConvertPvzParamsToReceptionsParams ¶
func ConvertPvzParamsToReceptionsParams(src api.GetPvzParams) db.GetPVZsWithReceptionsParams
Types ¶
type Models ¶
type Models struct {
PVZv1 PVZModelv1
PVZ PVZModel
}
func (*Models) AddProduct ¶
func (m *Models) AddProduct(reqCtx context.Context, req api.PostProductsJSONBody) (db.AddProductRow, error)
func (*Models) AddReception ¶
func (m *Models) AddReception(reqCtx context.Context, req api.PostReceptionsJSONBody) (db.CreateOrGetReceptionRow, error)
func (*Models) CloseLastReception ¶
func (m *Models) CloseLastReception(reqCtx context.Context, req openapi_types.UUID) (db.CloseReceptionRow, error)
func (*Models) DeleteLastProduct ¶
func (*Models) GetPVZ ¶
func (m *Models) GetPVZ(reqCtx context.Context, req api.GetPvzParams) ([]PVZWithReceptionsResponse, error)
func (*Models) ReadOnlyTransaction ¶
ReadOnlyTransaction executes a function within a read-only transaction
func (*Models) Register ¶
func (m *Models) Register(reqCtx context.Context, req api.PostRegisterJSONBody) (db.CreateUserRow, error)
type PVZModelv1 ¶
type PVZWithReceptionsResponse ¶
type PVZWithReceptionsResponse struct {
PVZ api.PVZ `json:"pvz"`
Receptions []ReceptionWithProducts `json:"receptions"`
}
PVZWithReceptionsResponse matches the expected API response format
Click to show internal directories.
Click to hide internal directories.