validation

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: Apache-2.0 Imports: 5 Imported by: 83

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 of the application.
	Name string `json:"name"`

	// Namespace of the application.
	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.

Jump to

Keyboard shortcuts

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