server package - github.com/moov-io/ach/server - Go Packages (original) (raw)
- Variables
- func GetLineEnding(r *http.Request) string
- func MakeHTTPHandler(s Service, repo Repository, kitlog gokitlog.Logger) http.Handler
- type Repository
- type Service
This section is empty.
var (
ErrBadRouting = [fmt](/fmt).[Errorf](/fmt#Errorf)("inconsistent mapping between route and handler, %s", bugReportHelp)
ErrFoundABug = [fmt](/fmt).[Errorf](/fmt#Errorf)("snuck into encodeError with err == nil, %s", bugReportHelp))
Inspects the `X-Line-Ending` header. If it is a valid value (CRLF | LF), returns the line ending associated with the selected enum value. Otherwise, defaults to Unix-style newline characters.
Repository is the Service storage mechanism abstraction
NewRepositoryInMemory is an in memory ach storage repository for files
type Service interface {
CreateFile(f *[ach](/github.com/moov-io/ach@v1.53.4).[FileHeader](/github.com/moov-io/ach@v1.53.4#FileHeader)) ([string](/builtin#string), [error](/builtin#error))
GetFile(id [string](/builtin#string)) (*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), [error](/builtin#error))
GetFiles() []*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File)
BuildFile(id [string](/builtin#string)) (*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), [error](/builtin#error))
DeleteFile(id [string](/builtin#string)) [error](/builtin#error)
GetFileContents(id [string](/builtin#string), opts *[ach](/github.com/moov-io/ach@v1.53.4).[WriteOpts](/github.com/moov-io/ach@v1.53.4#WriteOpts)) ([io](/io).[Reader](/io#Reader), [error](/builtin#error))
ValidateFile(id [string](/builtin#string), opts *[ach](/github.com/moov-io/ach@v1.53.4).[ValidateOpts](/github.com/moov-io/ach@v1.53.4#ValidateOpts)) [error](/builtin#error)
BalanceFile(fileID [string](/builtin#string), off *[ach](/github.com/moov-io/ach@v1.53.4).[Offset](/github.com/moov-io/ach@v1.53.4#Offset)) (*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), [error](/builtin#error))
SegmentFileID(id [string](/builtin#string), opts *[ach](/github.com/moov-io/ach@v1.53.4).[SegmentFileConfiguration](/github.com/moov-io/ach@v1.53.4#SegmentFileConfiguration)) (*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), *[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), [error](/builtin#error))
SegmentFile(file *[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), opts *[ach](/github.com/moov-io/ach@v1.53.4).[SegmentFileConfiguration](/github.com/moov-io/ach@v1.53.4#SegmentFileConfiguration)) (*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), *[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), [error](/builtin#error))
FlattenBatches(id [string](/builtin#string)) (*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), [error](/builtin#error))
CreateBatch(fileID [string](/builtin#string), bh [ach](/github.com/moov-io/ach@v1.53.4).[Batcher](/github.com/moov-io/ach@v1.53.4#Batcher)) ([string](/builtin#string), [error](/builtin#error))
GetBatch(fileID [string](/builtin#string), batchID [string](/builtin#string)) ([ach](/github.com/moov-io/ach@v1.53.4).[Batcher](/github.com/moov-io/ach@v1.53.4#Batcher), [error](/builtin#error))
GetBatches(fileID [string](/builtin#string)) [][ach](/github.com/moov-io/ach@v1.53.4).[Batcher](/github.com/moov-io/ach@v1.53.4#Batcher)
DeleteBatch(fileID [string](/builtin#string), batchID [string](/builtin#string)) [error](/builtin#error)
MergeFiles(fileIDs [][string](/builtin#string), files []*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), conditions *[ach](/github.com/moov-io/ach@v1.53.4).[Conditions](/github.com/moov-io/ach@v1.53.4#Conditions)) ([]*[ach](/github.com/moov-io/ach@v1.53.4).[File](/github.com/moov-io/ach@v1.53.4#File), [error](/builtin#error))}
Service is a REST interface for interacting with ACH file structures TODO: Add ctx to function parameters to pass the client security token
func NewService(r Repository) Service
NewService creates a new concrete service