types

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOAMNS               = "oam-system"
	DefaultOAMReleaseName      = "vela-core"
	DefaultOAMRuntimeChartName = "vela-core"
	DefaultOAMVersion          = ">0.0.0-0"

	DefaultEnvName      = "default"
	DefaultAppNamespace = "default"
)
View Source
const (
	AnnAPIVersion = "definition.oam.dev/apiVersion"
	AnnKind       = "definition.oam.dev/kind"

	// Indicate which workloadDefinition generate from
	AnnWorkloadDef = "workload.oam.dev/name"
	// Indicate which traitDefinition generate from
	AnnTraitDef = "trait.oam.dev/name"
)
View Source
const (
	StatusDeployed = "Deployed"
	StatusStaging  = "Staging"
)
View Source
const (
	TagCommandType = "commandType"

	TypeStart   = "Getting Started"
	TypeApp     = "Applications"
	TypeTraits  = "Traits"
	TypeRelease = "Release"
	TypeOthers  = "Others"
	TypeSystem  = "System"
)

Variables

This section is empty.

Functions

func SetFlagBy

func SetFlagBy(flags *pflag.FlagSet, v Parameter)

Types

type Args

type Args struct {
	Config *rest.Config
	Schema *runtime.Scheme
}

type CapType

type CapType string
const (
	TypeWorkload CapType = "workload"
	TypeTrait    CapType = "trait"
	TypeScope    CapType = "scope"
)

type Capability

type Capability struct {
	Name           string      `json:"name"`
	Type           CapType     `json:"type"`
	CueTemplate    string      `json:"template,omitempty"`
	CueTemplateURI string      `json:"templateURI,omitempty"`
	Parameters     []Parameter `json:"parameters,omitempty"`
	DefinitionPath string      `json:"definition"`
	CrdName        string      `json:"crdName,omitempty"`
	Center         string      `json:"center,omitempty"`
	Status         string      `json:"status,omitempty"`

	//trait only
	AppliesTo []string `json:"appliesTo,omitempty"`

	// Plugin Source
	Source  *Source       `json:"source,omitempty"`
	Install *Installation `json:"install,omitempty"`
	CrdInfo *CrdInfo      `json:"crdInfo,omitempty"`
}

Capability defines the content of a capability

func ConvertTemplateJSON2Object

func ConvertTemplateJSON2Object(in *runtime.RawExtension) (Capability, error)

ConvertTemplateJSON2Object convert spec.extension to object

type Chart

type Chart struct {
	Repo      string `json:"repo"`
	URL       string `json:"url"`
	Name      string `json:"name"`
	Namespace string `json:"namespace,omitempty"`
	Version   string `json:"version"`
}

type CrdInfo

type CrdInfo struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
}

type EnvMeta

type EnvMeta struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Email     string `json:"email,omitempty"`
	Domain    string `json:"domain,omitempty"`

	// Below are not arguments, should be auto-generated
	Issuer  string `json:"issuer"`
	Current string `json:"current,omitempty"`
}

type Installation

type Installation struct {
	Helm Chart `json:"helm"`
}

type Parameter

type Parameter struct {
	Name     string      `json:"name"`
	Short    string      `json:"short,omitempty"`
	Required bool        `json:"required,omitempty"`
	Default  interface{} `json:"default,omitempty"`
	Usage    string      `json:"usage,omitempty"`
	Type     cue.Kind    `json:"type,omitempty"`
}

type Source

type Source struct {
	RepoName  string `json:"repoName"`
	ChartName string `json:"chartName,omitempty"`
}

Jump to

Keyboard shortcuts

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