Documentation
¶
Index ¶
- Variables
- func ConvertTokenIDToID(tokenID *big.Int) ([]byte, error)
- func CursorToID(cur string) (int, error)
- func GenerateDCNNode() []byte
- func GenerateWallet() (*ecdsa.PrivateKey, *common.Address, error)
- func IDToCursor(id int) string
- func StartContainerDatabase(ctx context.Context, t *testing.T, migrationsDirRelPath string) (dbs db.Store, container *postgres.PostgresContainer)
- func ValidateFirstLast(first, last *int, maxPageSize int) (int, error)
- func WithSchema(tableName string) string
- type PaginationHelper
Constants ¶
This section is empty.
Variables ¶
View Source
var DBSettings = db.Settings{
Name: "identity_api",
Host: "localhost",
User: "dimo",
Password: "dimo",
}
Functions ¶
func ConvertTokenIDToID ¶ added in v0.4.8
ConvertTokenIDToID converts a token ID to a 32 byte slice. if the token ID is less than 32 bytes, it will be padded with zeros. if the token ID is greater than 32 bytes, it will return an error.
func CursorToID ¶
func GenerateDCNNode ¶
func GenerateDCNNode() []byte
func GenerateWallet ¶
func GenerateWallet() (*ecdsa.PrivateKey, *common.Address, error)
func IDToCursor ¶
func StartContainerDatabase ¶
func StartContainerDatabase(ctx context.Context, t *testing.T, migrationsDirRelPath string) (dbs db.Store, container *postgres.PostgresContainer)
StartContainerDatabase starts postgres container with default test settings, and migrates the db. Caller must terminate container.
func ValidateFirstLast ¶ added in v0.1.7
func WithSchema ¶
Types ¶
type PaginationHelper ¶
type PaginationHelper[T any] struct{}
func (PaginationHelper[T]) DecodeCursor ¶
func (p PaginationHelper[T]) DecodeCursor(cursor string) (*T, error)
func (PaginationHelper[T]) EncodeCursor ¶
func (p PaginationHelper[T]) EncodeCursor(cursor T) (string, error)
Click to show internal directories.
Click to hide internal directories.