cue

package
v1.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// UsagePrefix defines the usage display for KubeVela CLI
	UsagePrefix = "+usage="
	// ShortPrefix defines the short argument for KubeVela CLI
	ShortPrefix = "+short="
	// AliasPrefix is an alias of the name of a parameter element, in order to making it more friendly to Cli users
	AliasPrefix = "+alias="
)
View Source
const BaseTemplate = `

context: {
  name: string
  config?: [...{
    name: string
    value: string
  }]
}
`

BaseTemplate include base info provided by KubeVela for CUE template

Variables

View Source
var ParameterTag = "parameter"

ParameterTag is the keyword in CUE template to define users' input

Functions

func GetDefault

func GetDefault(val cue.Value) interface{}

GetDefault evaluate default Go value from CUE

func GetParameters

func GetParameters(templateStr string) ([]types.Parameter, error)

GetParameters get parameter from cue template

func RetrieveComments

func RetrieveComments(value cue.Value) (string, string, string)

RetrieveComments will retrieve Usage, Short and Alias from CUE Value

Types

This section is empty.

Jump to

Keyboard shortcuts

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