lib

package
v1.0.0-RC3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetWebhookExecTaskConfigMap

func SetWebhookExecTaskConfigMap(config *WebhooksConfig, configMap map[string]genericexec.GenericExecConfig)

Types

type AppConfig

type AppConfig struct {
	BindAddress      string
	LogFile          string
	HttpAuth         *HttpAuthConfig
	PuppetExecutable string
	PuppetConfDir    string
	PuppetConfig     *puppetconfig.PuppetConfig
	GenericExecTasks []*genericexec.GenericExecConfig
	GithubWebhooks   *WebhooksConfig

	Notifications []*NotificationsConfig
	Log           *log.Logger
	// contains filtered or unexported fields
}

func LoadTheConfig

func LoadTheConfig(configName string, configPaths []string) AppConfig

func (*AppConfig) FlushLog

func (ctx *AppConfig) FlushLog()

func (*AppConfig) MoveLoggingToFile

func (ctx *AppConfig) MoveLoggingToFile()

type ExecListener

type ExecListener struct {
	Event      string
	Secret     string
	ExecConfig genericexec.GenericExecConfig
}

func StandardR10kListenerConfig

func StandardR10kListenerConfig(config *WebhooksConfig) ExecListener

type GithubWebhookHttpHandler

type GithubWebhookHttpHandler struct {
	// contains filtered or unexported fields
}

func NewGithubWebhookHttpHandler

func NewGithubWebhookHttpHandler(config *WebhooksConfig, execManager genericexec.GenericExecManagerInterface, log *log.Logger) *GithubWebhookHttpHandler

func (*GithubWebhookHttpHandler) ServeHTTP

func (ctx *GithubWebhookHttpHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)

type HttpAuthConfig

type HttpAuthConfig struct {
	Type   string
	Realm  string
	DbFile string
}

type HttpProtectionMiddlewareFactory

type HttpProtectionMiddlewareFactory struct {
	// contains filtered or unexported fields
}

func NewHttpProtectionMiddlewareFactory

func NewHttpProtectionMiddlewareFactory(config AppConfig) HttpProtectionMiddlewareFactory

func (*HttpProtectionMiddlewareFactory) ServeHTTP

func (ctx *HttpProtectionMiddlewareFactory) ServeHTTP(response http.ResponseWriter, request *http.Request)

func (*HttpProtectionMiddlewareFactory) WrapInProtectionMiddleware

func (ctx *HttpProtectionMiddlewareFactory) WrapInProtectionMiddleware(nestedHandler http.Handler) http.Handler

type HttpServer

type HttpServer struct {
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(config AppConfig, notifier *Notifications, certSigner *certsign.CertSigner, execManager *genericexec.GenericExecManager) *HttpServer

func (*HttpServer) Shutdown

func (c *HttpServer) Shutdown(ctx context.Context) error

func (*HttpServer) Start

func (c *HttpServer) Start()

type Notifications

type Notifications struct {
	// contains filtered or unexported fields
}

func NewNotifications

func NewNotifications(config *AppConfig) *Notifications

func (*Notifications) Notify

func (ctx *Notifications) Notify(message string)

type NotificationsConfig

type NotificationsConfig struct {
	Type       string
	IrcConfig  *irc.Config
	SlackToken *string
}

type ProvisionHttpHandler

type ProvisionHttpHandler struct {
	// contains filtered or unexported fields
}

func NewProvisionHttpHandler

func NewProvisionHttpHandler(appConfig *AppConfig, notifier *Notifications, certSigner *certsign.CertSigner, execManager *genericexec.GenericExecManager) *ProvisionHttpHandler

func (ProvisionHttpHandler) ServeHTTP

func (ctx ProvisionHttpHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)

type TaskResult

type TaskResult struct {
	Complete bool
	Success  bool
	Message  string
}

type WebhooksConfig

type WebhooksConfig struct {
	Secret                     string
	EnableStandardR10kListener bool
	R10kExecutable             string
	Listeners                  []ExecListener
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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