Documentation
¶
Index ¶
- type App
- func (a *App) Create(ctx context.Context, app NewApprovalStatus) (ApprovalStatus, error)
- func (a *App) Delete(ctx context.Context, id uuid.UUID) error
- func (a *App) Query(ctx context.Context, qp QueryParams) (query.Result[ApprovalStatus], error)
- func (a *App) QueryByID(ctx context.Context, id uuid.UUID) (ApprovalStatus, error)
- func (a *App) Update(ctx context.Context, app UpdateApprovalStatus, id uuid.UUID) (ApprovalStatus, error)
- type ApprovalStatus
- type NewApprovalStatus
- type QueryParams
- type UpdateApprovalStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App manages the set of app layer api functions for the approval status domain.
func NewApp ¶
func NewApp(approvalstatusBus *approvalstatusbus.Business) *App
NewApp constructs an approval status app API for use.
func NewAppWithAuth ¶
func NewAppWithAuth(approvalstatusBus *approvalstatusbus.Business, ath *auth.Auth) *App
NewAppWithAuth constructs an approval status app API for use with auth support.
func (*App) Create ¶
func (a *App) Create(ctx context.Context, app NewApprovalStatus) (ApprovalStatus, error)
Create adds a new approval status to the system
func (*App) Query ¶
func (a *App) Query(ctx context.Context, qp QueryParams) (query.Result[ApprovalStatus], error)
Query returns a list of approval statuses based on the filter, order and page
func (*App) Update ¶
func (a *App) Update(ctx context.Context, app UpdateApprovalStatus, id uuid.UUID) (ApprovalStatus, error)
Update updates an existing approval status
type ApprovalStatus ¶
type ApprovalStatus struct { ID string `json:"id"` IconID string `json:"icon_id"` Name string `json:"name"` }
func ToAppApprovalStatus ¶
func ToAppApprovalStatus(bus approvalstatusbus.ApprovalStatus) ApprovalStatus
func ToAppApprovalStatuses ¶
func ToAppApprovalStatuses(bus []approvalstatusbus.ApprovalStatus) []ApprovalStatus
type NewApprovalStatus ¶
type NewApprovalStatus struct { IconID string `json:"iconID" validate:"required"` Name string `json:"name" validate:"required,min=3,max=100"` }
func (*NewApprovalStatus) Decode ¶
func (app *NewApprovalStatus) Decode(data []byte) error
func (NewApprovalStatus) Validate ¶
func (app NewApprovalStatus) Validate() error
type QueryParams ¶
type UpdateApprovalStatus ¶
type UpdateApprovalStatus struct { IconID *string `json:"icon_id" validate:"required"` Name *string `json:"name" validate:"required,min=3,max=100"` }
func (*UpdateApprovalStatus) Decode ¶
func (app *UpdateApprovalStatus) Decode(data []byte) error
func (UpdateApprovalStatus) Validate ¶
func (app UpdateApprovalStatus) Validate() error
Click to show internal directories.
Click to hide internal directories.