v1alpha1

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 18 Imported by: 3

Documentation

Overview

+k8s:deepcopy-gen=package +k8s:openapi-gen=true

Index

Constants

This section is empty.

Variables

View Source
var EmptySize = NewSizeFromBytes(0)

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

Types

type APIType

type APIType struct {
	*TypeMeta   `json:",inline"`
	*ObjectMeta `json:"metadata"`
}

APIType is a struct implementing Object, used for unmarshalling unknown objects into this intermediate type where .Name, .UID, .Kind and .APIVersion become easily available +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func APITypeFrom

func APITypeFrom(obj Object) *APIType

APITypeFrom is used to create a bound APIType from an Object

func NewAPIType

func NewAPIType() *APIType

This constructor ensures the APIType fields are not nil

func (*APIType) DeepCopy

func (in *APIType) DeepCopy() *APIType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIType.

func (*APIType) DeepCopyInto

func (in *APIType) DeepCopyInto(out *APIType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*APIType) DeepCopyObject

func (in *APIType) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type APITypeList

type APITypeList []*APIType

APITypeList is a list of many pointers APIType objects

func (APITypeList) DeepCopy

func (in APITypeList) DeepCopy() APITypeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APITypeList.

func (APITypeList) DeepCopyInto

func (in APITypeList) DeepCopyInto(out *APITypeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DMID

type DMID struct {
	// contains filtered or unexported fields
}

DMID specifies the format for device mapper IDs

func NewDMID

func NewDMID(i int) DMID

func NewPoolDMID

func NewPoolDMID() DMID

func (*DMID) DeepCopy

func (in *DMID) DeepCopy() *DMID

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DMID.

func (*DMID) DeepCopyInto

func (in *DMID) DeepCopyInto(out *DMID)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DMID) Index

func (d *DMID) Index() int

func (*DMID) Pool

func (d *DMID) Pool() bool

func (DMID) String

func (d DMID) String() string

type IPAddresses

type IPAddresses []net.IP

IPAddresses represents a list of VM IP addresses

func (IPAddresses) DeepCopy

func (in IPAddresses) DeepCopy() IPAddresses

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddresses.

func (IPAddresses) DeepCopyInto

func (in IPAddresses) DeepCopyInto(out *IPAddresses)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (IPAddresses) String

func (i IPAddresses) String() string

type Kind

type Kind string

func ParseKind added in v0.5.0

func ParseKind(input string) Kind

Returns a Kind parsed from the given string

func (Kind) Lower

func (k Kind) Lower() string

Returns a lowercase string representation of the Kind

func (Kind) String

func (k Kind) String() string

Returns a string representation of the Kind suitable for sentences

func (Kind) Title

func (k Kind) Title() string

Returns a title case string representation of the Kind

type OCIContentID added in v0.5.0

type OCIContentID struct {
	// contains filtered or unexported fields
}

func ParseOCIContentID added in v0.5.0

func ParseOCIContentID(str string) (*OCIContentID, error)

ParseOCIContentID takes in a string to parse into an *OCIContentID If given a local Docker SHA like "sha256:3285f65b2651c68b5316e7a1fbabd30b5ae47914ac5791ac4bb9d59d029b924b", it will be parsed into the local format, encoded as "docker://<SHA>". Given a full repo digest, such as "weaveworks/ignite-ubuntu@sha256:3285f65b2651c68b5316e7a1fbabd30b5ae47914ac5791ac4bb9d59d029b924b", it will be parsed into the OCI registry format, encoded as "oci://<full path>@<SHA>".

func (*OCIContentID) DeepCopy added in v0.5.0

func (in *OCIContentID) DeepCopy() *OCIContentID

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIContentID.

func (*OCIContentID) DeepCopyInto added in v0.5.0

func (in *OCIContentID) DeepCopyInto(out *OCIContentID)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OCIContentID) Digest added in v0.5.0

func (o *OCIContentID) Digest() digest.Digest

Digest gets the digest of the content ID

func (*OCIContentID) Local added in v0.5.0

func (o *OCIContentID) Local() bool

Local returns true if the image has no repoName, i.e. it's not available from a registry

