Versions in this module Expand all Collapse all v0 v0.2.2 Jul 29, 2023 v0.2.1 Jul 29, 2023 v0.2.0 Jul 29, 2023 Changes in this version type Collection + Sig sig.DeploySig type Token + Sig sig.MintSig type TokenRepo + FindByTickSigUID func(context.Context, string, string, string) (*Token, error) type TokenUsecase + func (uc *TokenUsecase) FindByTickSigUID(ctx context.Context, p, tick, sigUID string) (*Token, error) v0.1.1 Jun 16, 2023 v0.1.0 Jun 6, 2023 Changes in this version + const ProtocolTypeBRC721 + var ProviderSet = wire.NewSet(NewCollectionUsecase, NewTokenUsecase, NewInscriptionUsecase) + type Collection struct + Address string + Attributes []map[string]interface{} + BaseURI string + BlockHeight uint64 + BlockTime time.Time + Description string + ID int + Image string + InscriptionID int64 + InscriptionUID string + Max uint64 + Name string + P string + Supply uint64 + Tick string + TxHash string + type CollectionListOption struct + Limit int + Offset int + Order string + P string + Tick string + type CollectionRepo interface + Count func(context.Context, ...CollectionListOption) (int, error) + Create func(context.Context, *Collection) (*Collection, error) + Delete func(context.Context, int) error + FindByID func(context.Context, int) (*Collection, error) + FindByInscriptionID func(context.Context, int64) ([]*Collection, error) + FindByTick func(context.Context, string, string) (*Collection, error) + List func(context.Context, ...CollectionListOption) ([]*Collection, error) + Update func(context.Context, *Collection) (*Collection, error) + type CollectionUsecase struct + func NewCollectionUsecase(repo CollectionRepo, logger log.Logger) *CollectionUsecase + func (uc *CollectionUsecase) CountCollection(ctx context.Context, opt *CollectionListOption) (int, error) + func (uc *CollectionUsecase) CreateCollection(ctx context.Context, g *Collection) (*Collection, error) + func (uc *CollectionUsecase) DeleteCollection(ctx context.Context, id int) error + func (uc *CollectionUsecase) GetCollection(ctx context.Context, id int) (*Collection, error) + func (uc *CollectionUsecase) GetCollectionByInscriptionID(ctx context.Context, inscriptionID int64) ([]*Collection, error) + func (uc *CollectionUsecase) GetCollectionByTick(ctx context.Context, p string, tick string) (*Collection, error) + func (uc *CollectionUsecase) ListCollections(ctx context.Context, opt *CollectionListOption) ([]*Collection, error) + func (uc *CollectionUsecase) UpdateCollection(ctx context.Context, g *Collection) (*Collection, error) + type Inscription struct + Address string + ContentLength uint64 + ContentType string + GenesisFee uint64 + GenesisHeight uint64 + GenesisTx string + ID int + InscriptionID int64 + Location string + Offset uint64 + Output string + OutputValue uint64 + Timestamp time.Time + UID string + type InscriptionListOption struct + Limit int + Offset int + Order string + type InscriptionRepo interface + Count func(context.Context, ...InscriptionListOption) (int, error) + Create func(context.Context, *Inscription) (*Inscription, error) + Delete func(context.Context, int) error + FindByInscriptionID func(context.Context, int64) (*Inscription, error) + List func(context.Context, ...InscriptionListOption) ([]*Inscription, error) + Update func(context.Context, *Inscription) (*Inscription, error) + type InscriptionUsecase struct + func NewInscriptionUsecase(repo InscriptionRepo, logger log.Logger) *InscriptionUsecase + func (uc *InscriptionUsecase) CountInscriptions(ctx context.Context, opt *InscriptionListOption) (int, error) + func (uc *InscriptionUsecase) CreateInscription(ctx context.Context, g *Inscription) (*Inscription, error) + func (uc *InscriptionUsecase) DeleteInscription(ctx context.Context, id int) error + func (uc *InscriptionUsecase) FindByInscriptionID(ctx context.Context, inscriptionID int64) (*Inscription, error) + func (uc *InscriptionUsecase) ListInscriptions(ctx context.Context, opt *InscriptionListOption) ([]*Inscription, error) + func (uc *InscriptionUsecase) UpdateInscription(ctx context.Context, g *Inscription) (*Inscription, error) + type RedisRepo interface + GetLastInscriptionId func(ctx context.Context) (int64, error) + SetLastInscriptionId func(ctx context.Context, id int64) error + type Token struct + Address string + BlockHeight uint64 + BlockTime time.Time + CollectionID int + ID int + InscriptionID int64 + InscriptionUID string + P string + Tick string + TokenID uint64 + TxHash string + type TokenListOption struct + Limit int + Offset int + Order string + P string + Tick string + type TokenRepo interface + Count func(context.Context, ...TokenListOption) (int, error) + Create func(context.Context, *Token) (*Token, error) + Delete func(context.Context, int) error + FindByInscriptionID func(context.Context, int64) ([]*Token, error) + FindByTickTokenID func(context.Context, string, string, uint64) (*Token, error) + List func(context.Context, ...TokenListOption) ([]*Token, error) + Update func(context.Context, *Token) (*Token, error) + type TokenUsecase struct + func NewTokenUsecase(repo TokenRepo, logger log.Logger) *TokenUsecase + func (uc *TokenUsecase) CountTokens(ctx context.Context, opt *TokenListOption) (int, error) + func (uc *TokenUsecase) CreateToken(ctx context.Context, g *Token) (*Token, error) + func (uc *TokenUsecase) DeleteToken(ctx context.Context, id int) error + func (uc *TokenUsecase) FindByInscriptionID(ctx context.Context, inscriptionID int64) ([]*Token, error) + func (uc *TokenUsecase) FindByTickTokenID(ctx context.Context, p, tick string, tokenID uint64) (*Token, error) + func (uc *TokenUsecase) ListTokens(ctx context.Context, opt *TokenListOption) ([]*Token, error) + func (uc *TokenUsecase) UpdateToken(ctx context.Context, g *Token) (*Token, error)