validation

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppNameValidity

type AppNameValidity struct {
	// True when the application name is valid.
	Valid bool `json:"valid"`
}

AppNameValidity describes validity of the application name.

func ValidateAppName

func ValidateAppName(spec *AppNameValiditySpec, client client.Interface) (*AppNameValidity, error)

ValidateAppName validates application name. When error is returned, name validity could not be determined.

type AppNameValiditySpec

type AppNameValiditySpec struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

AppNameValiditySpec is a specification for application name validation request.

type ImageReferenceValidity

type ImageReferenceValidity struct {
	// True when the image reference is valid.
	Valid bool `json:"valid"`
	// Error reason when image reference is valid
	Reason string `json:"reason"`
}

ImageReferenceValidity describes validity of the image reference.

func ValidateImageReference

func ValidateImageReference(spec *ImageReferenceValiditySpec) (*ImageReferenceValidity, error)

ValidateImageReference validates image reference.

type ImageReferenceValiditySpec

type ImageReferenceValiditySpec struct {
	// Reference of the image
	Reference string `json:"reference"`
}

ImageReferenceValiditySpec is a specification of an image reference validation request.

type ProtocolValidity

type ProtocolValidity struct {
	// True when the selected protocol is valid for selected service type.
	Valid bool `json:"valid"`
}

ProtocolValidity describes validity of the protocol.

func ValidateProtocol

func ValidateProtocol(spec *ProtocolValiditySpec) *ProtocolValidity

ValidateProtocol validates protocol based on whether created service is set to NodePort or NodeBalancer type.

type ProtocolValiditySpec

type ProtocolValiditySpec struct {
	// Protocol type
	Protocol api.Protocol `json:"protocol"`

	// Service type. LoadBalancer(true)/NodePort(false).
	IsExternal bool `json:"isExternal"`
}

ProtocolValiditySpec is a specification of protocol validation request.

type RbacStatus added in v1.6.2

type RbacStatus struct {
	// True when RBACs are enabled in the cluster.
	Enabled bool `json:"enabled"`
}

RBACStatus describes status of RBAC in the cluster.

func ValidateRbacStatus added in v1.6.2

func ValidateRbacStatus(client kubernetes.Interface) (*RbacStatus, error)

ValidateRBACStatus validates if RBACs are enabled in the cluster. Supported version of RBAC api is: 'rbac.authorization.k8s.io/v1beta1'

Jump to

Keyboard shortcuts

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