converter

package
v0.0.0-...-b0e553f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(input any, datamodel any, provider *documents.Provider, tt string, apiVersion string) error

func GenerateInputConversionProgram

func GenerateInputConversionProgram(source *documents.APIVersion, destination *documents.Datamodel) (*string, error)

Types

type MapAdapter

type MapAdapter struct {
}

func (*MapAdapter) NativeToValue

func (m *MapAdapter) NativeToValue(value any) ref.Val

type TypeProvider

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

func NewTypeProvider

func NewTypeProvider(roots map[string]*documents.Schema) *TypeProvider

func (*TypeProvider) EnumValue

func (tp *TypeProvider) EnumValue(enumName string) ref.Val

EnumValue implements types.Provider.

func (*TypeProvider) FindIdent

func (tp *TypeProvider) FindIdent(identName string) (ref.Val, bool)

FindIdent implements types.Provider.

func (*TypeProvider) FindStructFieldNames

func (tp *TypeProvider) FindStructFieldNames(structType string) ([]string, bool)

FindStructFieldNames implements types.Provider.

func (*TypeProvider) FindStructFieldType

func (tp *TypeProvider) FindStructFieldType(structType string, fieldName string) (*types.FieldType, bool)

FindStructFieldType implements types.Provider.

func (*TypeProvider) FindStructType

func (tp *TypeProvider) FindStructType(structType string) (*types.Type, bool)

FindStructType implements types.Provider.

func (*TypeProvider) NewValue

func (tp *TypeProvider) NewValue(structType string, fields map[string]ref.Val) ref.Val

NewValue implements types.Provider.

Jump to

Keyboard shortcuts

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