Documentation ¶
Index ¶
- func ToBusNewReportsTo(app NewReportsTo) reportstobus.NewReportsTo
- func ToBusUpdateReportsTo(app UpdateReportsTo) reportstobus.UpdateReportsTo
- type App
- func (a *App) Create(ctx context.Context, app NewReportsTo) (ReportsTo, error)
- func (a *App) Delete(ctx context.Context, id uuid.UUID) error
- func (a *App) Query(ctx context.Context, qp QueryParams) (query.Result[ReportsTo], error)
- func (a *App) QueryByID(ctx context.Context, id uuid.UUID) (ReportsTo, error)
- func (a *App) Update(ctx context.Context, app UpdateReportsTo, id uuid.UUID) (ReportsTo, error)
- type NewReportsTo
- type QueryParams
- type ReportsTo
- type UpdateReportsTo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToBusNewReportsTo ¶
func ToBusNewReportsTo(app NewReportsTo) reportstobus.NewReportsTo
func ToBusUpdateReportsTo ¶
func ToBusUpdateReportsTo(app UpdateReportsTo) reportstobus.UpdateReportsTo
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App manages the set of app layer api functions for the reports to domain.
func NewApp ¶
func NewApp(reportsToBus *reportstobus.Business) *App
NewApp constructs a reports to app API for use.
func NewAppWithAuth ¶
func NewAppWithAuth(reportsToBus *reportstobus.Business, ath *auth.Auth) *App
NewAppWithAuth constructs a reports to app API for use with auth support.
type NewReportsTo ¶
type NewReportsTo struct { BossID string `json:"boss_id" validate:"required,min=36,max=36"` ReporterID string `json:"reporter_id" validate:"required,min=36,max=36"` }
func (*NewReportsTo) Decode ¶
func (app *NewReportsTo) Decode(data []byte) error
Decode implements the decoder interface.
func (NewReportsTo) Validate ¶
func (app NewReportsTo) Validate() error
Validate checks the data in the model is considered clean.
type QueryParams ¶
type QueryParams struct { Page string Rows string OrderBy string ID string BossID string ReporterID string }
QueryParams represents the query parameters that can be used.
type ReportsTo ¶
type ReportsTo struct { ID string `json:"id"` BossID string `json:"boss_id"` ReporterID string `json:"reporter_id"` }
func ToAppReportsTo ¶
func ToAppReportsTo(bus reportstobus.ReportsTo) ReportsTo
func ToAppReportsTos ¶
func ToAppReportsTos(bus []reportstobus.ReportsTo) []ReportsTo
type UpdateReportsTo ¶
type UpdateReportsTo struct { BossID *string `json:"boss_id" validate:"omitempty,min=36,max=36"` ReporterID *string `json:"reporter_id" validate:"omitempty,min=36,max=36"` }
func (*UpdateReportsTo) Decode ¶
func (app *UpdateReportsTo) Decode(data []byte) error
Decode implements the decoder interface.
func (UpdateReportsTo) Validate ¶
func (app UpdateReportsTo) Validate() error
Validate checks the data in the model is considered clean.
Click to show internal directories.
Click to hide internal directories.