Documentation
¶
Index ¶
- func NewArgsParser(args []Value) *argsParser
- func Reconcile(asset string, senders []Sender, receivers []Receiver) ([]Posting, InterpreterError)
- func RunProgram(ctx context.Context, program parser.Program, vars map[string]string, ...) (*ExecutionResult, InterpreterError)
- type AccountAddress
- type AccountBalance
- type AccountMetadata
- type AccountsMetadata
- type Asset
- type BadArityErr
- type BalanceQuery
- type Balances
- type ExecutionResult
- type InterpreterError
- type InvalidAllotmentInSendAll
- type InvalidAllotmentSum
- type InvalidMonetaryLiteral
- type InvalidNumberLiteral
- type InvalidTypeErr
- type InvalidUnboundedInSendAll
- type Metadata
- type MetadataNotFound
- type MetadataQuery
- type MismatchedCurrencyError
- type MissingFundsErr
- type MissingVariableErr
- type Monetary
- type MonetaryInt
- type NegativeAmountErr
- type NegativeBalanceError
- type Portion
- type Posting
- type QueryBalanceError
- type QueryMetadataError
- type Receiver
- type ReconcileError
- type Sender
- type StaticStore
- type Store
- type String
- type TypeError
- type UnboundFunctionErr
- type UnboundVariableErr
- type Value
- type VariablesMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewArgsParser ¶
func NewArgsParser(args []Value) *argsParser
func Reconcile ¶
func Reconcile(asset string, senders []Sender, receivers []Receiver) ([]Posting, InterpreterError)
func RunProgram ¶
func RunProgram( ctx context.Context, program parser.Program, vars map[string]string, store Store, ) (*ExecutionResult, InterpreterError)
Types ¶
type AccountAddress ¶
type AccountAddress string
func (AccountAddress) String ¶
func (v AccountAddress) String() string
type AccountBalance ¶
type AccountMetadata ¶
type AccountsMetadata ¶
type AccountsMetadata map[string]AccountMetadata
type BadArityErr ¶
func (BadArityErr) Error ¶
func (e BadArityErr) Error() string
type BalanceQuery ¶
For each account, list of the needed assets
type Balances ¶
type Balances map[string]AccountBalance
type ExecutionResult ¶
type ExecutionResult struct { Postings []Posting `json:"postings"` Metadata Metadata `json:"txMeta"` AccountsMetadata AccountsMetadata `json:"accountsMeta"` }
type InterpreterError ¶
type InvalidAllotmentInSendAll ¶
func (InvalidAllotmentInSendAll) Error ¶
func (e InvalidAllotmentInSendAll) Error() string
type InvalidAllotmentSum ¶
func (InvalidAllotmentSum) Error ¶
func (e InvalidAllotmentSum) Error() string
type InvalidMonetaryLiteral ¶
func (InvalidMonetaryLiteral) Error ¶
func (e InvalidMonetaryLiteral) Error() string
type InvalidNumberLiteral ¶
func (InvalidNumberLiteral) Error ¶
func (e InvalidNumberLiteral) Error() string
type InvalidTypeErr ¶
func (InvalidTypeErr) Error ¶
func (e InvalidTypeErr) Error() string
type InvalidUnboundedInSendAll ¶
func (InvalidUnboundedInSendAll) Error ¶
func (e InvalidUnboundedInSendAll) Error() string
type MetadataNotFound ¶
func (MetadataNotFound) Error ¶
func (e MetadataNotFound) Error() string
type MetadataQuery ¶
For each account, list of the needed keys
type MismatchedCurrencyError ¶
func (MismatchedCurrencyError) Error ¶
func (e MismatchedCurrencyError) Error() string
type MissingFundsErr ¶
func (MissingFundsErr) Error ¶
func (e MissingFundsErr) Error() string
type MissingVariableErr ¶
func (MissingVariableErr) Error ¶
func (e MissingVariableErr) Error() string
type Monetary ¶
type Monetary struct { Amount MonetaryInt Asset Asset }
func (Monetary) MarshalJSON ¶
type MonetaryInt ¶
func NewMonetaryInt ¶
func NewMonetaryInt(n int64) MonetaryInt
func (MonetaryInt) MarshalJSON ¶
func (v MonetaryInt) MarshalJSON() ([]byte, error)
func (MonetaryInt) String ¶
func (v MonetaryInt) String() string
type NegativeAmountErr ¶
type NegativeAmountErr struct { parser.Range Amount MonetaryInt }
func (NegativeAmountErr) Error ¶
func (e NegativeAmountErr) Error() string
type NegativeBalanceError ¶
func (NegativeBalanceError) Error ¶
func (e NegativeBalanceError) Error() string
type Portion ¶
func (Portion) MarshalJSON ¶
type QueryBalanceError ¶
func (QueryBalanceError) Error ¶
func (e QueryBalanceError) Error() string
type QueryMetadataError ¶
func (QueryMetadataError) Error ¶
func (e QueryMetadataError) Error() string
type ReconcileError ¶
func (ReconcileError) Error ¶
func (e ReconcileError) Error() string
type StaticStore ¶
type StaticStore struct { Balances Balances Meta AccountsMetadata }
func (StaticStore) GetAccountsMetadata ¶
func (s StaticStore) GetAccountsMetadata(context.Context, MetadataQuery) (AccountsMetadata, error)
func (StaticStore) GetBalances ¶
func (s StaticStore) GetBalances(context.Context, BalanceQuery) (Balances, error)
type Store ¶
type Store interface { GetBalances(context.Context, BalanceQuery) (Balances, error) GetAccountsMetadata(context.Context, MetadataQuery) (AccountsMetadata, error) }
type UnboundFunctionErr ¶
func (UnboundFunctionErr) Error ¶
func (e UnboundFunctionErr) Error() string
type UnboundVariableErr ¶
func (UnboundVariableErr) Error ¶
func (e UnboundVariableErr) Error() string
type VariablesMap ¶
Click to show internal directories.
Click to hide internal directories.