types

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateState

type CertificateState platform.CertificateState

func (CertificateState) MarshalText added in v0.1.1

func (state CertificateState) MarshalText() ([]byte, error)

func (CertificateState) String

func (state CertificateState) String() string

func (*CertificateState) UnmarshalText added in v0.1.1

func (state *CertificateState) UnmarshalText(text []byte) error

type DurationMS

type DurationMS int64

DurationMS is a time wrapper that represents a duration in milliseconds.

func (DurationMS) MarshalJSON added in v0.1.1

func (d DurationMS) MarshalJSON() ([]byte, error)

func (DurationMS) MarshalText added in v0.1.1

func (d DurationMS) MarshalText() ([]byte, error)

func (DurationMS) String added in v0.1.1

func (d DurationMS) String() string

func (*DurationMS) UnmarshalJSON added in v0.1.1

func (d *DurationMS) UnmarshalJSON(data []byte) error

func (*DurationMS) UnmarshalText added in v0.1.1

func (d *DurationMS) UnmarshalText(text []byte) error

type DurationS added in v0.1.1

type DurationS time.Duration

DurationS is a time wrapper that represents a duration in seconds.

func (DurationS) MarshalJSON added in v0.1.1

func (d DurationS) MarshalJSON() ([]byte, error)

func (DurationS) MarshalText added in v0.1.1

func (d DurationS) MarshalText() ([]byte, error)

func (DurationS) String added in v0.1.1

func (d DurationS) String() string

func (*DurationS) UnmarshalJSON added in v0.1.1

func (d *DurationS) UnmarshalJSON(data []byte) error

func (*DurationS) UnmarshalText added in v0.1.1

func (d *DurationS) UnmarshalText(text []byte) error

type DurationUS

type DurationUS int64

DurationUS is a time wrapper that represents a duration in microseconds.

func (DurationUS) MarshalJSON added in v0.1.1

func (d DurationUS) MarshalJSON() ([]byte, error)

func (DurationUS) MarshalText added in v0.1.1

func (d DurationUS) MarshalText() ([]byte, error)

func (DurationUS) String added in v0.1.1

func (d DurationUS) String() string

func (*DurationUS) UnmarshalJSON added in v0.1.1

func (d *DurationUS) UnmarshalJSON(data []byte) error

func (*DurationUS) UnmarshalText added in v0.1.1

func (d *DurationUS) UnmarshalText(text []byte) error

type ImageRef

type ImageRef[T interface {
	reference.Named
	comparable
}] struct {
	Reference T
}

ImageRef is a generic wrapper around a Docker image reference.

func (ImageRef[T]) MarshalText

func (ir ImageRef[T]) MarshalText() ([]byte, error)

func (*ImageRef[T]) UnmarshalText added in v0.2.0

func (ir *ImageRef[T]) UnmarshalText(text []byte) error

type InstanceState

type InstanceState platform.InstanceState

InstanceState is a wrapper around platform.InstanceState to automatically add pretty colors.

func (InstanceState) IsRunning added in v0.1.1

func (state InstanceState) IsRunning() bool

func (InstanceState) MarshalText added in v0.1.1

func (state InstanceState) MarshalText() ([]byte, error)

func (InstanceState) String

func (state InstanceState) String() string

func (*InstanceState) UnmarshalText added in v0.1.1

func (state *InstanceState) UnmarshalText(text []byte) error

type MetroStatus added in v0.1.1

type MetroStatus string

MetroStatus represents the connection status of a metro endpoint.

const (
	MetroStatusOnline  MetroStatus = "online"
	MetroStatusOffline MetroStatus = "offline"
)

func (MetroStatus) String added in v0.1.1

func (s MetroStatus) String() string

type PingLatency added in v0.1.1

type PingLatency time.Duration

PingLatency represents network latency to a metro endpoint.

func (PingLatency) MarshalJSON added in v0.1.1

func (p PingLatency) MarshalJSON() ([]byte, error)

func (PingLatency) MarshalText added in v0.1.1

func (p PingLatency) MarshalText() ([]byte, error)

func (PingLatency) String added in v0.1.1

func (p PingLatency) String() string

