Documentation
¶
Index ¶
- Variables
- func AcceptableAccountStatus(acct *moovcustomers.Account) error
- func AcceptableCustomerStatus(cust *moovcustomers.Customer) error
- type Client
- type HealthCheck
- type MockClient
- func (c *MockClient) DecryptAccount(organization, customerID, accountID string) (*moovcustomers.TransitAccountNumber, error)
- func (c *MockClient) FindAccount(organization, customerID, accountID string) (*moovcustomers.Account, error)
- func (c *MockClient) LatestOFACSearch(organization, customerID, requestID string) (*OfacSearch, error)
- func (c *MockClient) Lookup(organization, customerID, requestID string) (*moovcustomers.Customer, error)
- func (c *MockClient) Ping() error
- func (c *MockClient) RefreshOFACSearch(organization, customerID, requestID string) (*OfacSearch, error)
- type OfacSearch
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HttpClient = &http.Client{ Timeout: 10 * time.Second, } )
Functions ¶
func AcceptableAccountStatus ¶ added in v0.9.0
func AcceptableAccountStatus(acct *moovcustomers.Account) error
AcceptableAccountStatus returns an error if the Accounts's status can not be used in a Transfer.
func AcceptableCustomerStatus ¶ added in v0.9.0
func AcceptableCustomerStatus(cust *moovcustomers.Customer) error
AcceptableCustomerStatus returns an error if the Customer's status can not be used in a Transfer.
Types ¶
type Client ¶
type Client interface { Ping() error Lookup(organization string, customerID string, requestID string) (*moovcustomers.Customer, error) FindAccount(organization, customerID, accountID string) (*moovcustomers.Account, error) DecryptAccount(organization, customerID, accountID string) (*moovcustomers.TransitAccountNumber, error) LatestOFACSearch(organization, customerID, requestID string) (*OfacSearch, error) RefreshOFACSearch(organization, customerID, requestID string) (*OfacSearch, error) }
func NewClient ¶
NewClient returns an Client instance and will default to using the Customers address in moov's standard Kubernetes setup.
endpoint is a DNS record responsible for routing us to an Customers instance. Example: http://customers.apps.svc.cluster.local:8080
type HealthCheck ¶ added in v0.9.0
type HealthCheck func() error
func HealthChecker ¶ added in v0.9.0
func HealthChecker(client Client, organization, customerID, accountID string) HealthCheck
HealthChecker verifies the provided customerID and accountID exist and are in acceptable statuses to be used in Transfers. This is used to verify configured Sources such as micro-deposits.
type MockClient ¶
type MockClient struct { Accounts map[string]*moovcustomers.Account Customers []*moovcustomers.Customer Transit *moovcustomers.TransitAccountNumber Result *OfacSearch Err error }
func (*MockClient) DecryptAccount ¶
func (c *MockClient) DecryptAccount(organization, customerID, accountID string) (*moovcustomers.TransitAccountNumber, error)
func (*MockClient) FindAccount ¶
func (c *MockClient) FindAccount(organization, customerID, accountID string) (*moovcustomers.Account, error)
func (*MockClient) LatestOFACSearch ¶
func (c *MockClient) LatestOFACSearch(organization, customerID, requestID string) (*OfacSearch, error)
func (*MockClient) Lookup ¶
func (c *MockClient) Lookup(organization, customerID, requestID string) (*moovcustomers.Customer, error)
func (*MockClient) Ping ¶
func (c *MockClient) Ping() error
func (*MockClient) RefreshOFACSearch ¶
func (c *MockClient) RefreshOFACSearch(organization, customerID, requestID string) (*OfacSearch, error)
Click to show internal directories.
Click to hide internal directories.