Documentation ¶
Index ¶
- Variables
- func AwaitTermination(logger log.Logger, terminationListener chan error)
- func NewInternalClient(logger log.Logger, config *ClientConfig, name string) *http.Client
- func NewTerminationListener() chan error
- type Admin
- type AuditTrail
- type AuditTrails
- type ClientConfig
- type Config
- type Cutoffs
- type Email
- type ErrorAlerting
- 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 Output
- type PagerDuty
- type PagerDutyAlerting
- type PreUpload
- type SFTP
- type Shard
- type Shards
- type Signer
- type Slack
- type UploadAgent
- type UploadAgents
- type UploadNotifiers
- type UploadPaths
- type UploadRetry
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 | printf "%.2f" }}
Credits: ${{ .CreditTotal | printf "%.2f" }}
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-987654320.ach // - 20191010-0830-987654320.ach.gpg (GPG encrypted) DefaultFilenameTemplate = `{{ date "20060102" }}-{{ date "1504" }}-{{ .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 AuditTrails ¶
type AuditTrails []AuditTrail
func (AuditTrails) Validate ¶
func (cfg AuditTrails) 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 Shards Shards Upload UploadAgents Notifications Notifications AuditTrail AuditTrails 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 FTP ¶
type FTP struct { Hostname string Username string Password string CAFilepath string DialTimeout time.Duration DisabledEPSV bool }
func (*FTP) DisableEPSV ¶
type FlattenBatches ¶
type FlattenBatches struct{}
type GlobalConfig ¶
type GlobalConfig struct {
ACHGateway Config
}
type HTTPConfig ¶
type HTTPConfig struct {
BindAddress string
}
type Inbound ¶
type Inbound struct { HTTP HTTPConfig InMem *InMemory Kafka *KafkaConfig }
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 }
type Merging ¶
type Merging struct { Directory string 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 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) 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 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
Click to show internal directories.
Click to hide internal directories.