modelinst

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MappingRuleRaw

type MappingRuleRaw [][]interface{}

func (MappingRuleRaw) ToConverter

func (m MappingRuleRaw) ToConverter() (*ModelConverter, error)

ToConverter generate ModelConverter Responsibility: 1. build path structure 2. do basic checks on path structure(primitive data type check excluded)

type ModelConverter

type ModelConverter struct {
	SourceLeafPathList []string
	TargetLeafPathList []string

	LevelPair   []levelPair
	MaxLevelCnt int
}

func (*ModelConverter) GeneralTransfer

func (m *ModelConverter) GeneralTransfer(src, dst basicapi.Model) error

func (*ModelConverter) Transfer

func (m *ModelConverter) Transfer(src, dst ModelInst2) error

Transfer do data Transfer according to converter definition responsibility: 1. transfer data 2. do data checks including primitive data type matching

type ModelInst2

type ModelInst2 interface {
	RemoveObjectByPath(paths []string) error

	pluginapi.Model
	// contains filtered or unexported methods
}

ModelInst2 contains full definition of data object Note: when moving data(transfer/assign), data type should be performed according tothe certain operation

type ModelInstHelper

type ModelInstHelper struct {
}

func (ModelInstHelper) NewInst

func (ModelInstHelper) NewInst() ModelInst2

func (ModelInstHelper) WrapReadonlyMap

func (ModelInstHelper) WrapReadonlyMap(m map[string]interface{}) ModelInst2

Jump to

Keyboard shortcuts

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