v2v3

package
v6.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlobalV2ToV3

func GlobalV2ToV3(v2g *v2.Global) (*v3.GlobalBase, error)

func ListV2ToV3

func ListV2ToV3[TV2, TV3 any](listV2 []*TV2) ([]*TV3, error)

func NamedResourceArrayToMap

func NamedResourceArrayToMap[T any](namedResource []*T) (map[string]T, error)

func NamedResourceArrayToMapWithKey

func NamedResourceArrayToMapWithKey[T any](namedResource []*T, key string) (map[string]T, error)

func NamedResourceArrayV2ToMapV3

func NamedResourceArrayV2ToMapV3[TV2, TV3 any](namedResource []*TV2, options ...optionV2ToV3) (map[string]TV3, error)

func SortListByIndex

func SortListByIndex[T any](list []*T)

func V2Tov3

func V2Tov3[TV2, TV3 any](resource *TV2, skip ...string) (*TV3, error)

V2Tov3 converts a Structured type from v2 to v3 For example v3f, err := V2Tov3[v2.Frontend, models.Frontend](&v2s.Frontend) The conversion allows to have an evolving type v3: - extra fields would be ignored in the conversion, keeping the v2 fields converted

Types

This section is empty.

Jump to

Keyboard shortcuts

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