host

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config []Registration

Config configures the plugin system

type Error

type Error struct {
	Err error
	Reg *Registration
}

Error is passed down the plugins error chan

type Plugins

type Plugins struct {
	Errchan chan Error
	// contains filtered or unexported fields
}

Plugins represents an initialized plugin system

func Start

func Start(cfg Config, srv v1.WerftServiceServer, uisrv v1.WerftUIServer) (*Plugins, error)

Start starts all configured plugins

func (*Plugins) AuthProvider added in v0.3.0

func (p *Plugins) AuthProvider() auth.AuthenticationProvider

func (*Plugins) RepositoryProvider added in v0.1.1

func (p *Plugins) RepositoryProvider() werft.RepositoryProvider

RepositoryProvider provides access to all repo providers contributed via plugins

func (*Plugins) ServeHTTP added in v0.1.1

func (p *Plugins) ServeHTTP(resp http.ResponseWriter, req *http.Request)

func (*Plugins) Stop

func (p *Plugins) Stop()

Stop stops all plugins

type Registration

type Registration struct {
	Name    string        `yaml:"name"`
	Command []string      `yaml:"command"`
	Type    []common.Type `yaml:"type"`
	Config  yaml.Node     `yaml:"config"`
}

Registration registers a plugin

Jump to

Keyboard shortcuts

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