wrapper

package
v0.0.0-...-9a80f3b Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotImplemented signals that the called method is not implemented
	ErrNotImplemented = errors.New("not implemented")
)

Functions

This section is empty.

Types

type RecordWrapper

type RecordWrapper interface {
	// Filename returns name of file this should be saved in WITHOUT extension
	Filename() string

	// AsJSON returns an annotated structure that can be serialized to JSON.
	// ErrNotImplemented is returned if the operation is not implemented
	AsJSON() (interface{}, error)

	// AsXML returns an annotated structure that can be serialized to XML.
	// ErrNotImplemented is returned if the operation is not implemented
	AsXML() (interface{}, error)

	// AsTemplate returns a structure that can be serialized via template.
	// ErrNotImplemented is returned if the operation is not implemented
	AsTemplate() (interface{}, error)
}

RecordWrapper is an interface to wrap record types

func NewGPUWrapper

func NewGPUWrapper(gpu goat_grpc.GPURecord) RecordWrapper

NewGPUWrapper wraps given gpu in a RecordWrapper

func NewIPWrapper

func NewIPWrapper(ip goat_grpc.IpRecord) RecordWrapper

NewIPWrapper wraps given ip in a RecordWrapper

func NewStorageWrapper

func NewStorageWrapper(st goat_grpc.StorageRecord) RecordWrapper

NewStorageWrapper wraps given storage in a RecordWrapper

func NewVMWrapper

func NewVMWrapper(vm goat_grpc.VmRecord) RecordWrapper

NewVMWrapper wraps given vm in a RecordWrapper

func WrapGPU

func WrapGPU(gpu goat_grpc.GPURecord) RecordWrapper

WrapGPU wraps given gpu in a RecordWrapper

func WrapIP

func WrapIP(ip goat_grpc.IpRecord) RecordWrapper

WrapIP wraps given ip in a RecordWrapper

func WrapStorage

func WrapStorage(st goat_grpc.StorageRecord) RecordWrapper

WrapStorage wraps given storage in a RecordWrapper

func WrapVM

func WrapVM(vm goat_grpc.VmRecord) RecordWrapper

WrapVM wraps given vm in a RecordWrapper

Jump to

Keyboard shortcuts

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