config

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Param schema.Param
	// contains filtered or unexported fields
}

func New

func New(configDSN, sqliteDir string, useSqlite bool) *Config

func (*Config) Close

func (c *Config) Close()

func (*Config) FeeCollectAddress added in v1.1.4

func (s *Config) FeeCollectAddress() string

func (*Config) GetIPWhiteList added in v1.0.6

func (c *Config) GetIPWhiteList() *map[string]struct{}

func (*Config) GetServeFee

func (c *Config) GetServeFee() int64

func (*Config) GetSpeedFee

func (c *Config) GetSpeedFee() int64

func (*Config) Run

func (c *Config) Run()

type Wdb

type Wdb struct {
	Db *gorm.DB
}

func NewMysqlDb added in v1.0.23

func NewMysqlDb(dsn string) *Wdb

func NewSqliteDb added in v1.0.23

func NewSqliteDb(dbDir string) *Wdb

func (*Wdb) Close

func (w *Wdb) Close()

func (*Wdb) GetAllAvailableIpRateWhitelist added in v1.0.6

func (w *Wdb) GetAllAvailableIpRateWhitelist() ([]schema.IpRateWhitelist, error)

func (*Wdb) GetFee

func (w *Wdb) GetFee() (fee schema.FeeConfig, err error)

func (*Wdb) GetParam added in v1.0.25

func (w *Wdb) GetParam() (param schema.Param, err error)

func (*Wdb) Migrate

func (w *Wdb) Migrate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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