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 polls MoneyGram for SEP-24 transaction status changes and drives the existing disbursement state machine accordingly.
|
Package mgpoller polls MoneyGram for SEP-24 transaction status changes and drives the existing disbursement state machine accordingly. |
Click to show internal directories.
Click to hide internal directories.