proto

package
v0.0.0-...-c8a5df3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

tape.proto

It has these top-level messages:

Location
Volume
StatusRequest
StatusResponse

Index

Constants

This section is empty.

Variables

View Source
var Volume_Category_name = map[int32]string{
	0: "UNKNOWN",
	1: "ALLOCATING",
	2: "FILLING",
	3: "SCRATCH",
	4: "FULL",
	5: "MISSING",
	6: "DAMAGED",
	7: "CLEANING",
}
View Source
var Volume_Category_value = map[string]int32{
	"UNKNOWN":    0,
	"ALLOCATING": 1,
	"FILLING":    2,
	"SCRATCH":    3,
	"FULL":       4,
	"MISSING":    5,
	"DAMAGED":    6,
	"CLEANING":   7,
}

Functions

func TaprLocation

func TaprLocation(pb *Location) tape.Location

TaprLocation converts a proto.Location to a tapr.Location.

func TaprVolume

func TaprVolume(pb *Volume) tape.Volume

TaprVolume converts a proto.Volume to a tapr.Volume.

func TaprVolumeCategory

func TaprVolumeCategory(pb Volume_Category) tape.VolumeCategory

TaprVolumeCategory converts a proto.Volume_Category to a tapr.VolumeCategory.

func TaprVolumes

func TaprVolumes(pbs []*Volume) []tape.Volume

TaprVolumes converts a slice of proto.Volume to a slice of tapr.Volume.

Types

type Location

type Location struct {
	Addr     int64  `protobuf:"varint,1,opt,name=addr" json:"addr,omitempty"`
	Category string `protobuf:"bytes,2,opt,name=category" json:"category,omitempty"`
}

Location represents a location in a tape library

func LocationProto

func LocationProto(loc tape.Location) *Location

LocationProto converts a tapr.Location to a proto.Location.

func (*Location) Descriptor

func (*Location) Descriptor() ([]byte, []int)

func (*Location) GetAddr

func (m *Location) GetAddr() int64

func (*Location) GetCategory

func (m *Location) GetCategory() string

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) Reset

func (m *Location) Reset()

func (*Location) String

func (m *Location) String() string

type StatusRequest

type StatusRequest struct {
}

func (*StatusRequest) Descriptor

func (*StatusRequest) Descriptor() ([]byte, []int)

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) Reset

func (m *StatusRequest) Reset()

func (*StatusRequest) String

func (m *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Volumes []*Volume `protobuf:"bytes,1,rep,name=volumes" json:"volumes,omitempty"`
	Error   []byte    `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}

func (*StatusResponse) Descriptor

func (*StatusResponse) Descriptor() ([]byte, []int)

func (*StatusResponse) GetError

func (m *StatusResponse) GetError() []byte

func (*StatusResponse) GetVolumes

func (m *StatusResponse) GetVolumes() []*Volume

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) Reset

func (m *StatusResponse) Reset()

func (*StatusResponse) String

func (m *StatusResponse) String() string

type Volume

type Volume struct {
	// serial is the volume serial (VOLSER)
	Serial string `protobuf:"bytes,1,opt,name=serial" json:"serial,omitempty"`
	// location is the current location (e.g. (0, transfer), indicating
	// the volume is loaded into the first transfer element)
	Location *Location `protobuf:"bytes,2,opt,name=location" json:"location,omitempty"`
	// if currently mounted, home holds the home storage location.
	Home     *Location       `protobuf:"bytes,3,opt,name=home" json:"home,omitempty"`
	Category Volume_Category `protobuf:"varint,4,opt,name=category,enum=proto.Volume_Category" json:"category,omitempty"`
	// implementation specific volume flags
	Flags uint32 `protobuf:"varint,5,opt,name=flags" json:"flags,omitempty"`
}

Volumes represents a tape library volume.

func VolumeProto

func VolumeProto(v tape.Volume) *Volume

VolumeProto converts a tapr.Volume to a proto.Volume.

func VolumeProtos

func VolumeProtos(vols []tape.Volume) []*Volume

VolumeProtos converts a slice of tapr.Volume to a slice of proto.Volume.

func (*Volume) Descriptor

func (*Volume) Descriptor() ([]byte, []int)

func (*Volume) GetCategory

func (m *Volume) GetCategory() Volume_Category

func (*Volume) GetFlags

func (m *Volume) GetFlags() uint32

func (*Volume) GetHome

func (m *Volume) GetHome() *Location

func (*Volume) GetLocation

func (m *Volume) GetLocation() *Location

func (*Volume) GetSerial

func (m *Volume) GetSerial() string

func (*Volume) ProtoMessage

func (*Volume) ProtoMessage()

func (*Volume) Reset

func (m *Volume) Reset()

func (*Volume) String

func (m *Volume) String() string

type Volume_Category

type Volume_Category int32

the volume category

const (
	Volume_UNKNOWN    Volume_Category = 0
	Volume_ALLOCATING Volume_Category = 1
	Volume_FILLING    Volume_Category = 2
	Volume_SCRATCH    Volume_Category = 3
	Volume_FULL       Volume_Category = 4
	Volume_MISSING    Volume_Category = 5
	Volume_DAMAGED    Volume_Category = 6
	Volume_CLEANING   Volume_Category = 7
)

func VolumeCategoryProto

func VolumeCategoryProto(s tape.VolumeCategory) Volume_Category

VolumeCategoryProto converts a tapr.VolumeCategory to a proto.Volume_Category.

func (Volume_Category) EnumDescriptor

func (Volume_Category) EnumDescriptor() ([]byte, []int)

func (Volume_Category) String

func (x Volume_Category) String() string

Jump to

Keyboard shortcuts

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