generator

package
v0.0.0-...-41ae34d Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPlugin = *NewPlugin()

DefaultPlugin is default instance of Plugin.

Functions

func RegisterFlags

func RegisterFlags()

RegisterFlags registers command line flags.

Types

type Deps

type Deps struct {
	infra.PluginDeps
}

Deps groups the dependencies of the Rest Plugin.

type Option

type Option func(*Plugin)

Option is a function that acts on a Plugin to inject Dependencies or configuration

func UseDeps

func UseDeps(cb func(*Deps)) Option

UseDeps returns Option that can inject custom dependencies.

type Plugin

type Plugin struct {
	Deps
}

Plugin holds the internal data structures of the Rest Plugin

func NewPlugin

func NewPlugin(opts ...Option) *Plugin

NewPlugin creates a new Plugin with the provides Options

func (*Plugin) AfterInit

func (p *Plugin) AfterInit() (err error)

AfterInit can be used to run plugin functionality.

func (*Plugin) Close

func (p *Plugin) Close() error

Close is NOOP.

func (*Plugin) Init

func (p *Plugin) Init() error

Init initializes the Plugin

Jump to

Keyboard shortcuts

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