typiobj

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Description

func Description(obj interface{}) (description string)

Description of Object. Return value from description field if available or return its type

func IsConfigurer

func IsConfigurer(obj interface{}) (ok bool)

IsConfigurer return true if object implementation of configurer

func IsDestroyer

func IsDestroyer(obj interface{}) (ok bool)

IsDestroyer return true if object implementation of destructor

func IsPreparer

func IsPreparer(obj interface{}) (ok bool)

IsPreparer return true obj implement Preparer

func IsProvider

func IsProvider(obj interface{}) (ok bool)

IsProvider return true if object implementation of provider

func IsRunner

func IsRunner(obj interface{}) (ok bool)

IsRunner return true if obj implement Runner

func Name

func Name(obj interface{}) (name string)

Name of object. Return value from name field if available or return its type.

Types

type ConfigField

type ConfigField struct {
	Name     string
	Type     string
	Default  string
	Required bool
}

ConfigField contain field information of spec

type Configuration

type Configuration struct {
	Prefix string
	Spec   interface{}
}

Configuration represent the configuration

func (Configuration) ConfigFields

func (c Configuration) ConfigFields() (infos []ConfigField)

ConfigFields return list of field information

func (Configuration) Configure

func (c Configuration) Configure() Configuration

Configure return config itself

func (Configuration) Load

func (c Configuration) Load() error

Load configuration

type Configurer

type Configurer interface {
	Configure() Configuration
}

Configurer responsible to create config

type Destroyer

type Destroyer interface {
	Destroy() []interface{}
}

Destroyer responsible to destruct dependency

type Preparer

type Preparer interface {
	Prepare() []interface{}
}

Preparer responsible to prepare

type Provider

type Provider interface {
	Provide() []interface{}
}

Provider responsible to provide dependency

type Runner

type Runner interface {
	Run() interface{}
}

Runner responsible to run the application

Jump to

Keyboard shortcuts

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