config

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name    string `mapstructure:"name"`
	Version string `mapstructure:"version"`
}

type Config

type Config struct {
	App          `mapstructure:"app"`
	HTTP         `mapstructure:"http"`
	Logger       `mapstructure:"logger"`
	WeCom        `mapstructure:"wecom"`
	GPT          `mapstructure:"gpt"`
	Database     `mapstructure:"database"`
	Conversation `mapstructure:"conversation"`
}

func New

func New(path string) (*Config, error)

type Conversation added in v0.1.1

type Conversation struct {
	CloseSessionFlag  string `mapstructure:"closeSessionFlag"`
	CloseSessionReply string `mapstructure:"closeSessionReply"`
	EnableEnterEvent  bool   `mapstructure:"enableEnterEvent"`
	EnterEventReply   string `mapstructure:"enterEventReply"`
}

type Database

type Database struct {
	Driver     string `mapstructure:"driver"`
	DataSource string `mapstructure:"dataSource"`
}

type GPT

type GPT struct {
	ApiKey string `mapstructure:"api_key"`
}

type HTTP

type HTTP struct {
	Port string `mapstructure:"port"`
}

type Logger

type Logger struct {
	Level                 string `mapstructure:"level"`
	FileLoggingEnabled    bool   `mapstructure:"file_enabled"`
	ConsoleLoggingEnabled bool   `mapstructure:"console_enabled"`
	Filename              string `mapstructure:"filename"`
}

type WeCom

type WeCom struct {
	CorpId         string `mapstructure:"corp_id"`
	CorpSecret     string `mapstructure:"corp_secret"`
	AgentId        int64  `mapstructure:"agent_id"`
	EncodingAESKey string `mapstructure:"encoding_aes_key"`
	Token          string `mapstructure:"token"`
	Url            string `mapstructure:"url"`
}

Jump to

Keyboard shortcuts

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