Documentation
¶
Overview ¶
Package ranjit defines the public API types and Go client.
Index ¶
- Variables
- func NewID(prefix string) string
- func StableID(prefix, owner, externalID string) string
- type APIError
- type Account
- type Client
- func (c *Client) Accounts(ctx context.Context, connectionID, cursor string, limit int) (Page[Account], error)
- func (c *Client) Connect(ctx context.Context, input ConnectRequest) (ConnectResponse, error)
- func (c *Client) Connection(ctx context.Context, id string) (Connection, error)
- func (c *Client) Connections(ctx context.Context, customer, cursor string, limit int) (Page[Connection], error)
- func (c *Client) Import(ctx context.Context, input io.Reader, opts ImportOptions) (ImportResult, error)
- func (c *Client) Institutions(ctx context.Context) (Page[Institution], error)
- func (c *Client) Job(ctx context.Context, id string) (Job, error)
- func (c *Client) Revoke(ctx context.Context, connectionID string) error
- func (c *Client) Status(ctx context.Context, connectionID string) (ConnectionStatus, error)
- func (c *Client) Sync(ctx context.Context, connectionID string) (Job, error)
- func (c *Client) Transactions(ctx context.Context, accountID, cursor string, limit int) (Page[Transaction], error)
- type ConnectRequest
- type ConnectResponse
- type Connection
- type ConnectionStatus
- type ImportOptions
- type ImportResult
- type Institution
- type Job
- type Money
- type Page
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrConflict = errors.New("connection is not active") ErrInvalid = errors.New("invalid input") ErrConsent = errors.New("authorization link is invalid, expired or already used") ErrLease = errors.New("job lease is no longer valid") ErrProviderCredentials = errors.New("provider credentials are invalid, missing required scopes or have changed") )
Functions ¶
Types ¶
type Client ¶
func (*Client) Connect ¶
func (c *Client) Connect(ctx context.Context, input ConnectRequest) (ConnectResponse, error)
func (*Client) Connection ¶
func (*Client) Connections ¶
func (*Client) Import ¶
func (c *Client) Import(ctx context.Context, input io.Reader, opts ImportOptions) (ImportResult, error)
Import uploads a local OFX/CSV export. Requests are limited to 8 MiB.
func (*Client) Institutions ¶
func (*Client) Transactions ¶
type ConnectRequest ¶
type ConnectResponse ¶
type ConnectResponse struct {
Connection Connection `json:"connection"`
AuthorizationURL string `json:"authorization_url,omitempty"`
AuthorizationExpiresAt time.Time `json:"authorization_expires_at,omitzero"`
}
type Connection ¶
type Connection struct {
ID string `json:"id"`
CustomerID string `json:"customer_id"`
InstitutionID string `json:"institution_id"`
Provider string `json:"provider"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
ConsentExpiresAt time.Time `json:"consent_expires_at,omitzero"`
LastSyncedAt *time.Time `json:"last_synced_at,omitempty"`
AuthorizationMode string `json:"authorization_mode"`
CredentialID string `json:"-"`
}
type ConnectionStatus ¶
type ImportOptions ¶
type ImportResult ¶
type Institution ¶
type Institution struct {
ID string `json:"id"`
Name string `json:"name"`
Provider string `json:"provider"`
Sandbox bool `json:"sandbox"`
ConnectionMode string `json:"connection_mode"`
DataCoverage []string `json:"data_coverage"`
Validation string `json:"validation"`
Profile string `json:"profile,omitempty"`
}
type Job ¶
type Job struct {
ID string `json:"id"`
ConnectionID string `json:"connection_id"`
Status string `json:"status"`
Attempts int `json:"attempts"`
ErrorCode string `json:"error_code,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
LeaseToken string `json:"-"`
RequestsCompleted int `json:"requests_completed"`
}
type Money ¶
Money uses signed minor units. BRL 12.34 is 1234; debits are negative. Values are restricted to the exact integer range supported by JSON clients.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
ranjit
command
|
|
|
examples
|
|
|
connect
command
Run with make example.
|
Run with make example. |
|
internal
|
|
|
app
Package app assembles configured providers without exposing credentials to the API.
|
Package app assembles configured providers without exposing credentials to the API. |
|
provider
Package provider is the boundary for fetching normalized financial data.
|
Package provider is the boundary for fetching normalized financial data. |
|
provider/c6
Package c6 reads the operator's own C6 Empresas statement using the bank's own API.
|
Package c6 reads the operator's own C6 Empresas statement using the bank's own API. |
|
provider/efi
Package efi connects to the operator's own Efí account through the official Pix API.
|
Package efi connects to the operator's own Efí account through the official Pix API. |
|
provider/inter
Package inter reads the operator's own Inter Empresas account using the Banking API.
|
Package inter reads the operator's own Inter Empresas account using the Banking API. |
|
provider/santander
Package santander reads the operator's own Santander Empresas account using Bank Account Information.
|
Package santander reads the operator's own Santander Empresas account using Bank Account Information. |
|
provider/sicoob
Package sicoob reads the operator's own Sicoob account using the Conta Corrente API.
|
Package sicoob reads the operator's own Sicoob account using the Conta Corrente API. |
|
statement
Package statement reads local bank exports.
|
Package statement reads local bank exports. |
Click to show internal directories.
Click to hide internal directories.