Documentation ¶
Index ¶
Constants ¶
const EmptyAccountName = ""
EmptyAccountName defines the empty account identifier in an IOV domain
Variables ¶
var Separator = []byte("*")
Separator divides domain name from account name in an IOV starname
Functions ¶
func GetAccountKey ¶
GetAccountKey returns an account key in the form of string given the domain name and the account name
func SecondsToTime ¶
SecondsToTime converts unix seconds to time
func SplitAccountKey ¶
SplitAccountKey takes an account key and splits it into domain name and account name, panics on nil keys.
func TimeToSeconds ¶
TimeToSeconds converts a time.Time to unix seconds timestamp
Types ¶
type BlockchainAddress ¶
type BlockchainAddress struct { // ID defines a blockchain ID ID string // Address is the blockchain address Address string }
BlockchainAddress defines an address coming from different DLTs
type QueryDecoder ¶
QueryDecoder defines a function that decodes query bytes to query models
var DefaultQueryDecode QueryDecoder = json.Unmarshal
DefaultQueryDecode is the default function used to decode query bytes to query models
type QueryEncoder ¶
QueryEncoder defines a function that encodes query models to bytes
var DefaultQueryEncode QueryEncoder = json.Marshal
DefaultQueryEncode is the default function used to marshal query models into bytes
type QueryHandler ¶
type QueryHandler interface { // QueryPath defines the path of the query in the module to retrieve information QueryPath() string // Validate validates the correctness of the query formation in a stateless way Validate() error }
QueryHandler abstracts the functionality of a query handler CONTRACT: must be a struct pointer
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package mock contains utilities and types that simulate behaviour of other components of the app, with the possibility to force outputs.
|
Package mock contains utilities and types that simulate behaviour of other components of the app, with the possibility to force outputs. |
x
|
|
configuration
Package configuration contains the iovns module for handling state configuration such as account
|
Package configuration contains the iovns module for handling state configuration such as account |