models

package
v0.16.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadEvent

func ReadEvent(data []byte, evt interface{}) error

ReadEvent will unmarshal the event, but assumes the event type is known by the caller.

Types

type AESConfig added in v0.5.0

type AESConfig struct {
	Key string
}

func (*AESConfig) MarshalJSON added in v0.6.2

func (cfg *AESConfig) MarshalJSON() ([]byte, error)

type Batch

type Batch struct {
	Header  *ach.BatchHeader   `json:"batchHeader"`
	Entries []*ach.EntryDetail `json:"entryDetails"`
}

type CancelACHFile added in v0.5.1

type CancelACHFile incoming.CancelACHFile

CancelACHFile is an event that achgateway receives to cancel uploading a file to the ODFI.

type CorrectionFile

type CorrectionFile struct {
	Filename    string    `json:"filename"`
	File        *ach.File `json:"file"`
	Corrections []Batch   `json:"corrections"`
}

CorrectionFile is an event for when an Addenda98 record is found within a file from the ODFI. This is also called a "Notification of Change" (NOC).

File.ID will be set to a hash of the Nacha contents.

func (*CorrectionFile) SetValidation added in v0.7.0

func (evt *CorrectionFile) SetValidation(opts *ach.ValidateOpts)

type EncodingConfig added in v0.5.0

type EncodingConfig struct {
	Base64 bool
}

type EncryptionConfig added in v0.5.0

type EncryptionConfig struct {
	AES *AESConfig
}

type Event

type Event struct {
	Event interface{} `json:"event"`
	Type  string      `json:"type"`
}

func Read added in v0.16.0

func Read(data []byte) (*Event, error)

Read will unmarshal an event and return the wrapper for it.

func (Event) Bytes

func (evt Event) Bytes() []byte

func (Event) MarshalJSON

func (evt Event) MarshalJSON() ([]byte, error)

type FileUploaded

type FileUploaded struct {
	FileID     string    `json:"fileID"`
	ShardKey   string    `json:"shardKey"`
	Filename   string    `json:"filename"`
	UploadedAt time.Time `json:"uploadedAt"`
}

FileUploaded is an event sent after a queued file has been uploaded to the ODFI. The entries and batches may have been merged into a larger file to optimize on cost, network performance, or other configuration.

type IncomingFile

type IncomingFile struct {
	Filename string    `json:"filename"`
	File     *ach.File `json:"file"`
}

IncomingFile is an event for when an ODFI receives an ACH file from another FI signifying entries to process (e.g. another FI is debiting your account).

File.ID will be set to a hash of the Nacha contents.

func (*IncomingFile) SetValidation added in v0.7.0

func (evt *IncomingFile) SetValidation(opts *ach.ValidateOpts)

type PrenoteFile

type PrenoteFile struct {
	Filename string    `json:"filename"`
	File     *ach.File `json:"file"`
	Batches  []Batch   `json:"batches"`
}

PrenoteFile is an event for when an ODFI receives a "pre-notification" ACH file. This type of file is used to validate accounts exist and are usable for ACH.

File.ID will be set to a hash of the Nacha contents.

func (*PrenoteFile) SetValidation added in v0.7.0

func (evt *PrenoteFile) SetValidation(opts *ach.ValidateOpts)

type QueueACHFile added in v0.5.1

type QueueACHFile incoming.ACHFile

QueueACHFile is an event that achgateway receives to enqueue an ACH file for upload to the ODFI at a later cutoff time.

func (*QueueACHFile) SetValidation added in v0.7.0

func (evt *QueueACHFile) SetValidation(opts *ach.ValidateOpts)

type ReconciliationFile

type ReconciliationFile struct {
	Filename        string    `json:"filename"`
	File            *ach.File `json:"file"`
	Reconciliations []Batch   `json:"reconciliations"`
}

ReconciliationFile is a file whose entries match entries initiated with the ODFI.

File.ID will be set to a hash of the Nacha contents.

func (*ReconciliationFile) SetValidation added in v0.7.0

func (evt *ReconciliationFile) SetValidation(opts *ach.ValidateOpts)

type ReturnFile

type ReturnFile struct {
	Filename string    `json:"filename"`
	File     *ach.File `json:"file"`
	Returns  []Batch   `json:"returns"`
}

ReturnFile is an event for when an Addenda99 record is found within a file from the ODFI. This is also called a "return".

File.ID will be set to a hash of the Nacha contents.

func (*ReturnFile) SetValidation added in v0.7.0

func (evt *ReturnFile) SetValidation(opts *ach.ValidateOpts)

type TransformConfig added in v0.5.0

type TransformConfig struct {
	Encoding   *EncodingConfig
	Encryption *EncryptionConfig
}

Jump to

Keyboard shortcuts

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