Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { // ID defines the ID of the asset (base58 encoded). ID string `json:"ID" bson:"ID"` // Name defines name of the asset. Name string `json:"name" bson:"name"` // Symbol defines the symbol of the asset. Symbol string `json:"symbol" bson:"symbol"` // Supply defines the original total supply of the asset. Supply uint64 `json:"supply" bson:"supply"` // TransactionID defines the transaction ID (base58 encoded) that created this asset. TransactionID string `json:"transactionID" bson:"transactionID"` }
Asset defines the asset to be stored into a mongoDB.
type Service ¶
type Service interface { SaveAsset(ctx context.Context, network string, record *Asset) error LoadAssets(ctx context.Context, network string, ID ...string) ([]*Asset, error) LoadAsset(ctx context.Context, network string, ID string) (*Asset, error) DeleteAssetByID(ctx context.Context, network string, ID string) error DeleteAssetByName(ctx context.Context, network string, name string) error }
Click to show internal directories.
Click to hide internal directories.