importer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommonImports = []string{
	"os",
	"fmt",
	"context",
	"path/filepath",
	"k8s.io/client-go/tools/clientcmd",
	"k8s.io/client-go/util/homedir",
}

CommonImports contains common packages required for all the resources

Functions

This section is empty.

Types

type ImportManager

type ImportManager struct {
	Kind    string
	Group   string
	Version string
	Object  string
	Imports map[string]string
}

ImportManager holds resource Kind, Group, Versions to figure out imports

func New

func New(kind, group, version, obj, cliPkg string, clientType types.Client) ImportManager

New returns an instance of ImportManager

func (*ImportManager) FindImports

func (i *ImportManager) FindImports() (string, string)

FindImports figures out imports required to compile generated Go code

Jump to

Keyboard shortcuts

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