manifests

package
v0.2.26 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 13

Documentation

Index

Constants

View Source
const (
	// service mesh resource
	SERVICE_MESH = iota
	// native Kubernetes resource
	K8s
	// native Meshery resource
	MESHERY
)

Type of resource

View Source
const (
	ErrGetCrdNamesCode    = "1001"
	ErrGetSchemasCode     = "1002"
	ErrGetAPIVersionCode  = "1003"
	ErrGetAPIGroupCode    = "1004"
	ErrPopulatingYamlCode = "1005"
)

Variables

This section is empty.

Functions

func ErrGetAPIGroup

func ErrGetAPIGroup(err error) error

func ErrGetAPIVersion

func ErrGetAPIVersion(err error) error

func ErrGetCrdNames

func ErrGetCrdNames(err error) error

func ErrGetSchemas

func ErrGetSchemas(err error) error

func ErrPopulatingYaml

func ErrPopulatingYaml(err error) error

Types

type Component

type Component struct {
	Schemas     []string
	Definitions []string
}

func GenerateComponents added in v0.2.26

func GenerateComponents(manifest string, resource int, cfg Config) (*Component, error)

GenerateComponents generates components given manifest(yaml/json) ,resource type, and additional configuration

func GetFromHelm

func GetFromHelm(url string, resource int, cfg Config) (*Component, error)

func GetFromManifest

func GetFromManifest(url string, resource int, cfg Config) (*Component, error)

type Config

type Config struct {
	Name            string // Name of the service mesh,or k8 or meshery
	MeshVersion     string
	Filter          CrdFilter                             //json path filters
	ModifyDefSchema func(string, string) (string, string) //takes in definition and schema, does some manipulation on them and returns the new def and schema
}

type CrdFilter

type CrdFilter struct {
	RootFilter    JsonPath //This would be the first filter to get a modified yaml
	NameFilter    JsonPath // This will be the json path passed in order to get the names of crds
	GroupFilter   JsonPath //This will specify the path to get to group name
	VersionFilter JsonPath //This will specify the path to get to version name. [Version should have a name field]
	SpecFilter    JsonPath //This will specify the path to get spec
	IsJson        bool     //Set to true if input format is json
}

type JsonPath

type JsonPath []string

Json Paths

Jump to

Keyboard shortcuts

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