validator

package
v0.5.0-dev2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusInit      = "init"
	StatusCompleted = "completed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepository

type MockRepository struct {
	Validations []*Validation
	Err         error
}

func (*MockRepository) Close

func (r *MockRepository) Close() error

func (*MockRepository) CreateValidation

func (r *MockRepository) CreateValidation(validation *Validation) error

func (*MockRepository) GetValidation

func (r *MockRepository) GetValidation(accountID, validationID string) (*Validation, error)

func (*MockRepository) UpdateValidation

func (r *MockRepository) UpdateValidation(validation *Validation) error

type Repository

type Repository interface {
	CreateValidation(*Validation) error
	GetValidation(accountID, validationID string) (*Validation, error)
	UpdateValidation(*Validation) error
}

func NewRepo

func NewRepo(db *sql.DB) Repository

type Strategy

type Strategy interface {
	InitAccountValidation(userID, accountID, customerID string) (*VendorResponse, error)
	CompleteAccountValidation(userID, customerID string, account *client.Account, accountNumber string, request *VendorRequest) (*VendorResponse, error)
}

type StrategyKey

type StrategyKey struct {
	Strategy string
	Vendor   string
}

type Validation

type Validation struct {
	ValidationID string
	AccountID    string
	Status       string
	Strategy     string
	Vendor       string
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

type VendorRequest

type VendorRequest map[string]interface{}

type VendorResponse

type VendorResponse map[string]interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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