config

package
v0.0.0-...-bc29873 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatConfig

type ChatConfig struct {
	Name   string
	Method string
	Data   map[string]interface{}
}

type Config

type Config struct {
	Chats   []*ChatConfig
	Servers []*ServerConfig
}

func ParseConfig

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

type RawChatConfig

type RawChatConfig struct {
	Name   *string                 `json:"name"`
	Method *string                 `json:"method"`
	Data   *map[string]interface{} `json:"data"`
}

RawChatConfig существует только для проверки на наличие required полей в конфиге

type RawConfig

type RawConfig struct {
	Chats   []*RawChatConfig   `json:"chats"`
	Servers []*RawServerConfig `json:"servers"`
}

RawConfig существует только для проверки на наличие required полей в конфиге

type RawServerConfig

type RawServerConfig struct {
	Name         *string                 `json:"name"`
	Addr         *string                 `json:"addr"`
	Protocol     *string                 `json:"protocol"`
	Chats        *[]string               `json:"chats"`
	MentionsText *string                 `json:"mentions_text"`
	Data         *map[string]interface{} `json:"data"`
}

RawServerConfig существует только для проверки на наличие required полей в конфиге

type ServerConfig

type ServerConfig struct {
	Name         string
	Addr         string
	Protocol     string
	Chats        []string
	MentionsText string
	Data         map[string]interface{}
}

Jump to

Keyboard shortcuts

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