Documentation
¶
Index ¶
- Constants
- func AssetIsValid(v string) bool
- func Hash(t1 *Transaction, t2 *Transaction) string
- type Account
- type ConstantExpr
- type Contract
- type EvalContext
- type Expr
- type ExprAnd
- type ExprEq
- type ExprGt
- type ExprGte
- type ExprLt
- type ExprLte
- type ExprOr
- type Mapping
- type MetaExpr
- type Metadata
- type Posting
- type Postings
- type Script
- type Transaction
- type Value
- type VariableExpr
Constants ¶
View Source
const (
WORLD = "world"
)
Variables ¶
This section is empty.
Functions ¶
func AssetIsValid ¶
func Hash ¶
func Hash(t1 *Transaction, t2 *Transaction) string
Types ¶
type Account ¶
type Account struct {
Address string `json:"address" example:"users:001"`
Type string `json:"type,omitempty" example:"virtual"`
Balances map[string]int64 `json:"balances,omitempty" example:"COIN:100"`
Volumes map[string]map[string]int64 `json:"volumes,omitempty"`
Metadata Metadata `json:"metadata" swaggertype:"object"`
}
type ConstantExpr ¶
type ConstantExpr struct {
Value interface{}
}
func (ConstantExpr) MarshalJSON ¶
func (e ConstantExpr) MarshalJSON() ([]byte, error)
type Contract ¶
func (*Contract) UnmarshalJSON ¶
type EvalContext ¶
type ExprAnd ¶
type ExprAnd []Expr
func (ExprAnd) Eval ¶
func (o ExprAnd) Eval(ctx EvalContext) bool
func (ExprAnd) MarshalJSON ¶
type ExprEq ¶
func (*ExprEq) Eval ¶
func (o *ExprEq) Eval(ctx EvalContext) bool
func (ExprEq) MarshalJSON ¶
type ExprGt ¶
func (*ExprGt) Eval ¶
func (o *ExprGt) Eval(ctx EvalContext) bool
func (ExprGt) MarshalJSON ¶
type ExprGte ¶
func (*ExprGte) Eval ¶
func (o *ExprGte) Eval(ctx EvalContext) bool
func (ExprGte) MarshalJSON ¶
type ExprLt ¶
func (*ExprLt) Eval ¶
func (o *ExprLt) Eval(ctx EvalContext) bool
func (ExprLt) MarshalJSON ¶
type ExprLte ¶
func (*ExprLte) Eval ¶
func (o *ExprLte) Eval(ctx EvalContext) bool
func (ExprLte) MarshalJSON ¶
type ExprOr ¶
type ExprOr []Expr
func (ExprOr) Eval ¶
func (o ExprOr) Eval(ctx EvalContext) bool
func (ExprOr) MarshalJSON ¶
type Metadata ¶
type Metadata map[string]json.RawMessage
func (Metadata) IsReverted ¶
func (Metadata) MarkRevertedBy ¶
type Script ¶
type Script struct {
Plain string `json:"plain"`
Vars map[string]json.RawMessage `json:"vars" swaggertype:"object"`
}
type Transaction ¶
type Transaction struct {
ID int64 `json:"txid"`
Postings Postings `json:"postings"`
Reference string `json:"reference"`
Timestamp string `json:"timestamp"`
Hash string `json:"hash" swaggerignore:"true"`
Metadata Metadata `json:"metadata" swaggertype:"object"`
}
func (*Transaction) AppendPosting ¶
func (t *Transaction) AppendPosting(p Posting)
func (*Transaction) Reverse ¶
func (t *Transaction) Reverse() Transaction
type VariableExpr ¶
type VariableExpr struct {
Name string
}
func (VariableExpr) MarshalJSON ¶
func (e VariableExpr) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.