types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate string

Certificate is a wrapper on string type, which parses it's content as X.509 certificate while unmarshalling. This allows to validate the data during unmarshalling process.

func (*Certificate) UnmarshalJSON

func (c *Certificate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements encoding/json.Unmarshaler interface.

type PrivateKey

type PrivateKey string

PrivateKey is a wrapper on string type, which parses it's content as private key while unmarshalling. This allows to validate the data during unmarshalling process.

func (*PrivateKey) UnmarshalJSON

func (c *PrivateKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements encoding/json.Unmarshaler interface.

type Resource

type Resource interface {
	StateToYaml() ([]byte, error)
	CheckCurrentState() error
	Deploy() error
}

Resource interface defines flexkube resource like kubelet pool or static controlplane.

func ResourceFromYaml

func ResourceFromYaml(c []byte, r ResourceConfig) (Resource, error)

type ResourceConfig

type ResourceConfig interface {
	New() (Resource, error)
}

type ValidateError

type ValidateError []error

ValidateError is a collection of errors, which can be used when performing validation of structs to collect all possible errors and return them in one batch.

func (ValidateError) Error

func (e ValidateError) Error() string

func (ValidateError) Return

func (e ValidateError) Return() error

Return returns nil, if no errors has been added.

Jump to

Keyboard shortcuts

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