config

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchFile

func WatchFile(filepath string, handler func(cfg *Config)) error

Types

type Config

type Config struct {
	Addr      string `json:"addr" yaml:"addr"`
	PluginDir string `json:"plugin_dir" yaml:"plugin_dir"`
	Routers   map[string]struct {
		Types   []gitlab.EventType `json:"types" yaml:"types"`
		Handler string             `json:"handler" yaml:"handler"`
	}
}

func LoadAndWatchFile

func LoadAndWatchFile(filepath string, handler func(cfg *Config)) (*Config, error)

func LoadFile

func LoadFile(filePath string) (*Config, error)

Jump to

Keyboard shortcuts

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