utils

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const RatifyNamespaceEnvVar = "RATIFY_NAMESPACE"

Variables

This section is empty.

Functions

func GetCertificatesFromPath

func GetCertificatesFromPath(path string) ([]*x509.Certificate, error)

Return list of certificates loaded from path when path is a directory, this method loads all certs in directory and resolve symlink if needed

func GetNamespace

func GetNamespace() string

GetNamespace returns the namespace.

func GetServiceName

func GetServiceName() string

GetServiceName returns the service name.

func ParseDigest

func ParseDigest(digestStr string) (digest.Digest, error)

ParseDigest parses the given string and returns a validated Digest object.

func ParseSubjectReference

func ParseSubjectReference(subRef string) (common.Reference, error)

ParseSubjectReference parses the given subject and returns a valid reference

func ReplaceHomeShortcut

func ReplaceHomeShortcut(path string) string

Replace the shortcut prefix in a path with the home directory For example in a unix os, ~/.config/ becomes /home/azureuser/.config after replacement

func TrimSpaceAndToLower

func TrimSpaceAndToLower(input string) string

returns the string in lower case without leading and trailing space

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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