Documentation ¶
Index ¶
- Constants
- Variables
- type Attribute
- type AttributeRarity
- type Generate
- func (g *Generate) Exists(n NFT) bool
- func (g *Generate) GenerateN(n uint) error
- func (g *Generate) Image(n *NFT) error
- func (g *Generate) ImagesDir() string
- func (g *Generate) Init() error
- func (g *Generate) Max() int
- func (g *Generate) MaxAttribute(a Attribute) int
- func (g *Generate) Metadata(n *NFT) error
- func (g *Generate) MetadataDir() string
- func (g *Generate) NewNFT() (*NFT, error)
- func (g *Generate) NftCount() int
- func (g *Generate) Progress(ctx context.Context, n uint)
- func (g *Generate) Rarities() map[string]map[string]AttributeRarity
- func (g *Generate) RaritiesFile() string
- func (g *Generate) Save(ctx context.Context)
- func (g *Generate) SetImagePath(n *NFT, image string) error
- func (g *Generate) Upload(path string) (string, error)
- func (g *Generate) WriteRarities() error
- type NFT
Constants ¶
View Source
const ( MAX_RETRIES = 10000 MAX_NFT_RETRIES = 100 METADATA_DIR = "metadata" IMAGE_DIR = "images" RARITIES_FILE = "rarities.json" )
Variables ¶
View Source
var ErrNftFailed = fmt.Errorf("failed to produce valid NFT")
Functions ¶
This section is empty.
Types ¶
type AttributeRarity ¶
type Generate ¶
type Generate struct { AttrMax map[Attribute]int AttrCount map[Attribute]int // contains filtered or unexported fields }
func (*Generate) MaxAttribute ¶
func (*Generate) MetadataDir ¶
func (*Generate) RaritiesFile ¶
func (*Generate) WriteRarities ¶
Click to show internal directories.
Click to hide internal directories.