Documentation
¶
Index ¶
- type Controller
- func (c *Controller) Create(ctx context.Context, object model.PickPoint) (string, error)
- func (c *Controller) Delete(ctx context.Context, id string) error
- func (c *Controller) GetByID(ctx context.Context, id string) (model.PickPoint, error)
- func (c *Controller) List(ctx context.Context) ([]model.PickPoint, error)
- func (c *Controller) Update(ctx context.Context, object model.PickPoint) (string, error)
- type Manager
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(storage Storage, tm Manager) *Controller
type Manager ¶
type Manager interface {
// Do processes a transaction inside a closure.
Do(context.Context, func(ctx context.Context) error) error
// DoWithSettings processes a transaction inside a closure with custom trm.Settings.
DoWithSettings(context.Context, trm.Settings, func(ctx context.Context) error) error
}
type Storage ¶
type Storage interface {
GetByID(ctx context.Context, id pgtype.UUID) (repository.PickPointDTO, error)
List(ctx context.Context) ([]repository.PickPointDTO, error)
Create(ctx context.Context, dto repository.PickPointDTO) (pgtype.UUID, error)
Delete(ctx context.Context, id pgtype.UUID) error
Update(ctx context.Context, dto repository.PickPointDTO) (pgtype.UUID, error)
}
Click to show internal directories.
Click to hide internal directories.