add

package
v0.0.0-...-4d33260 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffBlocks

func DiffBlocks(old map[string]*project.ResourceConfig, new map[string]*project.ResourceConfig) (string, error)

DiffBlocks returns a textual diff of new - old.

It compares the values in old and new, and generates a textual diff for each value difference between old and new. It doesn't currently support deletions of new from old.

func Metadata

func Metadata(r *project.ResourceConfig) resourceMeta

func NewAddCmd

func NewAddCmd() *cobra.Command

Types

type AddAction

type AddAction struct {
	// contains filtered or unexported fields
}

func (*AddAction) Run

type Menu struct {
	// Namespace of the resource type.
	Namespace string
	// Label displayed in the menu.
	Label string

	// SelectResource is the continuation that returns the resource with type filled in.
	SelectResource resourceSelection
}

A menu to be displayed.

type Model

type Model struct {
	Name       string          `json:"name"`
	Skus       []ModelSku      `json:"skus"`
	Version    string          `json:"version"`
	SystemData ModelSystemData `json:"systemData"`
}

type ModelList

type ModelList struct {
	Kind  string `json:"kind"`
	Model Model  `json:"model"`
}

type ModelResponse

type ModelResponse struct {
	Value []ModelList `json:"value"`
}

type ModelSku

type ModelSku struct {
	Name string `json:"name"`
}

type ModelSystemData

type ModelSystemData struct {
	CreatedAt string `json:"createdAt"`
}

Jump to

Keyboard shortcuts

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