model

package
v0.0.0-...-cc4b599 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Actionlist = []Action{
	Action{Name: "GET", Descriptions: "Getting bulk information of resources", Sample: "kubectl-bulk get po images "},
	Action{Name: "UPDATE", Descriptions: "Bulk updating of resources", Sample: "kubectl-bulk update po images "},
	Action{Name: "DELETE", Descriptions: "Deleting of resources", Sample: "kubectl-bulk get delete images "},
}
View Source
var FilterList = []Filter{
	{
		Name:           "none",
		Description:    "no filter",
		Sample:         "--",
		NeedFilterable: false,
	},
	{
		Name:           "label",
		Description:    "filter with Label",
		Sample:         "kubectl get pods -l app=nginx",
		NeedFilterable: true,
	},
	{
		Name:           "field-selector",
		Description:    "filter with field selector",
		Sample:         " kubectl get pods --field-selector=\"status.phase!=Running\"",
		NeedFilterable: false,
	},
	{
		Name:           "multi-select",
		Description:    "Multi select from resource list",
		Sample:         "--",
		NeedFilterable: false,
	},
	{
		Name:           "grep",
		Description:    "using grep function from resource list",
		Sample:         "--",
		NeedFilterable: false,
	},
}

Functions

This section is empty.

Types

type Action

type Action struct {
	Name         string `json:"name"`
	Descriptions string `json:"desc"`
	Sample       string `json:"sample"`
}

type Actions

type Actions struct {
	Actions []Action `json:"actions"`
}

type Command

type Command struct {
	Namespace       string
	LabelFilter     string
	FieldSelector   string
	GrepFilter      []string
	Action          Action
	Resource        Resource
	List            []unstructured.Unstructured
	Filter          Filter
	SelectedFilters []Filter
	UpdatedList     []unstructured.Unstructured
	SelectedSpec    []string
}

type Filter

type Filter struct {
	Name           string `json:"name"`
	Description    string `json:"desc"`
	Sample         string `json:"sample"`
	NeedFilterable bool   `json:"needFilter"`
}

type Filters

type Filters struct {
	Filters []Filter `json:"actions"`
}

type Resource

type Resource struct {
	Name             string                  `json:"name"`
	Namespaced       bool                    `json:"namespaced"`
	Kind             string                  `json:"kind"`
	ShortName        []string                `json:"shortName"`
	Verbs            []string                `json:"verbs"`
	GroupVersionKind schema.GroupVersionKind `json:"gvk"`
	GroupVersion     []schema.GroupVersion   `json:"gv"`
}

Jump to

Keyboard shortcuts

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