Documentation ¶
Overview ¶
Package permit provides a core business API of a permit.
Index ¶
- func CreateContent(operationType string, perm Permit) (string, error)
- type Application
- type ApplicationUpdate
- type Core
- func (c *Core) Create(ctx context.Context, apl Application) error
- func (c *Core) FetchAll(ctx context.Context) ([]Application, error)
- func (c *Core) Retrieve(ctx context.Context, aplID int) (Application, error)
- func (c *Core) Update(ctx context.Context, aplID int, aplUpdate ApplicationUpdate) (Application, error)
- type Permit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct { ID int `json:"application_id"` Status string `json:"status"` CatalogID uuid.UUID `json:"catalog_id"` Form any `json:"form"` }
An Application contains the data needed to apply for a permit.
type ApplicationUpdate ¶
ApplicationUpdate defines what information may be provided to modify an existing Application permit.
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core manages the set of APIs for permit.
func (*Core) Create ¶
func (c *Core) Create(ctx context.Context, apl Application) error
Create creates an application to a permit.
func (*Core) FetchAll ¶
func (c *Core) FetchAll(ctx context.Context) ([]Application, error)
FetchAll gets all a applications permit.
func (*Core) Update ¶
func (c *Core) Update(ctx context.Context, aplID int, aplUpdate ApplicationUpdate) (Application, error)
Update updates an application permit.
type Permit ¶
type Permit struct {
Application Application `json:"application"`
}
A Permit is the payload of a message permit.
Click to show internal directories.
Click to hide internal directories.