Documentation
¶
Overview ¶
Package integration defines provider metadata shared by payment and messaging integrations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestError ¶ added in v1.21.0
RequestError reports a failed provider call, prefixed with the provider's name and without the request URL. net/http reports a failed round trip as a *url.Error that prints the whole URL, and a provider's URL can carry the account, a password hash, the recipient's number or the code it delivers; the sending tasks log the error, so only the underlying failure is kept.
Types ¶
type ClientCache ¶ added in v1.21.0
type ClientCache[C any] struct { // contains filtered or unexported fields }
ClientCache keeps the provider client built for the configuration in force, so a send reuses the client — and the connections it holds — instead of building one per message. It is rebuilt when the configuration changes. The configuration is kept only as a digest.
type Info ¶
type Info struct {
Platform string `json:"platform"`
PlatformURL string `json:"platform_url"`
PlatformFieldDescription map[string]string `json:"platform_field_description"`
}
Info describes a supported provider and the configuration fields it accepts. It deliberately lives outside the HTTP DTO layer so infrastructure packages can expose their capabilities without importing internal application types.
type Platforms ¶ added in v1.21.0
type Platforms[P comparable] struct { // contains filtered or unexported fields }
Platforms is a two-way table between the provider names stored in a configuration and a provider enum.
func NewPlatforms ¶ added in v1.21.0
func NewPlatforms[P comparable](unsupported P, names map[string]P) Platforms[P]
NewPlatforms builds the table from names; unsupported is the value an unknown name parses to.