config

package
v0.0.0-...-64f7ebe Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigPath = "config.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HtpasswdPath     string          `json:"htpasswdPath"`
	Port             uint16          `json:"port"`
	RepositoryData   []RawRepository `json:"repositories"`
	SSLCertificate   string          `json:"sslCertificate"`
	SSLKey           string          `json:"sslKey"`
	TokenStorePath   string          `json:"tokenStorePath"`
	UseTLS           bool            `json:"useTLS"`
	WebhookStorePath string          `json:"webhookStorePath"`

	Repositories map[string]repositories.Repository `json:"-"`
}

func Load

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

func (*Config) RepositorySet

func (cfg *Config) RepositorySet() (repos map[string]struct{})

Return the set of repository names.

See `hooks.LoadStore()`.

type ConfigWatcher

type ConfigWatcher struct {
	NewConfig <-chan *Config
	Errors    <-chan error
	// contains filtered or unexported fields
}

func Watch

func Watch(path string) *ConfigWatcher

func (*ConfigWatcher) ForceReload

func (cw *ConfigWatcher) ForceReload() (*Config, error)

type RawRepository

type RawRepository struct {
	Name string `json:"name"`
	Path string `json:"path"`
	Scm  string `json:"scm"`
}

Jump to

Keyboard shortcuts

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