host

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 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.PiroServiceServer, uisrv v1.PiroUIServer) (*Plugins, error)

Start starts all configured plugins

func (*Plugins) AuthProvider

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

func (*Plugins) RepositoryProvider

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

RepositoryProvider provides access to all repo providers contributed via plugins

func (*Plugins) ServeHTTP

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