func (*OCIContentID) MarshalJSON added in v0.5.0

func (o *OCIContentID) MarshalJSON() ([]byte, error)

func (*OCIContentID) RepoDigest added in v0.5.0

func (o *OCIContentID) RepoDigest() (n reference.Named)

RepoDigest returns a repo digest based on the OCIContentID if it is not local

func (*OCIContentID) String added in v0.5.0

func (o *OCIContentID) String() string

func (*OCIContentID) UnmarshalJSON added in v0.5.0

func (o *OCIContentID) UnmarshalJSON(b []byte) (err error)

type OCIImageRef

type OCIImageRef string

OCIImageRef is a string by which an OCI runtime can identify an image to retrieve. It needs to have a tag and usually looks like "weaveworks/ignite-ubuntu:latest".

func NewOCIImageRef

func NewOCIImageRef(imageStr string) (OCIImageRef, error)

NewOCIImageRef parses and normalizes a reference to an OCI (docker) image.

func (OCIImageRef) IsUnset

func (i OCIImageRef) IsUnset() bool

func (OCIImageRef) String

func (i OCIImageRef) String() string

func (*OCIImageRef) UnmarshalJSON

func (i *OCIImageRef) UnmarshalJSON(b []byte) (err error)

type Object

type Object interface {
	runtime.Object

	GetTypeMeta() *TypeMeta
	GetObjectMeta() *ObjectMeta

	GetKind() Kind
	GroupVersionKind() schema.GroupVersionKind
	SetGroupVersionKind(schema.GroupVersionKind)

	GetName() string
	SetName(string)

	GetUID() UID
	SetUID(UID)

	GetCreated() Time
	SetCreated(t Time)

	GetLabel(key string) string
	SetLabel(key, value string)

	GetAnnotation(key string) string
	SetAnnotation(key, value string)
}

Object extends k8s.io/apimachinery's runtime.Object with extra GetName() and GetUID() methods from ObjectMeta

type ObjectMeta

type ObjectMeta struct {
	Name        string            `json:"name"`
	UID         UID               `json:"uid,omitempty"`
	Created     Time              `json:"created"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

ObjectMeta have to be embedded into any serializable object. It provides the .GetName() and .GetUID() methods that help implement the Object interface

func (*ObjectMeta) DeepCopy

func (in *ObjectMeta) DeepCopy() *ObjectMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.

func (*ObjectMeta) DeepCopyInto

func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ObjectMeta) GetAnnotation

func (o *ObjectMeta) GetAnnotation(key string) string

GetAnnotation returns the label value for the key

func (*ObjectMeta) GetCreated

func (o *ObjectMeta) GetCreated() Time

GetCreated returns when the Object was created

func (*ObjectMeta) GetLabel

func (o *ObjectMeta) GetLabel(key string) string

GetLabel returns the label value for the key

func (*ObjectMeta) GetName

func (o *ObjectMeta) GetName() string

GetName returns the name of the Object

func (*ObjectMeta) GetObjectMeta

func (o *ObjectMeta) GetObjectMeta() *ObjectMeta

This is a helper for APIType generation

func (*ObjectMeta) GetUID

func (o *ObjectMeta) GetUID() UID

GetUID returns the UID of the Object

func (*ObjectMeta) SetAnnotation

func (o *ObjectMeta) SetAnnotation(key, value string)

SetAnnotation sets a label value for a key

func (*ObjectMeta) SetCreated

func (o *ObjectMeta) SetCreated(t Time)

SetCreated sets the creation time of the Object

func (*ObjectMeta) SetLabel

func (o *ObjectMeta) SetLabel(key, value string)

SetLabel sets a label value for a key

func (*ObjectMeta) SetName

func (o *ObjectMeta) SetName(name string)

SetName sets the name of the Object

func (*ObjectMeta) SetUID

func (o *ObjectMeta) SetUID(uid UID)

SetUID sets the UID of the Object

type PortMapping

type PortMapping struct {
	BindAddress net.IP   `json:"bindAddress,omitempty"`
	HostPort    uint64   `json:"hostPort"`
	VMPort      uint64   `json:"vmPort"`
	Protocol    Protocol `json:"protocol,omitempty"`
}

PortMapping defines a port mapping between the VM and the host

func (*PortMapping) DeepCopy

func (in *PortMapping) DeepCopy() *PortMapping

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortMapping.

func (*PortMapping) DeepCopyInto

func (in *PortMapping) DeepCopyInto(out *PortMapping)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PortMapping) String

func (p PortMapping) String() string

type PortMappings

type PortMappings []PortMapping

PortMappings represents a list of port mappings

func ParsePortMappings

func ParsePortMappings(input []string) (PortMappings, error)

func (PortMappings) DeepCopy

func (in PortMappings) DeepCopy() PortMappings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortMappings.

func (PortMappings) DeepCopyInto

func (in PortMappings) DeepCopyInto(out *PortMappings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PortMappings) String

func (p PortMappings) String() string

type Protocol added in v0.5.0

type Protocol string

Protocol specifies a network port protocol

const (
	ProtocolTCP Protocol = "tcp"
	ProtocolUDP Protocol = "udp"
)

func (Protocol) String added in v0.5.0

func (p Protocol) String() string

func (*Protocol) UnmarshalJSON added in v0.5.0

func (p *Protocol) UnmarshalJSON(b []byte) (err error)

type Size

type Size struct {
	datasize.ByteSize
}

Size specifies a common unit for data sizes

func NewSizeFromBytes

func NewSizeFromBytes(bytes uint64) Size

func NewSizeFromSectors

func NewSizeFromSectors(sectors uint64) Size

func NewSizeFromString

func NewSizeFromString(str string) (Size, error)

func (Size) Add

func (s Size) Add(other Size) Size

Add returns a copy, does not modify the receiver

func (*Size) DeepCopy

func (in *Size) DeepCopy() *Size

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Size.

func (*Size) DeepCopyInto

func (in *Size) DeepCopyInto(out *Size)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Size) MarshalJSON

func (s *Size) MarshalJSON() ([]byte, error)

func (Size) Max

func (s Size) Max(other Size) Size

func (Size) Min

func (s Size) Min(other Size) Size

func (Size) Sectors

func (s Size) Sectors() uint64

func (Size) String

func (s Size) String() string

Override ByteSize's default string implementation which results in .HR() without spaces

func (*Size) UnmarshalJSON

func (s *Size) UnmarshalJSON(b []byte) error

type Time

type Time struct {
	metav1.Time
}

func Timestamp

func Timestamp() Time

Timestamp returns the current UTC time

func (*Time) DeepCopy

func (in *Time) DeepCopy() *Time

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Time.

func (*Time) DeepCopyInto

func (in *Time) DeepCopyInto(out *Time)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Time) MarshalJSON added in v0.4.2

func (t Time) MarshalJSON() (b []byte, err error)

func (Time) String

func (t Time) String() string

The default string for Time is a human readable difference between the Time and the current time

type TypeMeta

type TypeMeta struct {
	metav1.TypeMeta
}

TypeMeta is an alias for the k8s/apimachinery TypeMeta with some additional methods

func (*TypeMeta) DeepCopy

func (in *TypeMeta) DeepCopy() *TypeMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeMeta.

func (*TypeMeta) DeepCopyInto

func (in *TypeMeta) DeepCopyInto(out *TypeMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TypeMeta) GetKind

func (t *TypeMeta) GetKind() Kind

func (*TypeMeta) GetTypeMeta

func (t *TypeMeta) GetTypeMeta() *TypeMeta

This is a helper for APIType generation

func (*TypeMeta) GroupVersionKind added in v0.5.0

func (t *TypeMeta) GroupVersionKind() schema.GroupVersionKind

func (*TypeMeta) SetGroupVersionKind added in v0.5.0

func (t *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind)

type UID

type UID string

UID represents an unique ID for a type

func (UID) String

func (u UID) String() string

String returns the UID in string representation

func (*UID) UnmarshalJSON added in v0.4.2

func (u *UID) UnmarshalJSON(b []byte) error

This unmarshaler enables the UID to be passed in as an unquoted string in JSON. Upon marshaling, quotes will be automatically added.

Jump to

Keyboard shortcuts

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