config

package
v0.0.0-...-5349944 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnebotApiConfig

type OnebotApiConfig struct {
	Type        string `json:"type" yaml:"type"`         // http, websocket
	Endpoint    string `json:"endpoint" yaml:"endpoint"` // http://
	Secret      string `json:"secret" yaml:"secret"`
	AccessToken string `json:"access_token" yaml:"access-token"`
	Timeout     int64  `json:"timeout" yaml:"timeout"`         // ms
	PostFormat  string `json:"post_format" yaml:"post-format"` // string array
}

type OnebotConfig

type OnebotConfig struct {
	Api   *OnebotApiConfig   `json:"api" yaml:"api"`
	Event *OnebotEventConfig `json:"event" yaml:"event"`
}

func LoadConfig

func LoadConfig(name string) (*OnebotConfig, error)

type OnebotEventConfig

type OnebotEventConfig struct {
	Type        string `json:"type" yaml:"type"` // http-reverse,websocket,websocket-reverse
	Addr        string `json:"addr" yaml:"addr"` // http://\
	Secret      string `json:"secret" yaml:"secret"`
	AccessToken string `json:"access_token" yaml:"access-token"`
	PostFormat  string `json:"post_format" yaml:"post-format"` // string array
}

Jump to

Keyboard shortcuts

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