cli

package
v0.0.0-...-61190b0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2022 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2022 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright 2019-2021 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

Index

Constants

View Source
const (
	LIST int = iota
	INFO
	ERROR
	MSG
	JOB
	VALUE
)
View Source
const (
	ColWidthOffset          int  = 20
	TableMaxColWidthDefault uint = 120
)

Variables

This section is empty.

Functions

func ChartCommand

func ChartCommand() *cli.Command

func ChartCreateCommand

func ChartCreateCommand() *cli.Command

func ChartDeleteCommand

func ChartDeleteCommand() *cli.Command

func ChartInfoCommand

func ChartInfoCommand() *cli.Command

func ChartListCommand

func ChartListCommand() *cli.Command

func ClusterCommand

func ClusterCommand() *cli.Command

func ClusterDeleteCommand

func ClusterDeleteCommand() *cli.Command

func ClusterInfoCommand

func ClusterInfoCommand() *cli.Command

func ClusterInstallCommand

func ClusterInstallCommand() *cli.Command

func ClusterListCommand

func ClusterListCommand() *cli.Command

func ClusterUpdateCommand

func ClusterUpdateCommand() *cli.Command

func CollectInNamespace

func CollectInNamespace(b *supportbundle.Bundler, namespace string, tail int) (err error)

func Contains

func Contains(element interface{}, set interface{}) bool

Contains checks whether an element is in slice/array/map.

func ContainsSkipError

func ContainsSkipError(errs []error) bool

ContainsSkipError returns if error list has SkipError

func DeleteItem

func DeleteItem(i Item, UUID string) error

func ErrOutPut

func ErrOutPut(err error)

func GetDuration

func GetDuration(startTime, endTime time.Time) string

func GetItem

func GetItem(i Item, UUID string) error

func GetItemList

func GetItemList(i Item) error

func GetModuleLog

func GetModuleLog(uuid, args string) (string, error)

func GetModuleLogFollow

func GetModuleLogFollow(uuid, args string) error

func GetResponse

func GetResponse(i Item, req *Request, respType int) (msg interface{}, err error)

func GetServiceVersion

func GetServiceVersion() (string, error)

func GetValueTemplateExample

func GetValueTemplateExample(chartName, chartVersion string) (value string, err error)

GetValueTemplateExample gets the value template example from api.

func HumanDuration

func HumanDuration(d time.Duration) string

func JobCommand

func JobCommand() *cli.Command

func JobDeleteCommand

func JobDeleteCommand() *cli.Command

func JobInfoCommand

func JobInfoCommand() *cli.Command

func JobListCommand

func JobListCommand() *cli.Command

func JobStopCommand

func JobStopCommand() *cli.Command

func LogCommand

func LogCommand() *cli.Command

func NamespaceCommand

func NamespaceCommand() *cli.Command

func NamespaceListCommand

func NamespaceListCommand() *cli.Command

func PostItem

func PostItem(i Item, Body []byte) error

func PutItem

func PutItem(i Item, Body []byte) error

func Run

func Run(Args []string) error

func SupportBundleCollectCommand

func SupportBundleCollectCommand() *cli.Command

func SupportBundleCommand

func SupportBundleCommand() *cli.Command

func SupportBundlePackCommand

func SupportBundlePackCommand() *cli.Command

func UserCommand

func UserCommand() *cli.Command

func UserInfoCommand

func UserInfoCommand() *cli.Command

func UserListCommand

func UserListCommand() *cli.Command

func ValidateYaml

func ValidateYaml(templateValue, testValue string, skippedKeys []string,
	preprocessors ...func(m *ValidationManager) []error) (errs []error)

ValidateYaml validates the yaml file.

func VersionCommand

func VersionCommand() *cli.Command

Types

type Chart

type Chart struct {
}

type ChartResult

type ChartResult struct {
	Data *modules.HelmChart
	Msg  string
}

type ChartResultErr

type ChartResultErr struct {
	Error string
}

type ChartResultList

type ChartResultList struct {
	Data []*modules.HelmChart
	Msg  string
}

type ChartResultMsg

type ChartResultMsg struct {
	Msg string
}

type Cluster

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

type ClusterJobResult

type ClusterJobResult struct {
	Data *modules.Job
	Msg  string
}

type ClusterResult

type ClusterResult struct {
	Data *modules.Cluster
	Msg  string
}

type ClusterResultErr

type ClusterResultErr struct {
	Error string
}

type ClusterResultList

type ClusterResultList struct {
	Data []*modules.Cluster
	Msg  string
}

type ClusterResultMsg

type ClusterResultMsg struct {
	Msg string
}

type ConfigError

type ConfigError string

ConfigError is config validation error

func (ConfigError) Error

func (e ConfigError) Error() string

type Item

type Item interface {
	// contains filtered or unexported methods
}

type Job

type Job struct {
}

type JobResult

type JobResult struct {
	Data *modules.Job
	Msg  string
}

type JobResultErr

type JobResultErr struct {
	Error string
}

type JobResultList

type JobResultList struct {
	Data modules.Jobs
	Msg  string
}

type JobResultMsg

type JobResultMsg struct {
	Msg string
}

type KeyValue

type KeyValue map[string]*TreeNode

type ListValue

type ListValue []*TreeNode

type Namespace

type Namespace struct {
}

type NamespaceResultErr

type NamespaceResultErr struct {
	Error string
}

type NamespaceResultList

type NamespaceResultList struct {
	Data modules.Namespaces
	Msg  string
}

type Request

type Request struct {
	Type string
	Path string
	Body []byte
}

type Response

type Response struct {
	Code int
	Body []byte
}

func Send

func Send(r *Request) (*Response, error)

func (*Response) Unmarshal

func (r *Response) Unmarshal() *Result

type Result

type Result struct {
	Data []*modules.Job
	Msg  string
}

type SkipError

type SkipError string

SkipError is a type of error shows that you shall skip the validation

func (SkipError) Error

func (e SkipError) Error() string

type TreeNode

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

func NewTreeNode

func NewTreeNode() *TreeNode

NewTreeNode return default TreeNode.

type User

type User struct {
}

type UserResult

type UserResult struct {
	Data *modules.User
	Msg  string
}

type UserResultErr

type UserResultErr struct {
	Error string
}

type UserResultList

type UserResultList struct {
	Data []*modules.User
	Msg  string
}

type UserResultMsg

type UserResultMsg struct {
	Msg string
}

type ValidationManager

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

func (*ValidationManager) RegisterPreprocessor

func (m *ValidationManager) RegisterPreprocessor(p func(m *ValidationManager) []error)

RegisterPreprocessor registers a callback

func (*ValidationManager) Validate

func (m *ValidationManager) Validate() error

type ValidationTree

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

type ValueResult

type ValueResult struct {
	Data string
	Msg  string
}

Jump to

Keyboard shortcuts

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