Documentation
¶
Index ¶
- type Category
- type CreateCategoryParams
- type CreateOrderItemsParams
- type CreateOrderParams
- type CreateProductParams
- type DBTX
- type Delivery
- type GetProductByIDRow
- type GetProductsRow
- type Order
- type OrderItem
- type Product
- type Queries
- func (q *Queries) CreateCategory(ctx context.Context, arg CreateCategoryParams) error
- func (q *Queries) CreateOrder(ctx context.Context, arg CreateOrderParams) error
- func (q *Queries) CreateOrderItems(ctx context.Context, arg CreateOrderItemsParams) error
- func (q *Queries) CreateProduct(ctx context.Context, arg CreateProductParams) error
- func (q *Queries) GetAllCategories(ctx context.Context, limit int32) ([]Category, error)
- func (q *Queries) GetCategoryByID(ctx context.Context, id string) (Category, error)
- func (q *Queries) GetProductByID(ctx context.Context, id string) (GetProductByIDRow, error)
- func (q *Queries) GetProducts(ctx context.Context, limit int32) ([]GetProductsRow, error)
- func (q *Queries) RegistryDelivery(ctx context.Context, arg RegistryDeliveryParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type RegistryDeliveryParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct {
ID string
Name string
Active sql.NullBool
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt sql.NullTime
}
func (*Category) BatchToDomain ¶
type CreateCategoryParams ¶
type CreateOrderItemsParams ¶
type CreateOrderParams ¶
type CreateProductParams ¶
type CreateProductParams struct {
ID string
Code sql.NullString
Name string
ImageUrl sql.NullString
Price int32
Description sql.NullString
Active sql.NullBool
CategoryID sql.NullString
}
type Delivery ¶
type Delivery struct {
ID string
CEP string
Address sql.NullString
Number sql.NullString
Country sql.NullString
District sql.NullString
City sql.NullString
DeliveryPrice int32
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt sql.NullTime
}
type GetProductByIDRow ¶
type GetProductByIDRow struct {
ID string
Code sql.NullString
Name string
ImageUrl sql.NullString
Price int32
Description sql.NullString
Active sql.NullBool
CategoryID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt sql.NullTime
CategoryName string
}
type GetProductsRow ¶
type GetProductsRow struct {
ID string
Code sql.NullString
Name string
ImageUrl sql.NullString
Price int32
Description sql.NullString
Active sql.NullBool
CategoryID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt sql.NullTime
CategoryName string
}
type Product ¶
type Product struct {
ID string
Code sql.NullString
Name string
ImageUrl sql.NullString
Price int32
Description sql.NullString
Active sql.NullBool
CategoryID sql.NullString
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt sql.NullTime
}
func (*Product) BatchToDomain ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateCategory ¶
func (q *Queries) CreateCategory(ctx context.Context, arg CreateCategoryParams) error
func (*Queries) CreateOrder ¶
func (q *Queries) CreateOrder(ctx context.Context, arg CreateOrderParams) error
func (*Queries) CreateOrderItems ¶
func (q *Queries) CreateOrderItems(ctx context.Context, arg CreateOrderItemsParams) error
func (*Queries) CreateProduct ¶
func (q *Queries) CreateProduct(ctx context.Context, arg CreateProductParams) error
func (*Queries) GetAllCategories ¶
func (*Queries) GetCategoryByID ¶
func (*Queries) GetProductByID ¶
func (*Queries) GetProducts ¶
func (*Queries) RegistryDelivery ¶
func (q *Queries) RegistryDelivery(ctx context.Context, arg RegistryDeliveryParams) error
type RegistryDeliveryParams ¶
type RegistryDeliveryParams struct {
ID string
CEP string
Address sql.NullString
Number sql.NullString
Country sql.NullString
District sql.NullString
City sql.NullString
DeliveryPrice int32
}
Click to show internal directories.
Click to hide internal directories.