Documentation ¶
Index ¶
- func ProtoSupplierTypeToString(t proto.SupplierType) (string, error)
- func StringToProtoSupplierType(s string) (proto.SupplierType, error)
- type ProductProvider
- type Repository
- func (r *Repository) CreateSupplierContext(ctx context.Context, name string) (int32, error)
- func (r *Repository) ProductSuppliersContext(ctx context.Context, supplierID *int32) ([]*proto.ProductSupplier, error)
- func (r *Repository) SupplierContext(ctx context.Context, id int32) (*proto.Supplier, error)
- func (r *Repository) SuppliersContext(ctx context.Context) ([]*proto.Supplier, error)
- func (r *Repository) UpdateSupplierContext(ctx context.Context, supplier *proto.Supplier) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoSupplierTypeToString ¶
func ProtoSupplierTypeToString(t proto.SupplierType) (string, error)
func StringToProtoSupplierType ¶
func StringToProtoSupplierType(s string) (proto.SupplierType, error)
Types ¶
type ProductProvider ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(database *postgres.Database, productProvider ProductProvider) *Repository
func (*Repository) CreateSupplierContext ¶
func (*Repository) ProductSuppliersContext ¶
func (r *Repository) ProductSuppliersContext(ctx context.Context, supplierID *int32) ([]*proto.ProductSupplier, error)
func (*Repository) SupplierContext ¶
func (*Repository) SuppliersContext ¶
func (*Repository) UpdateSupplierContext ¶
Click to show internal directories.
Click to hide internal directories.