config

package
v0.0.0-...-8009223 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectName = "whisper"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Http       HTTP
	VCSHosting VCSHosting
	Messenger  Messenger
	Storage    Storage
	Handlers   []Handler
}

func LoadDefaultConfigByViper

func LoadDefaultConfigByViper(cfgPath string) (Configuration, error)

func Register

func Register() *Configuration

type HTTP

type HTTP struct {
	Port    string
	Timeout int
}

func (*HTTP) GetTimeout

func (h *HTTP) GetTimeout() time.Duration

type Handler

type Handler struct {
	Route          string
	Action         string
	DefaultChatIDs []int64
}

type Messenger

type Messenger struct {
	Provider dto.MessengerType
	Options  map[string]interface{}
}

type Storage

type Storage struct {
	Provider dto.StorageType
	Options  map[string]interface{}
}

type VCSHosting

type VCSHosting struct {
	Provider dto.VCSHostingType
	Options  map[string]interface{}
}

Jump to

Keyboard shortcuts

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