validations

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsApprovedImageURI

func IsApprovedImageURI(imageURI string) bool

IsApprovedImageURI determines if the image URI is approved for use. Default is allow-all. Full filepath matching rules are applied to allow varying levels of globbing and wildcards. Examples: - Direct match: docker.myco.com/cello/cdk:1234 - Direct image, any tag: docker.myco.com/cello/cdk:* - Any image within a specific registry: docker.myco.com/*/*

func IsValidARN

func IsValidARN(s string) bool

IsValidARN determines if the string is a valid AWS ARN.

func IsValidGitURI

func IsValidGitURI(s string) bool

IsValidGitURI determines if the provided string is a valid git URI.

func IsValidImageURI

func IsValidImageURI(imageURI string) bool

IsValidImageURI determines if the image URI is a valid container image URI format.

func SetImageURIs

func SetImageURIs(uris []string)

SetImageURIs restricts the approved container URIs to the provided set. To reset to a default allow-all state, provide an empty list.

func Validate

func Validate(validations ...func() error) error

Validate iterates through the provided validation funcs.

func ValidateStruct

func ValidateStruct(input interface{}) error

ValidateStruct validates the provided struct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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