config

package
v0.0.0-...-af9a2c8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2016 License: Apache-2.0 Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LocalStore string         `json:"local_store"`
	HookSvr    *HookSvrConfig `json:"webhook"`
	Repos      []*Repo        `json:"repos"`
	Consul     *ConsulConfig  `json:"consul"`
}

Config is used to represent the passed in configuration

func Load

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

Load maps the configuration provided from a file to a Configuration object

type ConsulConfig

type ConsulConfig struct {
	Address   string `json:"address"`
	Token     string `json:"token,omitempty"`
	SSLEnable bool   `json:"ssl"`
	SSLVerify bool   `json:"ssl_verify,omitempty"`
}

ConsulConfig is the configuration for the Consul client

type Hook

type Hook struct {
	Type string `json:"type"`

	// Specific to polling
	Interval time.Duration `json:"interval"`

	// Specific to webhooks
	Url string `json:"url,omitempty"`
}

Hook is the configuration for hooks

type HookSvrConfig

type HookSvrConfig struct {
	Address string `json:"address,omitempty"`
	Port    int    `json:"port"`
}

HookSvrConfig is the configuration for the git hoooks server

type Repo

type Repo struct {
	Name     string   `json:"name"`
	Url      string   `json:"url"`
	Branches []string `json:"branches"`
	Hooks    []*Hook  `json:"hooks"`
}

Repo is the configuration for the repository

func (*Repo) String

func (r *Repo) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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