Documentation
¶
Index ¶
- Constants
- func AssetIsValid(v string) bool
- func CheckHash(logs ...Log) (int, bool)
- func Hash(t1, t2 interface{}) string
- func HydrateLog(_type string, data string) (interface{}, error)
- func RevertMetadataSpecKey() string
- func RevertedMetadataSpecKey() string
- func SpecMetadata(name string) string
- func ValidateAddress(addr string) bool
- type Account
- type AggregatedVolumes
- type Balances
- type ConstantExpr
- type Contract
- type EvalContext
- type Expr
- type ExprAnd
- type ExprEq
- type ExprGt
- type ExprGte
- type ExprLt
- type ExprLte
- type ExprOr
- type Log
- type Mapping
- type MetaExpr
- type Metadata
- type Posting
- type Postings
- type RevertedMetadataSpecValue
- type Script
- type SetMetadata
- type Transaction
- type TransactionData
- type Transactions
- type Value
- type VariableExpr
- type Volumes
Constants ¶
View Source
const ( MetaTargetTypeAccount = "ACCOUNT" MetaTargetTypeTransaction = "TRANSACTION" )
View Source
const NewTransactionType = "NEW_TRANSACTION"
View Source
const SetMetadataType = "SET_METADATA"
View Source
const (
WORLD = "world"
)
Variables ¶
This section is empty.
Functions ¶
func AssetIsValid ¶
func HydrateLog ¶ added in v1.3.2
func RevertMetadataSpecKey ¶ added in v1.3.2
func RevertMetadataSpecKey() string
func RevertedMetadataSpecKey ¶ added in v1.3.2
func RevertedMetadataSpecKey() string
func SpecMetadata ¶ added in v1.3.2
func ValidateAddress ¶
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 Volumes `json:"volumes,omitempty"` Metadata Metadata `json:"metadata" swaggertype:"object"` }
type AggregatedVolumes ¶ added in v1.3.2
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 Log ¶ added in v1.3.2
type Log struct { ID uint64 `json:"id"` Type string `json:"type"` Data interface{} `json:"data"` Hash string `json:"hash"` Date time.Time `json:"date"` }
func NewSetMetadataLog ¶ added in v1.3.2
func NewSetMetadataLog(previousLog *Log, metadata SetMetadata) Log
func NewTransactionLog ¶ added in v1.3.2
func NewTransactionLog(previousLog *Log, tx Transaction) Log
func NewTransactionLogWithDate ¶ added in v1.3.2
func NewTransactionLogWithDate(previousLog *Log, tx Transaction, time time.Time) Log
type Metadata ¶
type Metadata map[string]json.RawMessage
func ComputeMetadata ¶ added in v1.3.2
func RevertMetadata ¶ added in v1.3.2
func RevertedMetadata ¶ added in v1.3.2
func (Metadata) ConvertValue ¶ added in v1.3.2
func (Metadata) IsReverted ¶
func (Metadata) MarkReverts ¶ added in v1.1.0
type RevertedMetadataSpecValue ¶ added in v1.3.2
type RevertedMetadataSpecValue struct {
By string `json:"by"`
}
type Script ¶
type Script struct { Plain string `json:"plain"` Vars map[string]json.RawMessage `json:"vars" swaggertype:"object"` }
type SetMetadata ¶ added in v1.3.2
type SetMetadata struct { TargetType string `json:"targetType"` TargetID interface{} `json:"targetId"` Metadata Metadata `json:"metadata"` }
func (*SetMetadata) UnmarshalJSON ¶ added in v1.3.2
func (s *SetMetadata) UnmarshalJSON(data []byte) error
type Transaction ¶
type Transaction struct { TransactionData ID uint64 `json:"txid"` Timestamp string `json:"timestamp"` }
func (*Transaction) AppendPosting ¶
func (t *Transaction) AppendPosting(p Posting)
type TransactionData ¶
type TransactionData struct { Postings Postings `json:"postings"` Reference string `json:"reference"` Metadata Metadata `json:"metadata" swaggertype:"object"` }
func (*TransactionData) Reverse ¶ added in v1.3.2
func (t *TransactionData) Reverse() TransactionData
type Transactions ¶
type Transactions struct {
Transactions []TransactionData `json:"transactions" binding:"required,dive"`
}
Transactions struct
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.