drivers

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert[T any](v interface{}) (*T, error)

Types

type Driver

type Driver[T any] struct {
	// contains filtered or unexported fields
}

func (*Driver[T]) Assert

func (d *Driver[T]) Assert(v interface{}) (*T, error)

func (*Driver[T]) ConfigType

func (d *Driver[T]) ConfigType() reflect.Type

func (*Driver[T]) Create

func (d *Driver[T]) Create(id, name string, v interface{}, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

type DriverConfigChecker

type DriverConfigChecker[T any] struct {
	Driver[T]
	// contains filtered or unexported fields
}

func (*DriverConfigChecker[T]) Check

func (d *DriverConfigChecker[T]) Check(v interface{}, workers map[eosc.RequireId]eosc.IWorker) error

type Factory

type Factory[T any] struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory[T any](createFunc func(id, name string, v *T, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error), configCheckFunc ...func(v *T, workers map[eosc.RequireId]eosc.IWorker) error) *Factory[T]

func (*Factory[T]) Create

func (f *Factory[T]) Create(profession string, name string, label string, desc string, params map[string]interface{}) (eosc.IExtenderDriver, error)

func (*Factory[T]) Render

func (f *Factory[T]) Render() interface{}

type WorkerBase

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

func Worker

func Worker(id string, name string) WorkerBase

func (*WorkerBase) Id

func (w *WorkerBase) Id() string

func (*WorkerBase) Name

func (w *WorkerBase) Name() string

Jump to

Keyboard shortcuts

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