utils

package
v0.0.0-...-8115ff7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// AnnotationHarborServer is the annnotation for harbor server
	AnnotationHarborServer = "goharbor.io/harbor"
	// AnnotationAccount is the annnotation for service account
	AnnotationAccount = "goharbor.io/service-account"
	// AnnotationProject is the annnotation for harbor project name
	AnnotationProject = "goharbor.io/project"
	// AnnotationRobot is the annotation for robot id
	AnnotationRobot = "goharbor.io/robot"
	// AnnotationRobotSecretRef is the annotation for robot secret reference
	AnnotationRobotSecretRef = "goharbor.io/robot-secret"
	// AnnotationSecOwner is the annotation for owner
	AnnotationSecOwner = "goharbor.io/owner"
	// AnnotationImageRewriteRuleConfigMapRef is the annotation for reference to configmap that stores rules
	AnnotationImageRewriteRuleConfigMapRef = "goharbor.io/rewriting-rules"

	// ConfigMapKeyHarborServer is the key in configmap that for HSC
	ConfigMapKeyHarborServer = "hsc"
	// ConfigMapKeyRules is the key in configmap that for rules
	ConfigMapKeyRules = "rules"
	// ConfigMapKeyRewriting is the key in configmap that for whether turn on image rewrite
	ConfigMapKeyRewriting = "rewriting"
	// ConfigMapValueRewritingOff is the key in configmap that for rewrite to turn off
	ConfigMapValueRewritingOff = "off"
	// ConfigMapValueRewritingOn is the key in configmap that for rewrite to turn on
	ConfigMapValueRewritingOn = "on"
)

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString is helper functions to check string from a slice of strings.

func ExtractID

func ExtractID(location string) (int64, error)

ExtractID extracts ID from location of response

func RandomName

func RandomName(prefix string) string

RandomName generates random names

func RemoveString

func RemoveString(slice []string, s string) (result []string)

RemoveString is helper functions to remove string from a slice of strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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