Documentation ¶
Index ¶
- Variables
- func AwaitTermination(logger log.Logger, terminationListener chan error) error
- func NewInternalClient(logger log.Logger, config *ClientConfig, name string) *http.Client
- func NewTerminationListener() chan error
- type Admin
- type AuditTrail
- type ClientConfig
- type Config
- type Cutoffs
- type Email
- type ErrorAlerting
- type EventsConfig
- type EventsStream
- type FTP
- type FlattenBatches
- type GPG
- type GlobalConfig
- type HTTPConfig
- type InMemory
- type Inbound
- type KafkaConfig
- type Merging
- type MockAgent
- type MockAlerting
- type NotificationRetries
- type Notifications
- type ODFICorrections
- type ODFIFiles
- type ODFIPrenotes
- type ODFIProcessors
- type ODFIPublishing
- type ODFIReconciliation
- type ODFIReturns
- type ODFIStorage
- type Output
- type PagerDuty
- type PagerDutyAlerting
- type PreUpload
- type SFTP
- type Shard
- type Sharding
- type Signer
- type Slack
- type TLSConfig
- type UploadAgent
- type UploadAgents
- type UploadNotifiers
- type UploadPaths
- type UploadRetry
- type WebhookConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultEmailTemplate = template.Must(template.New("email").Parse(`
A file has been {{ .Verb }}ed{{ if .Hostname }}{{ if eq .Verb "upload" }} to{{ else }} from{{end}} {{ .Hostname }}{{end}} - {{ .Filename }}
Name: {{ .CompanyName }}
Debits: ${{ .DebitTotal }}
Credits: ${{ .CreditTotal }}
Batches: {{ .BatchCount }}
Total Entries: {{ .EntryCount }}
`))
)
View Source
var ( // DefaultFilenameTemplate is paygate's standard filename format for ACH files which are uploaded to an ODFI // // The format consists of a few parts: "year month day" timestamp, "hour minute" timestamp, and routing number // // Examples: // - 20191010-0830-LiveODFI.ach (.ShardName of "LiveODFI") // - 20191010-0830-987654320.ach // - 20191010-0830-987654320.ach.gpg (GPG encrypted) DefaultFilenameTemplate = `{{ date "20060102" }}-{{ date "150405" }}-{{ .RoutingNumber }}.ach{{ if .GPG }}.gpg{{ end }}` )
Functions ¶
func AwaitTermination ¶
func NewInternalClient ¶
func NewTerminationListener ¶
func NewTerminationListener() chan error
Types ¶
type AuditTrail ¶
func (*AuditTrail) Validate ¶
func (cfg *AuditTrail) Validate() error
type ClientConfig ¶
type Config ¶
type Config struct { Logger log.Logger `json:"-"` Clients *ClientConfig Database database.DatabaseConfig Consul *consul.Config Admin Admin Inbound Inbound Events *EventsConfig Sharding Sharding Upload UploadAgents Errors ErrorAlerting }
type Email ¶
type Email struct { ID string From string To []string // ConnectionURI is a URI used to connect with a remote SFTP server. // This config typically needs to contain enough values to successfully // authenticate with the server. // - insecure_skip_verify is an optional parameter for disabling certificate verification // // Example: smtps://user:pass@localhost:1025/?insecure_skip_verify=true ConnectionURI string Template string CompanyName string }
type ErrorAlerting ¶
type ErrorAlerting struct { PagerDuty *PagerDutyAlerting Mock *MockAlerting }
func (ErrorAlerting) Validate ¶
func (n ErrorAlerting) Validate() error
type EventsConfig ¶ added in v0.2.0
type EventsConfig struct { Stream *EventsStream Webhook *WebhookConfig Transform *models.TransformConfig }
func (*EventsConfig) Validate ¶ added in v0.3.0
func (cfg *EventsConfig) Validate() error
type EventsStream ¶ added in v0.3.0
type EventsStream struct {
Kafka *KafkaConfig
}
func (*EventsStream) Validate ¶ added in v0.3.0
func (cfg *EventsStream) Validate() error
type FTP ¶
type FTP struct { Hostname string Username string Password string CAFilepath string DialTimeout time.Duration DisabledEPSV bool }
func (*FTP) DisableEPSV ¶
func (*FTP) MarshalJSON ¶ added in v0.6.3
type FlattenBatches ¶
type FlattenBatches struct{}
type GlobalConfig ¶
type GlobalConfig struct {
ACHGateway Config
}
type HTTPConfig ¶
type HTTPConfig struct { BindAddress string TLS TLSConfig Transform *models.TransformConfig MaxBodyBytes int64 }
type Inbound ¶
type Inbound struct { HTTP HTTPConfig InMem *InMemory Kafka *KafkaConfig ODFI *ODFIFiles Audit *AuditTrail }
type KafkaConfig ¶
type KafkaConfig struct { Brokers []string Key string Secret string Group string Topic string TLS bool // AutoCommit in Sarama refers to "automated publishing of consumer offsets // to the broker" rather than a Kafka broker's meaning of "commit consumer // offsets on read" which leads to "at-most-once" delivery. AutoCommit bool Transform *models.TransformConfig }
func (*KafkaConfig) Validate ¶ added in v0.3.0
func (cfg *KafkaConfig) Validate() error
type Merging ¶
type Merging struct { Storage storage.Config Directory string // fallback config for Storage.Filesystem.Directory FlattenBatches *FlattenBatches }
type MockAlerting ¶
type MockAlerting struct {
Enabled bool
}
type NotificationRetries ¶
type Notifications ¶
type Notifications struct { Email []Email PagerDuty []PagerDuty Slack []Slack Retry *NotificationRetries }
func (Notifications) FindEmails ¶
func (cfg Notifications) FindEmails(ids []string) []Email
func (Notifications) FindPagerDutys ¶
func (cfg Notifications) FindPagerDutys(ids []string) []PagerDuty
func (Notifications) FindSlacks ¶
func (cfg Notifications) FindSlacks(ids []string) []Slack
func (Notifications) Validate ¶
func (cfg Notifications) Validate() error
type ODFICorrections ¶ added in v0.3.0
type ODFICorrections struct {
Enabled bool
}
type ODFIFiles ¶ added in v0.3.0
type ODFIFiles struct { Processors ODFIProcessors Interval time.Duration ShardNames []string Storage ODFIStorage Audit *AuditTrail }
type ODFIPrenotes ¶ added in v0.3.0
type ODFIPrenotes struct {
Enabled bool
}
type ODFIProcessors ¶ added in v0.3.0
type ODFIProcessors struct { Corrections ODFICorrections Reconciliation ODFIReconciliation Prenotes ODFIPrenotes Returns ODFIReturns }
func (ODFIProcessors) Validate ¶ added in v0.3.0
func (cfg ODFIProcessors) Validate() error
type ODFIPublishing ¶ added in v0.3.0
type ODFIPublishing struct {
Kafka *KafkaConfig
}
func (*ODFIPublishing) Validate ¶ added in v0.3.0
func (cfg *ODFIPublishing) Validate() error
type ODFIReconciliation ¶ added in v0.3.0
type ODFIReturns ¶ added in v0.3.0
type ODFIReturns struct {
Enabled bool
}
type ODFIStorage ¶ added in v0.3.0
type ODFIStorage struct { // Directory is the local filesystem path for downloading files into Directory string // CleanupLocalDirectory determines if we delete the local directory after // processing is finished. Leaving these files around helps debugging, but // also exposes customer information. CleanupLocalDirectory bool // KeepRemoteFiles determines if we delete the remote file on an ODFI's server // after downloading and processing of each file. KeepRemoteFiles bool // RemoveZeroByteFiles determines if we should delete files that are zero bytes RemoveZeroByteFiles bool }
type PagerDutyAlerting ¶
type PagerDutyAlerting struct { ApiKey string // To send an alert event we need to provide the value of // the Integration Key (add API integration to service in PD to get it) // as RoutingKey RoutingKey string }
func (PagerDutyAlerting) Validate ¶
func (cfg PagerDutyAlerting) Validate() error
type SFTP ¶
type SFTP struct { Hostname string Username string Password string ClientPrivateKey string HostPublicKey string DialTimeout time.Duration MaxConnectionsPerFile int MaxPacketSize int }
func (*SFTP) MarshalJSON ¶ added in v0.6.3
func (*SFTP) MaxConnections ¶
func (*SFTP) PacketSize ¶
type Shard ¶
type Shard struct { Name string Cutoffs Cutoffs PreUpload *PreUpload UploadAgent string OutboundFilenameTemplate string Output *Output Notifications *Notifications Audit *AuditTrail }
func (*Shard) FilenameTemplate ¶
type Signer ¶
func (*Signer) MarshalJSON ¶ added in v0.6.3
type TLSConfig ¶ added in v0.6.2
type TLSConfig struct { // CertFile points to a filename containing an X.509 certificate chain usable to // wrap HTTP connections with TLS. CertFile string // KeyFile points to a filename containing a matching private key for encrypting // and signing TLS connections found in CertFile. KeyFile string }
TLSConfig specifies filepaths where a TLS certificate chain and private key can be found.
type UploadAgent ¶
type UploadAgent struct { ID string FTP *FTP SFTP *SFTP Mock *MockAgent Paths UploadPaths Notifications *UploadNotifiers // AllowedIPs is a comma separated list of IP addresses and CIDR ranges // where connections are allowed. If this value is non-empty remote servers // not within these ranges will not be connected to. AllowedIPs string }
func (*UploadAgent) SplitAllowedIPs ¶
func (cfg *UploadAgent) SplitAllowedIPs() []string
type UploadAgents ¶
type UploadAgents struct { Agents []UploadAgent Merging Merging Retry *UploadRetry DefaultAgentID string }
func (UploadAgents) Find ¶
func (ua UploadAgents) Find(id string) *UploadAgent
func (UploadAgents) Validate ¶
func (ua UploadAgents) Validate() error
type UploadNotifiers ¶
type UploadPaths ¶
type UploadRetry ¶
func (*UploadRetry) Validate ¶
func (cfg *UploadRetry) Validate() error
type WebhookConfig ¶ added in v0.2.0
type WebhookConfig struct {
Endpoint string
}
func (*WebhookConfig) Validate ¶ added in v0.3.0
func (cfg *WebhookConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.