operation

package
v0.0.0-...-d4303dc Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertTokenCommunityMemberships

func InsertTokenCommunityMemberships(ctx context.Context, q *db.Queries, memberships []db.TokenCommunityMembership, contractIDs []persist.DBID) ([]db.TokenCommunityMembership, error)

func InsertTokenDefinitions

func InsertTokenDefinitions(ctx context.Context, q *db.Queries, tokens []db.TokenDefinition) ([]db.TokenDefinition, []bool, error)

Types

type TokenFullDetails

type TokenFullDetails struct {
	Instance   db.Token
	Contract   db.Contract
	Definition db.TokenDefinition
}

func InsertTokens

func InsertTokens(ctx context.Context, q *db.Queries, tokens []UpsertToken, opt TokenUpsertParams) (time.Time, []TokenFullDetails, error)

func TokenFullDetailsByUserTokenIdentifiers

func TokenFullDetailsByUserTokenIdentifiers(ctx context.Context, q *db.Queries, userID persist.DBID, tID persist.TokenIdentifiers) (TokenFullDetails, error)

type TokenUpsertDeletionParams

type TokenUpsertDeletionParams struct {
	DeleteCreatorStatus bool
	DeleteHolderStatus  bool
	OnlyFromUserID      *persist.DBID
	OnlyFromContracts   []persist.DBID
	OnlyFromChains      []persist.Chain
}

func (*TokenUpsertDeletionParams) ToParams

type TokenUpsertParams

type TokenUpsertParams struct {
	SetCreatorFields bool
	SetHolderFields  bool

	// If OptionalDelete is nil, no delete will be performed
	OptionalDelete *TokenUpsertDeletionParams
}

type UpsertToken

type UpsertToken struct {
	Token db.Token
	// Identifiers aren't saved to the database, but are used for joining the token to its definitions
	Identifiers persist.TokenIdentifiers
}

Jump to

Keyboard shortcuts

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