minikit

package module
v0.0.0-...-313f5b9 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 5 Imported by: 3

README

minikit

AFAIRE.

Licence

MIT.


Copyright (c) 2020-2021 mls-361.

Documentation

Index

Constants

View Source
const (
	// CategoryRun AFAIRE.
	CategoryRunner = "runner"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Name() string
	Debug() int
}

Application AFAIRE.

type Base

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

Base AFAIRE.

func NewBase

func NewBase(category, description string) *Base

NewBase AFAIRE.

func (*Base) Build

func (cb *Base) Build(_ *Manager) error

Build AFAIRE.

func (*Base) Built

func (cb *Base) Built()

Built AFAIRE.

func (*Base) Category

func (cb *Base) Category() string

Category AFAIRE.

func (*Base) Close

func (cb *Base) Close()

Close AFAIRE.

func (*Base) Configure

func (cb *Base) Configure(_ *flag.FlagSet)

Configure AFAIRE.

func (*Base) Dependencies

func (cb *Base) Dependencies() []string

Dependencies AFAIRE.

func (*Base) Description

func (cb *Base) Description() string

Description AFAIRE.

func (*Base) Initialize

func (cb *Base) Initialize(_ *Manager) error

Initialize AFAIRE.

func (*Base) IsBuilt

func (cb *Base) IsBuilt() bool

IsBuilt AFAIRE.

type Component

type Component interface {
	Category() string
	Description() string
	Dependencies() []string
	Configure(fs *flag.FlagSet)
	Initialize(m *Manager) error
	IsBuilt() bool
	Build(m *Manager) error
	Built()
	Close()
}

Component AFAIRE.

type Manager

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

Manager AFAIRE.

func NewManager

func NewManager(application Application) *Manager

NewManager AFAIRE.

func (*Manager) AddComponents

func (m *Manager) AddComponents(cList ...Component) error

AddComponents AFAIRE.

func (*Manager) AddPlugin

func (m *Manager) AddPlugin(path, symName string, callback PluginCb) error

AddPlugin AFAIRE.

func (*Manager) AddPlugins

func (m *Manager) AddPlugins(dirname, symName string, callback PluginCb) error

AddPlugins AFAIRE.

func (*Manager) BuildComponent

func (m *Manager) BuildComponent(category string) error

BuildComponent AFAIRE.

func (*Manager) BuildComponents

func (m *Manager) BuildComponents() error

BuildComponents AFAIRE.

func (*Manager) CloseComponents

func (m *Manager) CloseComponents()

CloseComponents AFAIRE.

func (*Manager) Components

func (m *Manager) Components() []Component

Components AFAIRE.

func (*Manager) GetComponent

func (m *Manager) GetComponent(category string, mustExist bool) (Component, error)

GetComponent AFAIRE.

func (*Manager) InitializeComponents

func (m *Manager) InitializeComponents() error

InitializeComponents AFAIRE.

func (*Manager) InterfaceError

func (m *Manager) InterfaceError(c Component) error

InterfaceError AFAIRE.

func (*Manager) Run

func (m *Manager) Run() error

Run AFAIRE.

type PluginCb

type PluginCb func(pSym plugin.Symbol) error

PluginCb AFAIRE.

type Runner

type Runner interface {
	Run(m *Manager) error
}

Runner AFAIRE.

Jump to

Keyboard shortcuts

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