output

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeText can be used to output RAW text.
	TypeText Type = "text"
	// TypeJSON can be used to output a JSON formatted string.
	TypeJSON Type = "json"

	// FieldDeviceName can be used to return local block device name.
	FieldDeviceName Field = "device-name"
	// FieldDeviceNamespace can be used to return the nvme namespace number of the device.
	FieldDeviceNamespace Field = "device-namespace"
	// FieldDevicePartition can be used to return the nvme partition number of the device.
	FieldDevicePartition Field = "device-partition"
	// FieldDevicePath can be used to return local block device path.
	FieldDevicePath Field = "device-path"
	// FieldVolumeID can be used to return EBS volume-id.
	FieldVolumeID Field = "volume-id"
)

Variables

This section is empty.

Functions

func FormatDeviceDetails

func FormatDeviceDetails(d ebsnvme.Device, outputType Type, outputFields []Field) (s string)

Types

type Field

type Field string

func (Field) String

func (f Field) String() string

type Fields

type Fields []Field

func GetValidFields added in v0.2.1

func GetValidFields() Fields

func ParseFieldsFromStringSlice

func ParseFieldsFromStringSlice(fields []string) (parsedFields Fields, err error)

func (Fields) StringSlice added in v0.2.1

func (fields Fields) StringSlice() (slice []string)

type Type

type Type string

func ParseTypeFromString

func ParseTypeFromString(t string) (parsedType Type, err error)

func (Type) String

func (t Type) String() string

type Types

type Types []Type

func GetValidTypes added in v0.2.1

func GetValidTypes() Types

Jump to

Keyboard shortcuts

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