provisioned

package
v0.0.0-...-ecf9f1f Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T int

T stores an integer value representing a service, instance or resource provisioned state.

const (
	// Undef is used when a resource or instance has no provisioned state.
	Undef T = iota
	// True means the instance or resource is known to be provisioned.
	True
	// False means the instance or resource is known to be not provisioned.
	False
	// Mixed means the instance or service is partially provisioned.
	Mixed
	// NotApplicable means the resource does not need provisioning.
	NotApplicable
)

func FromBool

func FromBool(v bool) T

FromBool is a factory function resource drivers can use to return a provisioned.T from a boolean

func NewFromString

func NewFromString(s string) (T, error)

NewFromString return new T from a string representation of T

func (*T) Add

func (t *T) Add(o T)

func (T) And

func (t T) And(o T) T

And merges two states and returns the aggregate state.

func (T) FlagString

func (t T) FlagString() string

FlagString returns a one character representation of the type instance.

.  Provisioned
P  Not provisioned
p  Mixed provisioned
/  Not applicable
?  Unknown

func (T) IsNoneOf

func (t T) IsNoneOf(states ...T) bool

func (T) IsOneOf

func (t T) IsOneOf(states ...T) bool

func (T) MarshalText

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

MarshalText marshals the enum as a quoted json string

func (T) String

func (t T) String() string

func (*T) UnmarshalText

func (t *T) UnmarshalText(b []byte) error

UnmarshalText unmarshals a quoted json string to the enum value

Jump to

Keyboard shortcuts

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