Documentation ¶
Index ¶
- Constants
- func GetId(d Payload) (string, error)
- func SubnetToByte(i uint64) []byte
- func TopicToByte(i uint64) []byte
- type Authorization
- type Block
- type ClientHandshake
- type ClientPayload
- type ClientResponse
- type ConnectionState
- type DID
- type DIDString
- type DataType
- type DeliveryClaim
- type DeliveryProof
- type DeviceString
- type ErrorResponse
- type Event
- func (d *Event) BeforeCreate(tx *gorm.DB) (err error)
- func (e Event) EncodeBytes() ([]byte, error)
- func (e Event) GetHash() ([]byte, error)
- func (e Event) GetSignature() string
- func (e Event) GetValidator() PublicKeyString
- func (e *Event) Key() string
- func (e *Event) MsgPack() []byte
- func (e *Event) ToJSON() []byte
- func (e Event) ToString() string
- type EventInterface
- type EventModel
- type EventPath
- type Handshake
- type HandshakeData
- type MainStat
- type Message
- func (msg Message) EncodeBytes() ([]byte, error)
- func (entity Message) GetAgent() DeviceString
- func (entity Message) GetEvent() EventPath
- func (msg Message) GetHash() ([]byte, error)
- func (msg *Message) MsgPack() []byte
- func (msg *Message) ToJSON() string
- func (chatMessage Message) ToString() string
- type MessageAction
- type MessageAttachment
- type Meta
- type Payload
- type Presence
- type PubKeyType
- type PubSubMessage
- type PublicKeyString
- type ResponseInterval
- type ResponseMeta
- type ResponsePayload
- type ServerIdentity
- type SignatureData
- type Stats
- type Subnet
- func (p *Subnet) CanSend(channel string, sender DIDString) bool
- func (item Subnet) EncodeBytes() ([]byte, error)
- func (entity Subnet) GetAgent() DeviceString
- func (entity Subnet) GetEvent() EventPath
- func (item Subnet) GetHash() ([]byte, error)
- func (p *Subnet) IsMember(channel string, sender DIDString) bool
- func (item *Subnet) Key() string
- func (item *Subnet) MsgPack() []byte
- func (item *Subnet) ToJSON() []byte
- func (item Subnet) ToString() string
- type Subscription
- func (sub Subscription) EncodeBytes() ([]byte, error)
- func (sub Subscription) GetAgent() DeviceString
- func (sub Subscription) GetEvent() EventPath
- func (sub Subscription) GetHash() ([]byte, error)
- func (sub *Subscription) Key() string
- func (sub Subscription) MsgPack() []byte
- func (sub Subscription) ToJSON() []byte
- func (subscription Subscription) ToString() string
- type SuccessResponse
- type SyncRequest
- type SyncResponse
- type Topic
- func (p *Topic) CanSend(channel string, sender DIDString) bool
- func (topic Topic) EncodeBytes() ([]byte, error)
- func (topic Topic) GetAgent() DeviceString
- func (topic Topic) GetEvent() EventPath
- func (topic Topic) GetHash() ([]byte, error)
- func (p *Topic) IsMember(channel string, sender DIDString) bool
- func (topic *Topic) Key() string
- func (topic *Topic) MsgPack() []byte
- func (topic *Topic) ToJSON() []byte
- func (topic Topic) ToString() string
- type TopicResponse
- type Wallet
- func (d *Wallet) BeforeCreate(tx *gorm.DB) (err error)
- func (e Wallet) EncodeBytes() ([]byte, error)
- func (entity Wallet) GetAgent() DeviceString
- func (entity Wallet) GetEvent() EventPath
- func (e Wallet) GetHash() ([]byte, error)
- func (e *Wallet) MsgPack() []byte
- func (e *Wallet) ToJSON() []byte
- func (e Wallet) ToString() string
- type WalletBalance
- func (d *WalletBalance) BeforeCreate(tx *gorm.DB) (err error)
- func (e WalletBalance) EncodeBytes() ([]byte, error)
- func (entity WalletBalance) GetAgent() DeviceString
- func (entity WalletBalance) GetEvent() EventPath
- func (e WalletBalance) GetHash() ([]byte, error)
- func (e *WalletBalance) MsgPack() []byte
- func (e *WalletBalance) ToJSON() []byte
- func (e WalletBalance) ToString() string
Constants ¶
View Source
const ( PlatformEthereum string = "ethereum" PlatformBitcoin = "bitcoin" PlatformSolana = "solana" PlatformCosmos = "cosmos" )
Variables ¶
This section is empty.
Functions ¶
func SubnetToByte ¶
func TopicToByte ¶
Types ¶
type Authorization ¶
type Authorization struct { ID string `json:"id" gorm:"type:uuid;not null;primaryKey"` Agent DeviceString `json:"agt" gorm:"uniqueIndex:idx_agent_account"` Meta string `json:"meta,omitempty"` Account DIDString `json:"acct" gorm:"varchar(40),uniqueIndex:idx_agent_account"` Grantor DIDString `json:"gr" gorm:"index"` Priviledge constants.AuthorizationPrivilege `json:"privi"` TopicIds string `json:"topIds"` Timestamp uint64 `json:"ts"` Duration uint64 `json:"du"` SignatureData SignatureData `json:"sigD" gorm:"json;"` Hash string `json:"h" gorm:"unique" ` Event EventPath `json:"e,omitempty" gorm:"index;varchar;"` Subnet string `json:"snet" gorm:"index;char(36)"` }
func (Authorization) EncodeBytes ¶
func (g Authorization) EncodeBytes() ([]byte, error)
func (Authorization) GetAgent ¶
func (entity Authorization) GetAgent() DeviceString
func (Authorization) GetEvent ¶
func (entity Authorization) GetEvent() EventPath
func (Authorization) GetHash ¶
func (g Authorization) GetHash() ([]byte, error)
func (Authorization) ToJSON ¶
func (g Authorization) ToJSON() []byte
func (Authorization) ToString ¶
func (g Authorization) ToString() string
type Block ¶
type Block struct { BlockId string `json:"blId"` Size int `json:"s"` Closed bool `json:"c"` NodeHeight uint64 `json:"nh"` Hash string `json:"h"` Timestamp int `json:"ts"` sync.Mutex }
Block
func BlockFromBytes ¶
func UnpackBlock ¶
type ClientHandshake ¶
type ClientHandshake struct { Signature string `json:"sig"` Signer DIDString `json:"sigr"` // Message string `json:"m"` Protocol constants.Protocol `json:"proto"` ClientSocket *interface{} `json:"ws"` Timestamp int64 `json:"ts"` }
func UnpackClientHandshake ¶
func UnpackClientHandshake(b []byte) (ClientHandshake, error)
func (ClientHandshake) EncodeBytes ¶
func (cs ClientHandshake) EncodeBytes() ([]byte, error)
func (*ClientHandshake) MsgPack ¶
func (hs *ClientHandshake) MsgPack() []byte
func (ClientHandshake) ToJSON ¶
func (cs ClientHandshake) ToJSON() []byte
type ClientPayload ¶
type ClientPayload struct { // Primary Data interface{} `json:"d"` Timestamp int `json:"ts"` EventType uint16 `json:"ty"` Nonce uint64 `json:"nonce"` Account DIDString `json:"acct,omitempty"` // optional public key of sender Validator PublicKeyString `json:"val,omitempty"` // Secondary AA ` qaZAA `q1aZaswq21“ ` ` Signature string `json:"sig"` Hash string `json:"h,omitempty"` Agent DeviceString `gorm:"-" json:"agt"` Subnet string `json:"snet" gorm:"index;"` Page uint16 `json:"page,omitempty" gorm:"_"` PerPage uint16 `json:"perPage,omitempty" gorm:"_"` }
func ClientPayloadFromBytes ¶
func ClientPayloadFromBytes(b []byte) (ClientPayload, error)
func MsgUnpackClientPayload ¶
func MsgUnpackClientPayload(b []byte) (ClientPayload, error)
func (ClientPayload) EncodeBytes ¶
func (msg ClientPayload) EncodeBytes() ([]byte, error)
func (ClientPayload) GetHash ¶
func (msg ClientPayload) GetHash() ([]byte, error)
func (ClientPayload) GetSigner ¶
func (msg ClientPayload) GetSigner() (DeviceString, error)
func (*ClientPayload) MsgPack ¶
func (s *ClientPayload) MsgPack() []byte
func (ClientPayload) ToJSON ¶
func (msg ClientPayload) ToJSON() []byte
func (ClientPayload) ToString ¶
func (msg ClientPayload) ToString() string
type ClientResponse ¶
type ClientResponse struct { Data any `json:"data"` Error string `json:"error,omitempty"` Meta ResponseMeta `json:"_meta"` }
func NewClientResponse ¶
func NewClientResponse(cr ClientResponse) ClientResponse
func (ClientResponse) ToMap ¶
func (cr ClientResponse) ToMap() map[string]any
type ConnectionState ¶
type ConnectionState uint8
const ( OfflineState ConnectionState = 0 OnlineState ConnectionState = 1 )
type DID ¶
type DID struct { Prefix string `json:"pre"` Addr string `json:"addr"` // Platform string `json:"p"` Chain string `json:"ch"` }
func AddressFromBytes ¶
func AddressFromString ¶
func (DID) ToDeviceString ¶
func (address DID) ToDeviceString() DeviceString
type DeliveryClaim ¶
type DeliveryClaim struct { NodeHeight int `json:"nh"` Signature string `json:"sig"` Amount string `json:"a"` Proofs []string `json:"prs"` }
DeliveryClaim
func DeliveryClaimFromBytes ¶
func DeliveryClaimFromBytes(b []byte) (DeliveryClaim, error)
func UnpackDelvieryClaim ¶
func UnpackDelvieryClaim(b []byte) (DeliveryClaim, error)
func (*DeliveryClaim) ToJSON ¶
func (msg *DeliveryClaim) ToJSON() []byte
type DeliveryProof ¶
type DeliveryProof struct { MessageHash string `json:"mH"` MessageSender string `json:"mS"` NodeAddress string `json:"nA"` Timestamp int `json:"ts"` Signature string `json:"sig"` Block string `json:"bl"` Index int `json:"i"` }
DeliveryProof
func DeliveryProofFromBytes ¶
func DeliveryProofFromBytes(b []byte) (DeliveryProof, error)
func (*DeliveryProof) BlockKey ¶
func (msg *DeliveryProof) BlockKey() string
func (DeliveryProof) EncodeBytes ¶
func (msg DeliveryProof) EncodeBytes() ([]byte, error)
func (*DeliveryProof) Key ¶
func (msg *DeliveryProof) Key() string
func (*DeliveryProof) MsgPack ¶
func (msg *DeliveryProof) MsgPack() []byte
func (*DeliveryProof) ToJSON ¶
func (msg *DeliveryProof) ToJSON() []byte
func (DeliveryProof) ToString ¶
func (msg DeliveryProof) ToString() string
type DeviceString ¶
type DeviceString DIDString
type ErrorResponse ¶
type ErrorResponse struct {
// contains filtered or unexported fields
}
func ReturnError ¶
func ReturnError(msg string, code int) *ErrorResponse
type Event ¶
type Event struct { // Primary ID string `gorm:"primaryKey;type:uuid;not null" json:"id,omitempty"` Payload ClientPayload `json:"pld" gorm:"serializer:json" msgpack:",noinline"` Nonce string `json:"nonce" gorm:"type:varchar(80);uniqueIndex:idx_nonce_hash;default:null" msgpack:",noinline"` Timestamp uint64 `json:"ts"` EventType uint16 `json:"t"` Associations []string `json:"assoc" gorm:"type:text[]"` PreviousEventHash EventPath `json:"preE" gorm:"type:varchar;default:null"` AuthEventHash EventPath `json:"authE" gorm:"type:varchar;default:null"` PayloadHash string `json:"pH" gorm:"type:char(64);unique"` // StateHash string `json:"sh"` // Secondary Error string `json:"err"` Hash string `json:"h" gorm:"uniqueIndex:idx_nonce_hash;type:char(64)"` Signature string `json:"sig"` Broadcasted bool `json:"br"` BlockNumber uint64 `json:"blk"` IsValid bool `json:"isVal" gorm:"default:false"` Synced bool `json:"sync" gorm:"default:false"` Validator PublicKeyString `json:"val"` Total int `json:"total"` }
func EventFromJSON ¶
func WalletBalanceFromJSON ¶
func WalletFromJSON ¶
func (Event) EncodeBytes ¶
func (Event) GetSignature ¶
func (Event) GetValidator ¶
func (e Event) GetValidator() PublicKeyString
type EventInterface ¶
type EventInterface interface { EncodeBytes() ([]byte, error) GetValidator() PublicKeyString GetSignature() string }
type EventModel ¶
type EventModel string
const ( AuthEventModel EventModel = "auth" TopicEventModel EventModel = "top" SubscriptionEventModel EventModel = "sub" MessageEventModel EventModel = "msg" SubnetEventModel EventModel = "subnet" WalletEventModel EventModel = "wal" )
type EventPath ¶
type EventPath struct { Model EventModel `json:"mod"` Hash string `json:"h"` Validator PublicKeyString `json:"val"` }
* Event paths define the unique path to an event and its relation to the entitie
*
func EventPathFromString ¶
func NewEventPath ¶
func NewEventPath(validator PublicKeyString, model EventModel, hash string) *EventPath
func (EventPath) GormDataType ¶
type Handshake ¶
type Handshake struct { Data HandshakeData `json:"data"` Signature string `json:"s"` Signer string `json:"sigr"` }
func CreateHandshake ¶
func HandshakeFromBytes ¶
func HandshakeFromJSON ¶
func HandshakeFromString ¶
func UnpackHandshake ¶
type HandshakeData ¶
type HandshakeData struct { Timestamp int `json:"ts"` ProtocolId string `json:"proId"` Name string `json:"n"` NodeType uint `json:"nT"` }
* NODE ANDSHAKE MESSAGE *
func (HandshakeData) EncodeBytes ¶
func (hsd HandshakeData) EncodeBytes() ([]byte, error)
func (*HandshakeData) ToJSON ¶
func (hsd *HandshakeData) ToJSON() []byte
func (HandshakeData) ToString ¶
func (hsd HandshakeData) ToString() string
type Message ¶
type Message struct { ID string `json:"id" gorm:"type:uuid;primaryKey;not null"` // Timestamp uint64 `json:"ts"` TopicId string `json:"topId,omitempty"` Sender DIDString `json:"s"` // OwnerAddress string `json:"oA"` Receiver DIDString `json:"r,omitempty"` Data string `json:"d"` DataType string `json:"dTy"` Actions []MessageAction `json:"a" gorm:"json;"` // Length int `json:"len"` Agent DeviceString `json:"agt,omitempty" binding:"required" gorm:"not null;type:varchar(100)"` /// DERIVED Event EventPath `json:"e,omitempty" gorm:"index;char(64);"` Hash string `json:"h"` Attachments []MessageAttachment `json:"atts" gorm:"json;"` // Subject string `json:"s"` Signature string `json:"sig"` // Origin string `json:"o"` DataHash string `json:"dH"` Url string `json:"url"` }
func MessageFromBytes ¶
func MessageFromString ¶
func (Message) EncodeBytes ¶
func (Message) GetAgent ¶
func (entity Message) GetAgent() DeviceString
type MessageAction ¶
type MessageAction struct { Contract string `json:"c"` Abi string `json:"abi"` Action string `json:"a"` Parameters []string `json:"pa"` }
func (MessageAction) EncodeBytes ¶
func (a MessageAction) EncodeBytes() []byte
type MessageAttachment ¶
func (MessageAttachment) EncodeBytes ¶
func (b MessageAttachment) EncodeBytes() []byte
type Presence ¶
type Presence struct { Account DIDString `json:"acct"` MetaData json.RawMessage `json:"metaD"` ConnectionState ConnectionState `json:"connS"` ActiveAgo uint64 `json:"actA"` }
type PubKeyType ¶
type PubKeyType string
const ( TendermintsSecp256k1PubKey PubKeyType = "tendermint/PubKeySecp256k1" EthereumPubKey PubKeyType = "ethereum" )
type PubSubMessage ¶
type PubSubMessage struct {
Data msgpack.RawMessage `json:"d"`
}
PubSubMessage
func NewPubSubMessage ¶
func NewPubSubMessage(data []byte) PubSubMessage
func PubSubMessageFromBytes ¶
func PubSubMessageFromBytes(b []byte) (PubSubMessage, error)
func UnpackPubSubMessage ¶
func UnpackPubSubMessage(b []byte) (PubSubMessage, error)
func (*PubSubMessage) EncodeBytes ¶
func (msg *PubSubMessage) EncodeBytes() ([]byte, error)
func (*PubSubMessage) MsgPack ¶
func (msg *PubSubMessage) MsgPack() []byte
func (*PubSubMessage) ToJSON ¶
func (msg *PubSubMessage) ToJSON() []byte
func (*PubSubMessage) ToString ¶
func (msg *PubSubMessage) ToString() string
type PublicKeyString ¶
type PublicKeyString string
type ResponseInterval ¶
type ResponseMeta ¶
type ResponsePayload ¶
type ServerIdentity ¶
type ServerIdentity struct { Signature string `json:"sig"` Signer string `json:"sigr"` Message string `json:"m"` Address string `json:"addr"` }
func UnpackServerIdentity ¶
func UnpackServerIdentity(b []byte) (ServerIdentity, error)
func (*ServerIdentity) MsgPack ¶
func (hs *ServerIdentity) MsgPack() []byte
type SignatureData ¶
type SignatureData struct { Type PubKeyType `json:"ty"` PublicKey string `json:"pubK,omitempty"` Signature string `json:"sig"` }
func (SignatureData) GormDataType ¶
func (sD SignatureData) GormDataType() string
func (*SignatureData) Scan ¶
func (sD *SignatureData) Scan(value interface{}) error
type Stats ¶
type Stats struct { ID string `json:"id" gorm:"type:uuid;primaryKey;not null"` BlockNumber uint64 `json:"blk"` EventCount uint64 `json:"eC"` MessageCount uint64 `json:"mC"` TopicCount uint64 `json:"tC"` AuthorizationCount uint64 `json:"authC"` Cycle uint64 `json:"cy"` Epoch uint64 `json:"ep"` MessageCost string `json:"mCo"` }
type Subnet ¶
type Subnet struct { ID string `json:"id" gorm:"type:uuid;primaryKey;not null"` Meta string `json:"meta,omitempty"` Ref string `json:"ref,omitempty" gorm:"unique;type:varchar(64);default:null"` Categories pq.Int32Array `gorm:"type:integer[]"` Owner DIDString `json:"own,omitempty" binding:"required" gorm:"not null;type:varchar(100)"` SignatureData SignatureData `json:"sigD" gorm:"json;"` Status uint8 `json:"st" gorm:"boolean;default:0"` Timestamp uint64 `json:"ts,omitempty" binding:"required"` Balance uint64 `json:"bal" gorm:"default:0"` // Readonly Account DIDString `json:"acct,omitempty" binding:"required" gorm:"not null;type:varchar(100)"` Agent DeviceString `json:"_" gorm:"_"` // Derived Event EventPath `json:"e,omitempty" gorm:"index;varchar;"` Hash string `json:"h,omitempty" gorm:"type:char(64)"` }
func SubnetFromBytes ¶
func UnpackSubnet ¶
func (Subnet) EncodeBytes ¶
func (Subnet) GetAgent ¶
func (entity Subnet) GetAgent() DeviceString
type Subscription ¶
type Subscription struct { ID string `gorm:"primaryKey;type:char(36);not null" json:"id,omitempty"` Topic string `json:"top" form:"top" gorm:"not null;uniqueIndex:idx_sub_topic;type:char(36);index"` Ref string `json:"ref" gorm:"unique;type:varchar(100)"` Meta string `json:"meta" gorm:"type:varchar(100);"` Subnet string `json:"snet" gorm:"not null;uniqueIndex:idx_ref_subnet;type:varchar(36);index"` Subscriber DIDString `json:"sub" gorm:"not null;uniqueIndex:idx_sub_topic;type:varchar(100);index"` // Device DeviceString `json:"dev,omitempty" binding:"required" gorm:"not null;uniqueIndex:idx_acct_dev_topic;type:varchar(100);index"` Status constants.SubscriptionStatuses `json:"st" gorm:"not null;type:smallint;default:2"` Role constants.SubscriberPrivilege `json:"rol" gorm:"default:0"` // Signature string `json:"sig"` Timestamp uint64 `json:"ts"` Hash string `json:"h" gorm:"unique" ` Event EventPath `json:"e" gorm:"index;char(64);"` Agent DeviceString `json:"agt,omitempty" gorm:"not null;type:varchar(100);index"` }
func SubscriptionFromBytes ¶
func SubscriptionFromBytes(b []byte) (Subscription, error)
func UnpackSubscription ¶
func UnpackSubscription(b []byte) (Subscription, error)
func (Subscription) EncodeBytes ¶
func (sub Subscription) EncodeBytes() ([]byte, error)
func (Subscription) GetAgent ¶
func (sub Subscription) GetAgent() DeviceString
func (Subscription) GetEvent ¶
func (sub Subscription) GetEvent() EventPath
func (Subscription) GetHash ¶
func (sub Subscription) GetHash() ([]byte, error)
func (*Subscription) Key ¶
func (sub *Subscription) Key() string
func (Subscription) MsgPack ¶
func (sub Subscription) MsgPack() []byte
func (Subscription) ToJSON ¶
func (sub Subscription) ToJSON() []byte
func (Subscription) ToString ¶
func (subscription Subscription) ToString() string
type SuccessResponse ¶
type SuccessResponse struct { Body ClientPayload Meta Meta }
type SyncRequest ¶
type SyncRequest struct { Interval ResponseInterval `json:"inter"` TopicIds string `json:"topIds"` }
* SYNC REQUEST PAYLOAD *
type SyncResponse ¶
type SyncResponse struct { TimeFrame ResponseInterval `json:"time,omitempty"` Authorization []Authorization `json:"auths,omitempty"` Presence []Presence `json:"presence,omitempty"` Topics map[string]TopicResponse `json:"topics,omitempty"` }
type Topic ¶
type Topic struct { ID string `json:"id" gorm:"type:uuid;primaryKey;not null"` // Name string `json:"n,omitempty" binding:"required"` Ref string `json:"ref,omitempty" binding:"required" gorm:"uniqueIndex:idx_unique_subnet_ref;type:varchar(64);default:null"` Meta string `json:"meta,omitempty"` ParentTopicHash string `json:"pTH,omitempty" gorm:"type:char(64)"` SubscriberCount uint64 `json:"sC,omitempty"` Account DIDString `json:"acct,omitempty" binding:"required" gorm:"not null;type:varchar(100)"` Agent DeviceString `json:"agt,omitempty" binding:"required" gorm:"not null;type:varchar(100)"` // Public *bool `json:"pub,omitempty" gorm:"default:false"` ReadOnly *bool `json:"rO,omitempty" gorm:"default:false"` // Derived Event EventPath `json:"e,omitempty" gorm:"index;varchar;"` Hash string `json:"h,omitempty" gorm:"type:char(64)"` // Signature string `json:"sig,omitempty" binding:"required" gorm:"non null;"` // Broadcasted bool `json:"br,omitempty" gorm:"default:false;"` Timestamp uint64 `json:"ts,omitempty" binding:"required"` Subnet string `json:"snet" gorm:"uniqueIndex:idx_unique_subnet_ref;type:char(36);"` }
func TopicFromBytes ¶
func UnpackTopic ¶
func (Topic) EncodeBytes ¶
func (Topic) GetAgent ¶
func (topic Topic) GetAgent() DeviceString
type TopicResponse ¶
type Wallet ¶
type Wallet struct { // Primary ID string `gorm:"primaryKey;type:uuid;not null" json:"id,omitempty"` Account DIDString `json:"acct"` Subnet string `json:"snet" gorm:"type:varchar(32);index;not null" msgpack:",noinline"` Name string `json:"n" gorm:"type:varchar(12);not null"` Symbol string `json:"sym" gorm:"type:varchar(8);not null"` Timestamp uint64 `json:"ts"` Agent DeviceString `json:"agt,omitempty" binding:"required" gorm:"not null;type:varchar(100)"` // Derived Event EventPath `json:"e,omitempty" gorm:"index;varchar;"` Hash string `json:"h,omitempty" gorm:"type:char(64)"` }
func (Wallet) EncodeBytes ¶
func (Wallet) GetAgent ¶
func (entity Wallet) GetAgent() DeviceString
type WalletBalance ¶
type WalletBalance struct { // Primary ID string `gorm:"primaryKey;type:uuid;not null" json:"id,omitempty"` Account DIDString `json:"acct" gorm:"type:varchar(64);uniqueIndex:idx_wallet_acct;not null"` Wallet string `json:"wal" gorm:"type:char(36);uniqueIndex:idx_wallet_acct;not null"` Balance big.Int `json:"bal" gorm:"index;not null;default:0"` Agent DeviceString `json:"agt,omitempty" binding:"required" gorm:"not null;type:varchar(100)"` // Derived Event EventPath `json:"e,omitempty" gorm:"index;not null;varchar;"` Timestamp uint64 `json:"ts"` }
func (*WalletBalance) BeforeCreate ¶
func (d *WalletBalance) BeforeCreate(tx *gorm.DB) (err error)
func (WalletBalance) EncodeBytes ¶
func (e WalletBalance) EncodeBytes() ([]byte, error)
func (WalletBalance) GetAgent ¶
func (entity WalletBalance) GetAgent() DeviceString
func (WalletBalance) GetEvent ¶
func (entity WalletBalance) GetEvent() EventPath
func (WalletBalance) GetHash ¶
func (e WalletBalance) GetHash() ([]byte, error)
func (*WalletBalance) MsgPack ¶
func (e *WalletBalance) MsgPack() []byte
func (*WalletBalance) ToJSON ¶
func (e *WalletBalance) ToJSON() []byte
func (WalletBalance) ToString ¶
func (e WalletBalance) ToString() string
Click to show internal directories.
Click to hide internal directories.