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 ¶
- Variables
- func TaprLocation(pb *Location) tape.Location
- func TaprVolume(pb *Volume) tape.Volume
- func TaprVolumeCategory(pb Volume_Category) tape.VolumeCategory
- func TaprVolumes(pbs []*Volume) []tape.Volume
- type Location
- type StatusRequest
- type StatusResponse
- type Volume
- func (*Volume) Descriptor() ([]byte, []int)
- func (m *Volume) GetCategory() Volume_Category
- func (m *Volume) GetFlags() uint32
- func (m *Volume) GetHome() *Location
- func (m *Volume) GetLocation() *Location
- func (m *Volume) GetSerial() string
- func (*Volume) ProtoMessage()
- func (m *Volume) Reset()
- func (m *Volume) String() string
- type Volume_Category
Constants ¶
This section is empty.
Variables ¶
var Volume_Category_name = map[int32]string{
0: "UNKNOWN",
1: "ALLOCATING",
2: "FILLING",
3: "SCRATCH",
4: "FULL",
5: "MISSING",
6: "DAMAGED",
7: "CLEANING",
}
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 ¶
TaprLocation converts a proto.Location to a tapr.Location.
func TaprVolume ¶
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 ¶
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 ¶
LocationProto converts a tapr.Location to a proto.Location.
func (*Location) Descriptor ¶
func (*Location) GetCategory ¶
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
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 ¶
VolumeProto converts a tapr.Volume to a proto.Volume.
func VolumeProtos ¶
VolumeProtos converts a slice of tapr.Volume to a slice of proto.Volume.
func (*Volume) Descriptor ¶
func (*Volume) GetCategory ¶
func (m *Volume) GetCategory() Volume_Category
func (*Volume) GetLocation ¶
func (*Volume) ProtoMessage ¶
func (*Volume) ProtoMessage()
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