Documentation ¶
Overview ¶
Package country contains country related CRUD functionality.
Index ¶
- Variables
- type Country
- func (c Country) Query(ctx context.Context, traceID string, pageNumber int, rowsPerPage int) ([]Info, error)
- func (c Country) QueryByCode(ctx context.Context, traceID string, claims auth.Claims, countryCode string) (Info, error)
- func (c Country) ToggleActive(ctx context.Context, traceID string, claims auth.Claims, countryCode string) error
- type Info
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is used when a specific country is requested but does not exist. ErrNotFound = errors.New("not found") // ErrInvalidID occurs when an ID is not in a valid form. ErrInvalidID = errors.New("ID is not in its proper form") // ErrForbidden occurs when a user tries to do something that is forbidden to them according to our access control policies. ErrForbidden = errors.New("attempted action is not allowed") )
Functions ¶
This section is empty.
Types ¶
type Country ¶
type Country struct {
// contains filtered or unexported fields
}
Country manages the set of API's for country access.
func (Country) Query ¶
func (c Country) Query(ctx context.Context, traceID string, pageNumber int, rowsPerPage int) ([]Info, error)
Query retrieves a list of active countries from the database.
Click to show internal directories.
Click to hide internal directories.