lib

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 70 Imported by: 17

Documentation

Index

Constants

View Source
const GoogleApplicationCredentials = "/personal/AppsCode/credentials/bytebuilders@byte-builders.json"

Variables

View Source
var DisableAppReleaseCRD = ScriptOptionFunc(func(opt *ScriptOptions) {
	opt.DisableAppReleaseCRD = true
})
View Source
var OsIndependentScript = ScriptOptionFunc(func(opt *ScriptOptions) {
	opt.OsIndependentScript = true
})

Functions

func CheckPermissions

func CheckPermissions(getter genericclioptions.RESTClientGetter, reg repo.IRegistry, order releasesapi.Order) (bool, error)

func ComparePlans

func ComparePlans(reg repo.IRegistry, srcRef kmapi.TypedObjectReference, names []string, version string) (productsapi.FeatureTable, error)

func CreateBundleViewForBundle

func CreateBundleViewForBundle(reg repo.IRegistry, ref *releasesapi.ChartSourceRef) (*releasesapi.BundleView, error)

func CreatePackageView

func CreatePackageView(srcRef kmapi.TypedObjectReference, chrt *chart.Chart) (*releasesapi.PackageView, error)

func ExtractResourceAttributes

func ExtractResourceAttributes(data []byte, verb string, mapper disco_util.ResourceMapper, attrs map[authorization.ResourceAttributes]*ResourcePermission) error

func GetPackageDescriptor

func GetPackageDescriptor(pkgChart *chart.Chart) releasesapi.PackageDescriptor

func InstallOrder

func InstallOrder(getter genericclioptions.RESTClientGetter, reg repo.IRegistry, order releasesapi.Order, opts ...ScriptOption) error

func PrintHelm3Command added in v0.4.1

func PrintHelm3Command(reg repo.IRegistry, opts releasesapi.InstallOptions, applyValues map[string]interface{}, useValuesFile bool) (string, []byte, error)

func PrintHelm3CommandFromStructValues added in v0.4.1

func PrintHelm3CommandFromStructValues(reg repo.IRegistry, opts releasesapi.InstallOptions, baseValuesStruct, modValuesStruct interface{}, useValuesFile bool) (string, []byte, error)

func UninstallOrder

func UninstallOrder(getter genericclioptions.RESTClientGetter, order releasesapi.Order) error

func XorY

func XorY(x, y string) string

Types

type AppReleaseCRDRegPrinter added in v0.7.0

type AppReleaseCRDRegPrinter struct {
	W io.Writer
}

func (*AppReleaseCRDRegPrinter) Do added in v0.7.0

type AppReleaseCRDRegistrar added in v0.7.0

type AppReleaseCRDRegistrar struct {
	Config *rest.Config
}

func (*AppReleaseCRDRegistrar) Do added in v0.7.0

func (x *AppReleaseCRDRegistrar) Do() error

type ApplicationCreator

type ApplicationCreator struct {
	App    *driversapi.AppRelease
	Client client.Client
}

func (*ApplicationCreator) Do

func (x *ApplicationCreator) Do() error

type ApplicationGenerator

type ApplicationGenerator struct {
	Registry repo.IRegistry
	Chart    releasesapi.ChartSelection

	KubeVersion string
	// contains filtered or unexported fields
}

func (*ApplicationGenerator) Do

func (x *ApplicationGenerator) Do() error

func (*ApplicationGenerator) Result

type ApplicationUploader

type ApplicationUploader struct {
	App       *driversapi.AppRelease
	UID       string
	BucketURL string
	PublicURL string
	Prefix    string
	W         io.Writer
}

func (*ApplicationUploader) Do

func (x *ApplicationUploader) Do() error

type BlobStore

type BlobStore struct {
	Host   string
	Bucket string
	Prefix string
	blobfs.Interface
}

func NewTestBlobStore

func NewTestBlobStore() (*BlobStore, error)

type CRDReadinessChecker

type CRDReadinessChecker struct {
	CRDs   []metav1.GroupVersionResource
	Client crd_cs.Interface
}

