config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	ClientID   string `json:"client_id,omitempty"`
	SessionID  string `json:"session_id,omitempty"`
	SessionKey string `json:"session_key,omitempty"`
	PinToken   string `json:"pin_token,omitempty"`
	Pin        string `json:"pin,omitempty"`
}

type Config

type Config struct {
	DB      db.Config `json:"db,omitempty"`
	Bot     Bot       `json:"bot,omitempty"`
	Course  Course    `json:"course,omitempty"`
	I18n    I18n      `json:"i18n,omitempty"`
	Deliver Deliver   `json:"deliver,omitempty"`
}

func Load

func Load(configPath string) (*Config, error)

type Course

type Course struct {
	// 课程文件路径
	Path string `json:"path,omitempty"`

	// 答题用的币的 asset id
	CoinAsset  string          `json:"coin_asset,omitempty"`
	CoinAmount decimal.Decimal `json:"coin_amount,omitempty"`

	// 答对奖励
	RewardAssetID string          `json:"reward_asset_id,omitempty"`
	RewardAmount  decimal.Decimal `json:"reward_amount,omitempty"`
}

type Deliver

type Deliver struct {
	ButtonColor   string `json:"button_color,omitempty"`
	BlockDuration int64  `json:"block_duration,omitempty"` // 秒
}

type I18n

type I18n struct {
	Path string `json:"path,omitempty"`
}

Jump to

Keyboard shortcuts

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