converter

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

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

func New

func New(config config.Config, access *config.Access) *Converter

func (*Converter) Cast

func (this *Converter) Cast(in interface{}, from marshaller.CharacteristicId, to marshaller.CharacteristicId) (out interface{}, err error)

func (*Converter) CastWithExtension

func (this *Converter) CastWithExtension(in interface{}, from marshaller.CharacteristicId, to marshaller.CharacteristicId, extensions []models.ConverterExtension) (out interface{}, err error)

func (*Converter) TryExtension

func (this *Converter) TryExtension(call ExtensionCall) (resp ExtensionCallResponse, err error)

type ExtensionCall

type ExtensionCall struct {
	Input     interface{}               `json:"input"`
	Extension models.ConverterExtension `json:"extension"`
}

type ExtensionCallResponse

type ExtensionCallResponse struct {
	Output interface{} `json:"output"`
	Error  string      `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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