extension

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package extension provides run-time registries that allow Fluxor to work with user-defined Go types (for example custom action inputs or outputs).

The registries are normally modified through the public APIs under the root fluxor package, therefore most applications do not need to import this package directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupService

func LookupService[T types.Service](actions *Actions) T

func TypeServiceOf

func TypeServiceOf(service types.Service) reflect.Type

Types

type Actions

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

Actions provides action service

func NewActions

func NewActions(goTypes ...*x.Type) *Actions

NewActions creates a new action service

func (*Actions) Lookup

func (s *Actions) Lookup(name string) types.Service

Lookup returns a service by name

func (*Actions) Register

func (s *Actions) Register(service types.Service) error

Register registers a service

func (*Actions) Services added in v0.1.4

func (s *Actions) Services() []string

func (*Actions) Types

func (s *Actions) Types() *Types

type DataTypeIniter

type DataTypeIniter interface {
	InitTypes(types *Types)
}

type Option

type Option func(*Types)

func WithImports

func WithImports(imports model.Imports) Option

type Types

type Types struct {
	x.Registry
	// contains filtered or unexported fields
}

func NewTypes

func NewTypes(options ...x.RegistryOption) *Types

NewTypes creates a new types

func (*Types) Imports

func (t *Types) Imports() model.Imports

Imports returns import

func (*Types) Lookup

func (t *Types) Lookup(dataType string, options ...Option) *x.Type

Lookup returns a data type from the registry

func (*Types) Register

func (t *Types) Register(dataType *x.Type)

Register adds a data type to the registry

Jump to

Keyboard shortcuts

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