utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONFIG_FILE_NAME          = "manifest-bundle.yaml"
	MANIFEST_FILE_NAME        = "manifest.yaml"
	MANIFEST_DIR              = "manifest-bundles"
	SIGNED_MANIFEST_FILE_NAME = "manifest.signed"
	PROVENANCE_FILE_NAME      = "provenance.yaml"
	ATTESTATION_FILE_NAME     = "attestation.json"
	TMP_DIR                   = "/tmp/output"
	PRIVATE_KEY_PATH          = "/etc/signing-secrets/cosign.key"
	PUB_KEY_PATH              = "/etc/signing-secrets/cosign.pub"
)

Variables

This section is empty.

Functions

func FileExist

func FileExist(fpath string) bool

func GetClient

func GetClient(configpath string) (*kubernetes.Clientset, *rest.Config, error)

GetClient returns a kubernetes client

func QueryAPI

func QueryAPI(url, requestType, bearerToken string, data map[string]interface{}) (string, error)

func RetriveDesiredManifest

func RetriveDesiredManifest(appName string) (string, error)

func Sha256Hash

func Sha256Hash(filePath string) (string, error)

func WriteToFile

func WriteToFile(str, dirPath, filename string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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