config

package
v1.10.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderName is provider name
	ProviderName = "config"
)

Variables

View Source
var ErrRequestInvalid = errors.New("the request is in valid")

ErrRequestInvalid means the request is invalid

Functions

func CreateConfig

func CreateConfig(ctx context.Context, params *CreateParams) (*any, error)

CreateConfig creates a config

func DeleteConfig

func DeleteConfig(ctx context.Context, params *oamprovidertypes.Params[config.NamespacedName]) (*any, error)

DeleteConfig deletes a config

func GetProviders

func GetProviders() map[string]cuexruntime.ProviderFn

GetProviders returns the cue providers.

func GetTemplate

func GetTemplate() string

GetTemplate returns the cue template.

Types

type CreateConfigProperties

type CreateConfigProperties struct {
	Name      string                 `json:"name"`
	Namespace string                 `json:"namespace"`
	Template  string                 `json:"template,omitempty"`
	Config    map[string]interface{} `json:"config"`
}

CreateConfigProperties the request body for creating a config

type CreateParams

CreateParams is the create params

type ListReturnVars

type ListReturnVars struct {
	Configs []map[string]any `json:"configs"`
}

ListReturnVars is the list return vars

type ListReturns

ListReturns is the list returns

func ListConfig

func ListConfig(ctx context.Context, params *oamprovidertypes.Params[ListVars]) (*ListReturns, error)

ListConfig lists the config

type ListVars

type ListVars struct {
	Namespace string `json:"namespace"`
	Template  string `json:"template"`
}

ListVars is the list vars

type ReadReturnVars

type ReadReturnVars struct {
	Config map[string]any `json:"config"`
}

ReadReturnVars is the read return vars

type ReadReturns

ReadReturns is the read returns

func ReadConfig

ReadConfig reads the config

Jump to

Keyboard shortcuts

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