Documentation ¶
Index ¶
- type App
- func (a *App) Create(ctx context.Context, app NewGalaxy) (Galaxy, error)
- func (a *App) Delete(ctx context.Context, galaxyID string) error
- func (a *App) Query(ctx context.Context, qp QueryParams) (page.Document[Galaxy], error)
- func (a *App) QueryByID(ctx context.Context, galaxyID string) (Galaxy, error)
- func (a *App) QueryByName(ctx context.Context, galaxyName string) (Galaxy, error)
- func (a *App) Update(ctx context.Context, galaxyID string, app UpdateGalaxy) (Galaxy, error)
- type Galaxy
- type NewGalaxy
- type QueryParams
- type UpdateGalaxy
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 galaxy domain.
func NewAppWithAuth ¶
NewAppWithAuth constructs a galaxy app API for use with auth support.
func (*App) QueryByName ¶
QueryByName returns a galaxy by its Ia.
type Galaxy ¶
type Galaxy struct { ID string `json:"id"` Name string `json:"name"` OwnerUserID string `json:"ownerUserID"` Enabled bool `json:"enabled"` DateCreated string `json:"dateCreated"` DateUpdated string `json:"dateUpdated"` }
Galaxy represents information about an individual galaxy.
type NewGalaxy ¶
type NewGalaxy struct { Name string `json:"name" validate:"required"` OwnerUserID string `json:"ownerUserID" validate:"required,uuid"` }
NewGalaxy defines the data needed to add a new galaxy.
type QueryParams ¶
type QueryParams struct { Page string Rows string OrderBy string ID string Name string DateCreated string }
QueryParams represents the set of possible query strings.
type UpdateGalaxy ¶
type UpdateGalaxy struct { Name *string `json:"name"` OwnerUserID *string `json:"ownerUserID" validate:"omitempty,uuid"` Enabled *bool `json:"enabled"` }
UpdateGalaxy defines the data needed to update a galaxy.
func (*UpdateGalaxy) Decode ¶
func (app *UpdateGalaxy) Decode(data []byte) error
Decode implments the decoder interface.
func (UpdateGalaxy) Validate ¶
func (app UpdateGalaxy) Validate() error
Validate checks the data in the model is considered clean.
Click to show internal directories.
Click to hide internal directories.