config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 10 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) GetIPWhiteList

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

func NewMysqlDb(dsn string) *Wdb

func NewSqliteDb

func NewSqliteDb(dbDir string) *Wdb

func (*Wdb) Close

func (w *Wdb) Close()

func (*Wdb) GetAllAvailableIpRateWhitelist

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

func (*Wdb) GetFee

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

func (*Wdb) GetParam

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