type Platform added in v0.2.2

type Platform platforms.Platform

Platform wraps containerd platform values.

func (Platform) MarshalText added in v0.2.2

func (p Platform) MarshalText() ([]byte, error)

func (Platform) String added in v0.2.2

func (p Platform) String() string

func (*Platform) UnmarshalText added in v0.2.2

func (p *Platform) UnmarshalText(text []byte) error

type Range added in v0.2.0

type Range[T any] struct {
	Min T `field:",long"`
	Max T `field:",long"`
}

Range represents a min/max range for quota limits. It marshals to text as "min...max".

func (Range[T]) MarshalText added in v0.2.0

func (r Range[T]) MarshalText() ([]byte, error)

func (Range[T]) String added in v0.2.0

func (r Range[T]) String() string

type RelativeTime added in v0.2.0

type RelativeTime time.Time

RelativeTime is a time wrapper that represents time in a human-friendly relative format (e.g., "2 hours ago", "in 5 minutes").

func Now added in v0.2.0

func Now() RelativeTime

Now returns the current time as a RelativeTime.

func (RelativeTime) IsZero added in v0.2.0

func (t RelativeTime) IsZero() bool

IsZero reports whether t represents the zero time instant.

func (RelativeTime) MarshalJSON added in v0.2.0

func (t RelativeTime) MarshalJSON() ([]byte, error)

func (RelativeTime) MarshalText added in v0.2.0

func (t RelativeTime) MarshalText() ([]byte, error)

func (RelativeTime) String added in v0.2.0

func (t RelativeTime) String() string

String returns the time as a human-friendly relative string.

func (RelativeTime) Time added in v0.2.0

func (t RelativeTime) Time() time.Time

Time returns the underlying time.Time value.

func (*RelativeTime) UnmarshalJSON added in v0.2.0

func (t *RelativeTime) UnmarshalJSON(data []byte) error

func (*RelativeTime) UnmarshalText added in v0.2.0

func (t *RelativeTime) UnmarshalText(text []byte) error

type SizeBytes added in v0.2.2

type SizeBytes int64

SizeBytes is a size wrapper that represents a size in bytes.

func (SizeBytes) MarshalJSON added in v0.2.2

func (b SizeBytes) MarshalJSON() ([]byte, error)

func (SizeBytes) MarshalText added in v0.2.2

func (b SizeBytes) MarshalText() ([]byte, error)

func (SizeBytes) String added in v0.2.2

func (b SizeBytes) String() string

func (*SizeBytes) UnmarshalJSON added in v0.2.2

func (b *SizeBytes) UnmarshalJSON(data []byte) error

func (*SizeBytes) UnmarshalText added in v0.2.2

func (b *SizeBytes) UnmarshalText(text []byte) error

type SizeMebibytes

type SizeMebibytes int64

SizeMebibytes is a size wrapper that represents a size in mebibytes.

func (SizeMebibytes) MarshalJSON

func (m SizeMebibytes) MarshalJSON() ([]byte, error)

func (SizeMebibytes) MarshalText

func (m SizeMebibytes) MarshalText() ([]byte, error)

func (SizeMebibytes) String

func (m SizeMebibytes) String() string

func (*SizeMebibytes) UnmarshalJSON

func (m *SizeMebibytes) UnmarshalJSON(data []byte) error

func (*SizeMebibytes) UnmarshalText

func (m *SizeMebibytes) UnmarshalText(text []byte) error

type Usage added in v0.2.0

type Usage[T any] struct {
	Used  T `field:",long"`
	Limit T `field:",long"`
}

Usage represents a used/limit pair for quota tracking. It marshals to text as "used/limit".

func (Usage[T]) MarshalText added in v0.2.0

func (u Usage[T]) MarshalText() ([]byte, error)

func (Usage[T]) String added in v0.2.0

func (u Usage[T]) String() string

type VolumeState

type VolumeState platform.VolumeState

func (VolumeState) MarshalText added in v0.1.1

func (state VolumeState) MarshalText() ([]byte, error)

func (VolumeState) String

func (state VolumeState) String() string

func (*VolumeState) UnmarshalText added in v0.1.1

func (state *VolumeState) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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