tools

package
v0.0.0-...-031a617 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountSeedCount = 1000000
	ShardCount       = 10
	CurrencyCodes    = "USDT,BTC,ETH,SOL,BNB,USDC"
)

Variables

This section is empty.

Functions

func DBMigrationUp

func DBMigrationUp(ctx context.Context, driverName, dsn string) error

func DBMigrationUpWithDriver

func DBMigrationUpWithDriver(db *sql.DB, path string) error

func GetPath

func GetPath(paths ...string) string

GetPath returns the absolute path by joining the provided relative paths with the migration project root.

func KafkaTopicCreate

func KafkaTopicCreate(ctx context.Context, brokerAddr string) ([]kafka.TopicResult, error)

func RunAccountSeedData

func RunAccountSeedData(ctx context.Context, driver, dsn string) error

Types

type CreateTopicSpec

type CreateTopicSpec struct {
	Topic             string            `json:"topic"`
	NumPartitions     int               `json:"num_partitions"`
	ReplicationFactor int               `json:"replication_factor"`
	Config            map[string]string `json:"config"`
}

Jump to

Keyboard shortcuts

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