registry

package
v0.0.0-...-d88b44b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 1 Imported by: 2

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL