client

package
Version: v0.0.0-...-bb88183 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasiqClient

type BasiqClient struct {
	// contains filtered or unexported fields
}

BasiqClient structure that implements Client interface

func (*BasiqClient) CreateConnection

func (c *BasiqClient) CreateConnection(userID string, connectionData entity.ConnectionData) (*entity.Connection, error)

CreateConnection creates new connection to institution

func (*BasiqClient) CreateUser

func (c *BasiqClient) CreateUser(email string, mobile string) (*entity.User, error)

CreateUser creates new user using Basiq API

func (*BasiqClient) DeleteConnection

func (c *BasiqClient) DeleteConnection(userID string, connectionID string) error

DeleteConnection deletes user connection given connection id and user id

func (*BasiqClient) DeleteUser

func (c *BasiqClient) DeleteUser(userID string) error

DeleteUser deletes user given user id

func (*BasiqClient) GetConnectionsToInstitution

func (c *BasiqClient) GetConnectionsToInstitution(userID string, institution string) (entity.ConnectionCollection, error)

GetConnectionsToInstitution retrieves users connections for specified institution

func (*BasiqClient) GetTransactions

func (c *BasiqClient) GetTransactions(userID string, connectionID string) (entity.TransactionCollection, error)

GetTransactions retireves all transactions given connection id

func (*BasiqClient) GetUser

func (c *BasiqClient) GetUser(userID string) (*entity.User, error)

GetUser retrieves user entitiy using Basiq API

func (*BasiqClient) GetUserTransactionsInInstitution

func (c *BasiqClient) GetUserTransactionsInInstitution(userID string, institutionData entity.ConnectionData) (entity.TransactionCollection, error)

GetUserTransactionsInInstitution retrieves all user transactions for

type Client

type Client interface {
	UsersAPI
	ConnectionsAPI
	TransactionsAPI
}

Client exposes api client interface

func NewBasiqClient

func NewBasiqClient(apiKey string) (Client, error)

NewBasiqClient creates new Basiq cilent instance

type ConnectionsAPI

type ConnectionsAPI interface {
	GetConnectionsToInstitution(userID string, institution string) (entity.ConnectionCollection, error)
	CreateConnection(userID string, connectionData entity.ConnectionData) (*entity.Connection, error)
	DeleteConnection(userID string, connectionID string) error
}

ConnectionsAPI contains methods for manipulating connections

type TransactionsAPI

type TransactionsAPI interface {
	GetTransactions(userID string, connectionID string) (entity.TransactionCollection, error)
	GetUserTransactionsInInstitution(userID string, institutionData entity.ConnectionData) (entity.TransactionCollection, error)
}

TransactionsAPI contains transactions related API

type UsersAPI

type UsersAPI interface {
	GetUser(userID string) (*entity.User, error)
	CreateUser(email string, mobile string) (*entity.User, error)
	DeleteUser(userID string) error
}

UsersAPI contains methods for manipulating with users

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL