validation

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: Apache-2.0 Imports: 11 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 LoginStatus added in v1.7.0

type LoginStatus struct {
	// True when token header indicating logged in user is found in request.
	TokenPresent bool `json:"tokenPresent"`
	// True when authorization header indicating logged in user is found in request.
	HeaderPresent bool `json:"headerPresent"`
	// True if dashboard is configured to use HTTPS connection. It is required for secure
	// data exchange during login operation.
	HTTPSMode bool `json:"httpsMode"`
}

LoginStatus is returned as a response to login status check. Used by the frontend to determine if is logged in and if login page should be shown.

func ValidateLoginStatus added in v1.7.0

func ValidateLoginStatus(request *restful.Request, enableInsecureLogin bool) *LoginStatus

ValidateLoginStatus returns information about user login status and if request was made over HTTPS.

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