nft

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CategoryVerify

func CategoryVerify(cStr string) *errors.Error

func MetaToData

func MetaToData(c Meta) ([]byte, *errors.Error)

func TagArrVerify

func TagArrVerify(arr []Tag) *errors.Error

func TagVerify

func TagVerify(t Tag) *errors.Error

func TokenVerify

func TokenVerify(cStr string) *errors.Error

Types

type Category

type Category string

func (Category) S

func (c Category) S() string
type Link = string

type Meta

type Meta map[string]string

func NewMeta

func NewMeta() Meta

func (Meta) Put

func (c Meta) Put(code string, val string) *errors.Error

type NFT

type NFT struct {
	VN          vn.ID    `bson:"vn" json:"vn"`
	Category    Category `bson:"category" json:"category"`
	Token       Token    `bson:"token" json:"token"`
	Tag         []Tag    `bson:"tag" json:"tag"`
	Link        Link     `bson:"link" json:"link,omitempty"`
	Title       string   `bson:"title" json:"title,omitempty"`
	Description string   `bson:"desc" json:"desc,omitempty"`
	Meta        Meta     `bson:"meta" json:"meta,omitempty"`
}

func (*NFT) Verify

func (m *NFT) Verify() *errors.Error

type NID

type NID = bid.BID

type Tag

type Tag = string

type Token

type Token string

func (Token) S

func (t Token) S() string

type Wrap

type Wrap struct {
	NID NID  `bson:"nid" json:"nid"`
	NFT *NFT `bson:"nft" json:"nft"`
}

Jump to

Keyboard shortcuts

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