func (*CRDReadinessChecker) Do

func (x *CRDReadinessChecker) Do() error

type CRDReadinessPrinter

type CRDReadinessPrinter struct {
	CRDs []metav1.GroupVersionResource
	W    io.Writer
}

func (*CRDReadinessPrinter) Do

func (x *CRDReadinessPrinter) Do() error

type DoFn

type DoFn func() error

type Helm3CommandPrinter

type Helm3CommandPrinter struct {
	Registry      repo.IRegistry
	ChartRef      releasesapi.ChartRef
	Version       string
	ReleaseName   string
	Namespace     string
	Values        values.Options
	UseValuesFile bool

	W io.Writer
	// contains filtered or unexported fields
}

func (*Helm3CommandPrinter) Do

func (x *Helm3CommandPrinter) Do() error

func (*Helm3CommandPrinter) ValuesFile

func (x *Helm3CommandPrinter) ValuesFile() []byte

type OS

type OS string
const (
	Neutral OS = ""
	Linux   OS = "linux"
	Windows OS = "windows"
	MacOS   OS = "darwin"
)

type PermissionChecker

type PermissionChecker struct {
	Registry    repo.IRegistry
	ChartRef    releasesapi.ChartRef
	Version     string
	ReleaseName string
	Namespace   string
	Verb        string

	Config       *rest.Config
	ClientGetter genericclioptions.RESTClientGetter
	Mapper       disco_util.ResourceMapper
	// contains filtered or unexported fields
}

func (*PermissionChecker) Do

func (x *PermissionChecker) Do() error

func (*PermissionChecker) Result

type ResourceFindBuilderWrapper

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

ResourceFindBuilderWrapper wraps a builder in an interface

func (*ResourceFindBuilderWrapper) Do

Do finds you resources to check

type ResourcePermission

type ResourcePermission struct {
	Items   []*unstructured.Unstructured
	Allowed bool
}

type ScriptOption added in v0.3.5

type ScriptOption interface {
	Apply(opt *ScriptOptions)
}

type ScriptOptionFunc added in v0.3.5

type ScriptOptionFunc func(opt *ScriptOptions)

func (ScriptOptionFunc) Apply added in v0.3.5

func (fn ScriptOptionFunc) Apply(opt *ScriptOptions)

type ScriptOptions added in v0.3.5

type ScriptOptions struct {
	DisableAppReleaseCRD bool
	OsIndependentScript  bool
}

type ScriptRef

type ScriptRef struct {
	OS      OS     `json:"os"`
	URL     string `json:"url"`
	Command string `json:"command"`
	Script  string `json:"script"`
}

func GenerateHelm3Script

func GenerateHelm3Script(bs *BlobStore, reg repo.IRegistry, order releasesapi.Order, opts ...ScriptOption) ([]ScriptRef, error)

func GenerateYAMLScript

func GenerateYAMLScript(bs *BlobStore, reg repo.IRegistry, order releasesapi.Order, opts ...ScriptOption) ([]ScriptRef, error)

type WaitForChecker

type WaitForChecker struct {
	Namespace string
	WaitFors  []releasesapi.WaitFlags

	ClientGetter genericclioptions.RESTClientGetter
}

func (*WaitForChecker) Do

func (x *WaitForChecker) Do() error

type WaitForPrinter

type WaitForPrinter struct {
	Name      string
	Namespace string
	WaitFors  []releasesapi.WaitFlags
	W         io.Writer
}

func (*WaitForPrinter) Do

func (x *WaitForPrinter) Do() error

type YAMLPrinter

type YAMLPrinter struct {
	Registry    repo.IRegistry
	ChartRef    releasesapi.ChartRef
	Version     string
	ReleaseName string
	Namespace   string
	KubeVersion string
	ValuesFile  string
	ValuesPatch *runtime.RawExtension

	BucketURL string
	UID       string
	PublicURL string
	Prefix    string
	W         io.Writer
}

func (*YAMLPrinter) Do

func (x *YAMLPrinter) Do() error

Jump to

Keyboard shortcuts

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