Documentation
¶
Overview ¶
Package services holds the primitives shared by the business-logic service layer. It carries no behaviour of its own — just the common vocabulary the account, transaction, and user services build on.
The sentinel errors (ErrNotFound, ErrUnauthorized, ErrForbidden, ErrConflict) are the transport-neutral failures a service can return for handlers to map onto HTTP status codes. Pagination is the shared list-query input, and PaginatedResponse is the generic envelope a paginated result is returned in.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("resource not found") ErrForbidden = errors.New("forbidden") ErrConflict = errors.New("resource already exists") )
Common service errors
Functions ¶
This section is empty.
Types ¶
type PaginatedResponse ¶
type PaginatedResponse[T any] struct { Data []T `json:"data"` Page int `json:"page"` PageSize int `json:"page_size"` TotalCount int `json:"total_count"` }
PaginatedResponse is a generic paginated response
type Pagination ¶
Pagination is shared across services
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mgpoller drives both directions of the MoneyGram SEP-24 rail: withdrawal (cash out at an agent) and deposit (cash in, settling a loan).
|
Package mgpoller drives both directions of the MoneyGram SEP-24 rail: withdrawal (cash out at an agent) and deposit (cash in, settling a loan). |
Click to show internal directories.
Click to hide internal directories.