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 KafkaConsumerConfig
- type KafkaProducerConfig
- type MergableConfig
- type Merging
- type MockAgent
- type NotificationRetries
- type Notifications
- type ODFICorrections
- type ODFIFiles
- type ODFIIncoming
- type ODFIPrenotes
- type ODFIProcessors
- type ODFIReconciliation
- type ODFIReturns
- type ODFIStorage
- type Output
- type PagerDuty
- type PagerDutyAlerting
- type PreUpload
- type SFTP
- type Shard
- type ShardMapping
- type Sharding
- type Signer
- type Slack
- type SlackAlerting
- 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 achgateway'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 ¶
type AuditTrail struct { ID string BucketURI string BasePath string // e.g. 'incoming' or 'outgoing' GPG *GPG }
func (*AuditTrail) Validate ¶
func (cfg *AuditTrail) Validate() error
type ClientConfig ¶
type Config ¶
type Config struct { Logger log.Logger `json:"-"` Clients *ClientConfig Database database.DatabaseConfig Telemetry telemetry.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 MaxRetries int Template string CompanyName string }
type ErrorAlerting ¶
type ErrorAlerting struct { PagerDuty *PagerDutyAlerting Slack *SlackAlerting }
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 { InMem *InMemory 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 Consumer KafkaConsumerConfig Producer KafkaProducerConfig Transform *models.TransformConfig }
func (*KafkaConfig) Validate ¶ added in v0.3.0
func (cfg *KafkaConfig) Validate() error
type KafkaConsumerConfig ¶ added in v0.20.0
type KafkaConsumerConfig struct{}
KafkaConsumerConfig represents config options from sarama's Config.Consumer type. When these fields are non-zero values they will be set on the pubsub Subscription
type KafkaProducerConfig ¶ added in v0.20.0
type KafkaProducerConfig struct {
MaxMessageBytes int
}
KafkaProducerConfig represents config options from sarama's Config.Producer type. When these fields are non-zero values they will be set on the pubsub Topic
type MergableConfig ¶ added in v0.15.0
type MergableConfig struct { Conditions *ach.Conditions FlattenBatches *FlattenBatches MergeInGroupsOf int }
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 ODFIFiles ¶ added in v0.3.0
type ODFIFiles struct { Processors ODFIProcessors Interval time.Duration ShardNames []string Storage ODFIStorage Audit *AuditTrail }
type ODFIIncoming ¶ added in v0.16.0
type ODFIPrenotes ¶ added in v0.3.0
type ODFIProcessors ¶ added in v0.3.0
type ODFIProcessors struct { Corrections ODFICorrections Incoming ODFIIncoming Reconciliation ODFIReconciliation Prenotes ODFIPrenotes Returns ODFIReturns Validation ach.ValidateOpts }
func (ODFIProcessors) Validate ¶ added in v0.3.0
func (cfg ODFIProcessors) Validate() error
type ODFIReconciliation ¶ added in v0.3.0
type ODFIReturns ¶ added in v0.3.0
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 // SkipDirectoryCreation will configure achgateway to create // directories on the remote server prior to uploading files. SkipDirectoryCreation bool }
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 Mergable MergableConfig OutboundFilenameTemplate string Output *Output Notifications *Notifications Audit *AuditTrail }
func (*Shard) FilenameTemplate ¶
type ShardMapping ¶ added in v0.11.0
func (*ShardMapping) Validate ¶ added in v0.11.0
func (m *ShardMapping) Validate() error
type Sharding ¶ added in v0.3.0
type Sharding struct { Shards []Shard Mappings []ShardMapping Default string }
type Signer ¶
func (*Signer) MarshalJSON ¶ added in v0.6.3
type SlackAlerting ¶ added in v0.16.0
type SlackAlerting struct { // Oauth 2.0 access tokens are generated manually when creating a slack app // https://api.slack.com/authentication/token-types AccessToken string // A default channel can be specified when creating a Slack app, and this config // can override or be used as the default ChannelID string }
func (SlackAlerting) Validate ¶ added in v0.16.0
func (cfg SlackAlerting) Validate() error
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.