factory

package
v0.1.908 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	contract.FactoryOperator
}

func NewClient

func NewClient(opts ClientOptions) (Client, error)

type ClientOption added in v0.1.36

type ClientOption = contract.Opt[ClientOptions]

func WithDefaultsRegistry added in v0.1.414

func WithDefaultsRegistry(x DefaultsRegistry) ClientOption

func WithToRegisterP added in v0.1.677

func WithToRegisterP(x ToRegisterP) ClientOption

func WithToRegisterT added in v0.1.677

func WithToRegisterT(x ToRegisterT) ClientOption

type ClientOptions added in v0.1.36

type ClientOptions struct {
	D DefaultsRegistry
	T ToRegisterT
	P ToRegisterP
}

func ApplyClientOptions added in v0.1.36

func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions

type DefaultTool added in v0.1.11

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) New added in v0.1.11

func (d *DefaultTool) New(ctx context.Context, name string) (any, error)

New instantiates a struct from the factory.

func (*DefaultTool) NewDefault added in v0.1.414

func (d *DefaultTool) NewDefault(ctx context.Context, name string) (any, error)

NewDefault retrieves a pre-registered default instance from the factory.

func (*DefaultTool) NewPullPayload added in v0.1.676

func (d *DefaultTool) NewPullPayload(ctx context.Context, ressource string) (contract.PLPull, error)

NewPullPayload creates a new pull payload for the given ressource.

func (*DefaultTool) NewPullSession added in v0.1.676

func (d *DefaultTool) NewPullSession(ctx context.Context, ressource string) (contract.PullSession, error)

NewPullSession creates a new pull session for the given ressource.

func (*DefaultTool) NewPullSubFunc added in v0.1.676

func (d *DefaultTool) NewPullSubFunc(ctx context.Context, ressource string, p contract.PullType) (contract.PullSubFunc, error)

NewPullSubFunc retrieves a registered pull sub function.

type DefaultsRegistry added in v0.1.414

type DefaultsRegistry map[string]any

DefaultsRegistry maps collection names to default values (must implement engine.Record).

type PCompiled added in v0.1.677

type PCompiled struct {
	PL      reflect.Type
	Session reflect.Type
	Subs    map[contract.PullType]contract.PullSubFunc
}

type PSpec added in v0.1.677

type PSpec struct {
	PL      any
	Session any
	Subs    map[contract.PullType]contract.PullSubFunc
}

type ToRegisterP added in v0.1.677

type ToRegisterP map[string]PSpec

type ToRegisterT added in v0.1.677

type ToRegisterT map[string]any

type Tool added in v0.1.245

type Tool interface {
	Client
}

Jump to

Keyboard shortcuts

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