services

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

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")
	ErrUnauthorized = errors.New("unauthorized")
	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

type Pagination struct {
	Page     int
	PageSize int
}

Pagination is shared across services

Directories

Path Synopsis
Package airtelpoller holds the core-side Airtel Money tickers.
Package airtelpoller holds the core-side Airtel Money tickers.
Package compliance orchestrates the KYB lifecycle described in elliptic-compliance-integration.md §13: a counterparty submits an address, KYB approval triggers screening via pkg/compliance.Screener, and the verdict is applied to pkg/repository.CounterpartyRepository's three tables.
Package compliance orchestrates the KYB lifecycle described in elliptic-compliance-integration.md §13: a counterparty submits an address, KYB approval triggers screening via pkg/compliance.Screener, and the verdict is applied to pkg/repository.CounterpartyRepository's three tables.
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).
Package mpesapoller holds the core-side M-Pesa tickers.
Package mpesapoller holds the core-side M-Pesa tickers.
Package vaultwatch is the on-chain allowlist's detect-and-quarantine watcher (Option D of the compliance design, defense-in-depth alongside the contract's own gating).
Package vaultwatch is the on-chain allowlist's detect-and-quarantine watcher (Option D of the compliance design, defense-in-depth alongside the contract's own gating).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL