v1alpha1¶
import "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
type DMID¶
type DMID struct {
// contains filtered or unexported fields
}
DMID specifies the format for device mapper IDs
func NewPoolDMID¶
func NewPoolDMID() DMID
type OCIContentID¶
type OCIContentID struct {
// contains filtered or unexported fields
}
func ParseOCIContentID¶
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://
func (*OCIContentID) Digest¶
func (o *OCIContentID) Digest() digest.Digest
Digest gets the digest of the content ID
func (*OCIContentID) Local¶
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¶
func (o *OCIContentID) MarshalJSON() ([]byte, error)
func (*OCIContentID) RepoDigest¶
func (o *OCIContentID) RepoDigest() (n reference.Named)
RepoDigest returns a repo digest based on the OCIContentID if it is not local
func (*OCIContentID) SchemeString¶
func (o *OCIContentID) SchemeString() string
Scheme returns the string representation with the scheme prefix
func (*OCIContentID) String¶
func (o *OCIContentID) String() string
String returns the string representation for either format
func (*OCIContentID) UnmarshalJSON¶
func (o *OCIContentID) UnmarshalJSON(b []byte) (err error)
type OCIImageRef¶
type OCIImageRef struct {
// contains filtered or unexported fields
}
OCIImageRef is a struct containing a names and tagged reference by which an OCI runtime can identify an image to retrieve.
func NewOCIImageRef¶
func NewOCIImageRef(imageStr string) (o OCIImageRef, err error)
NewOCIImageRef parses and normalizes a reference to an OCI (docker) image.
func (OCIImageRef) MarshalJSON¶
func (i OCIImageRef) MarshalJSON() ([]byte, error)
func (OCIImageRef) Normalized¶
func (i OCIImageRef) Normalized() string
Normalized returns the normalized reference, e.g. “docker.io/weaveworks/ignite-ubuntu:latest”
func (OCIImageRef) Ref¶
func (i OCIImageRef) Ref() reference.NamedTagged
Ref parses the internal strings to a reference.NamedTagged
func (OCIImageRef) String¶
func (i OCIImageRef) String() string
String returns the familiar form of the reference, e.g. “weaveworks/ignite-ubuntu:latest”
func (*OCIImageRef) UnmarshalJSON¶
func (i *OCIImageRef) UnmarshalJSON(b []byte) (err error)
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
type PortMappings¶
type PortMappings []PortMapping
PortMappings represents a list of port mappings
func ParsePortMappings¶
func ParsePortMappings(input []string) (PortMappings, error)
type Protocol¶
type Protocol string
Protocol specifies a network port protocol
const (
ProtocolTCP Protocol = "tcp"
ProtocolUDP Protocol = "udp"
)
func (*Protocol) UnmarshalJSON¶
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) MarshalJSON¶
func (s *Size) MarshalJSON() ([]byte, error)