cmd

package
v0.0.0-...-32f89f8 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright 2023 Arie Bregman, Inc. All Rights Reserved.

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 Version = "0.0.1"

Variables

View Source
var (
	ListCmd = &cobra.Command{
		Use:     "list",
		Aliases: []string{"get"},
		Short:   "Perform various list related actions",
		Run: func(cob *cobra.Command, args []string) {
			if len(args) == 0 {
				cob.Help()
			}
		},
	}

	ListFoldersCmd = &cobra.Command{
		Use:     "folders",
		Aliases: []string{"folders"},
		Short:   "List folders",
		Run: func(cob *cobra.Command, args []string) {
			logrus.Info("Listing folders...")
			folders.GetFolders()
		},
	}

	ListProjectsCmd = &cobra.Command{
		Use:     "projects",
		Aliases: []string{"proj"},
		Short:   "List projects",
		Run: func(cob *cobra.Command, args []string) {
			logrus.Info("Listing Projects...")
		},
	}

	ListGKEClustersCmd = &cobra.Command{
		Use:     "gke-clusters",
		Aliases: []string{"clusters"},
		Short:   "List GKE clusters",
		Run: func(cob *cobra.Command, args []string) {
			logrus.Info("Listing GKE clusters...")
		},
	}

	ListGKENodePoolsCmd = &cobra.Command{
		Use:     "gke-node-pools",
		Aliases: []string{"gnp"},
		Short:   "List GKE node pools",
		Run: func(cob *cobra.Command, args []string) {
			logrus.Info("Listing GKE node pools...")
		},
	}
)
View Source
var (

	// Cobra Flags
	VerboseFlag bool
	DebugFlag   bool

	// Root Cobra command - gcpctl
	RootCmd = &cobra.Command{
		Use:     "gcpctl",
		Version: Version,
		Short:   "Google Cloud Platform Utils",
		PersistentPreRun: func(cob *cobra.Command, args []string) {
		},
		Run: func(cob *cobra.Command, args []string) {
			logrus.Infof("Running gcpctl")
		},
	}
)

Functions

func Execute

func Execute()

Types

This section is empty.

Jump to

Keyboard shortcuts

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