utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VolumeCreating is a VolumeState enum value
	VolumeStateCreating = "creating"

	// VolumeStateAvailable is a VolumeState enum value
	VolumeStateAvailable = "available"

	// VolumeStateInUse is a VolumeState enum value
	VolumeStateInUse = "inUse"

	// VolumeStateError is a VolumeState enum value
	VolumeStateError = "error"

	// VolumeStateUpdating is a VolumeState enum value
	VolumeStateUpdating = "updating"

	// VolumeStateDeleting is a VolumeState enum value
	VolumeStateDeleting = "deleting"

	// VolumeStateErrorDeleting is a VolumeState enum value
	VolumeStateErrorDeleting = "errorDeleting"

	// VolumeStateDeleted is a VolumeState enum value
	VolumeStateDeleted = "deleted"
)
View Source
const (
	// It's RFC 8601 format that decodes and encodes with
	// exactly precision to seconds.
	TimeFormat = `2006-01-02T15:04:05`
)

Variables

This section is empty.

Functions

func ConvertMetadataStructToMap

func ConvertMetadataStructToMap(metaStruct *pstruct.Struct) (map[string]interface{}, error)

func ConvertTags

func ConvertTags(pbtags []*pb.Tag) ([]model.Tag, error)

func GetBackend

func GetBackend(ctx context.Context, backendClient backend.BackendService,
	backendId string) (*backend.GetBackendResponse, error)

func MergeVolumeData

func MergeVolumeData(vol *pb.Volume, volFinal *pb.Volume) error

func ParseStructFields

func ParseStructFields(fields map[string]*pstruct.Value) (map[string]interface{}, error)

func UpdateVolumeModel

func UpdateVolumeModel(volPb *pb.Volume, volModel *model.Volume) error

func UpdateVolumeStruct

func UpdateVolumeStruct(volModel *model.Volume, volPb *pb.Volume) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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