add .proto files, generated code, and gen script for object/block stores
Signed-off-by: Steve Kriss <steve@heptio.com>pull/188/head
parent
cb49c62aaf
commit
3975187d57
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash -e
|
||||
#
|
||||
# Copyright 2017 Heptio Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
HACK_DIR=$(dirname "${BASH_SOURCE}")
|
||||
|
||||
echo "Running protoc"
|
||||
|
||||
protoc pkg/plugin/proto/*.proto --go_out=plugins=grpc:pkg/plugin/generated/ -I pkg/plugin/proto/
|
||||
|
||||
echo "Success!"
|
|
@ -0,0 +1,621 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: BlockStore.proto
|
||||
|
||||
/*
|
||||
Package generated is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
BlockStore.proto
|
||||
ObjectStore.proto
|
||||
Shared.proto
|
||||
|
||||
It has these top-level messages:
|
||||
CreateVolumeRequest
|
||||
CreateVolumeResponse
|
||||
GetVolumeInfoRequest
|
||||
GetVolumeInfoResponse
|
||||
IsVolumeReadyRequest
|
||||
IsVolumeReadyResponse
|
||||
ListSnapshotsRequest
|
||||
ListSnapshotsResponse
|
||||
CreateSnapshotRequest
|
||||
CreateSnapshotResponse
|
||||
DeleteSnapshotRequest
|
||||
PutObjectRequest
|
||||
GetObjectRequest
|
||||
Bytes
|
||||
ListCommonPrefixesRequest
|
||||
ListCommonPrefixesResponse
|
||||
ListObjectsRequest
|
||||
ListObjectsResponse
|
||||
DeleteObjectRequest
|
||||
CreateSignedURLRequest
|
||||
CreateSignedURLResponse
|
||||
Empty
|
||||
InitRequest
|
||||
*/
|
||||
package generated
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type CreateVolumeRequest struct {
|
||||
SnapshotID string `protobuf:"bytes,1,opt,name=snapshotID" json:"snapshotID,omitempty"`
|
||||
VolumeType string `protobuf:"bytes,2,opt,name=volumeType" json:"volumeType,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,3,opt,name=volumeAZ" json:"volumeAZ,omitempty"`
|
||||
Iops int64 `protobuf:"varint,4,opt,name=iops" json:"iops,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateVolumeRequest) Reset() { *m = CreateVolumeRequest{} }
|
||||
func (m *CreateVolumeRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateVolumeRequest) ProtoMessage() {}
|
||||
func (*CreateVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||||
|
||||
func (m *CreateVolumeRequest) GetSnapshotID() string {
|
||||
if m != nil {
|
||||
return m.SnapshotID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateVolumeRequest) GetVolumeType() string {
|
||||
if m != nil {
|
||||
return m.VolumeType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateVolumeRequest) GetVolumeAZ() string {
|
||||
if m != nil {
|
||||
return m.VolumeAZ
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateVolumeRequest) GetIops() int64 {
|
||||
if m != nil {
|
||||
return m.Iops
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CreateVolumeResponse struct {
|
||||
VolumeID string `protobuf:"bytes,1,opt,name=volumeID" json:"volumeID,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateVolumeResponse) Reset() { *m = CreateVolumeResponse{} }
|
||||
func (m *CreateVolumeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateVolumeResponse) ProtoMessage() {}
|
||||
func (*CreateVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
||||
|
||||
func (m *CreateVolumeResponse) GetVolumeID() string {
|
||||
if m != nil {
|
||||
return m.VolumeID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetVolumeInfoRequest struct {
|
||||
VolumeID string `protobuf:"bytes,1,opt,name=volumeID" json:"volumeID,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,2,opt,name=volumeAZ" json:"volumeAZ,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetVolumeInfoRequest) Reset() { *m = GetVolumeInfoRequest{} }
|
||||
func (m *GetVolumeInfoRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetVolumeInfoRequest) ProtoMessage() {}
|
||||
func (*GetVolumeInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
||||
|
||||
func (m *GetVolumeInfoRequest) GetVolumeID() string {
|
||||
if m != nil {
|
||||
return m.VolumeID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GetVolumeInfoRequest) GetVolumeAZ() string {
|
||||
if m != nil {
|
||||
return m.VolumeAZ
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetVolumeInfoResponse struct {
|
||||
VolumeType string `protobuf:"bytes,1,opt,name=volumeType" json:"volumeType,omitempty"`
|
||||
Iops int64 `protobuf:"varint,2,opt,name=iops" json:"iops,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetVolumeInfoResponse) Reset() { *m = GetVolumeInfoResponse{} }
|
||||
func (m *GetVolumeInfoResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetVolumeInfoResponse) ProtoMessage() {}
|
||||
func (*GetVolumeInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
||||
|
||||
func (m *GetVolumeInfoResponse) GetVolumeType() string {
|
||||
if m != nil {
|
||||
return m.VolumeType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GetVolumeInfoResponse) GetIops() int64 {
|
||||
if m != nil {
|
||||
return m.Iops
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type IsVolumeReadyRequest struct {
|
||||
VolumeID string `protobuf:"bytes,1,opt,name=volumeID" json:"volumeID,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,2,opt,name=volumeAZ" json:"volumeAZ,omitempty"`
|
||||
}
|
||||
|
||||
func (m *IsVolumeReadyRequest) Reset() { *m = IsVolumeReadyRequest{} }
|
||||
func (m *IsVolumeReadyRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*IsVolumeReadyRequest) ProtoMessage() {}
|
||||
func (*IsVolumeReadyRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
||||
|
||||
func (m *IsVolumeReadyRequest) GetVolumeID() string {
|
||||
if m != nil {
|
||||
return m.VolumeID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *IsVolumeReadyRequest) GetVolumeAZ() string {
|
||||
if m != nil {
|
||||
return m.VolumeAZ
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type IsVolumeReadyResponse struct {
|
||||
Ready bool `protobuf:"varint,1,opt,name=ready" json:"ready,omitempty"`
|
||||
}
|
||||
|
||||
func (m *IsVolumeReadyResponse) Reset() { *m = IsVolumeReadyResponse{} }
|
||||
func (m *IsVolumeReadyResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*IsVolumeReadyResponse) ProtoMessage() {}
|
||||
func (*IsVolumeReadyResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
||||
|
||||
func (m *IsVolumeReadyResponse) GetReady() bool {
|
||||
if m != nil {
|
||||
return m.Ready
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ListSnapshotsRequest struct {
|
||||
TagFilters map[string]string `protobuf:"bytes,1,rep,name=tagFilters" json:"tagFilters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
}
|
||||
|
||||
func (m *ListSnapshotsRequest) Reset() { *m = ListSnapshotsRequest{} }
|
||||
func (m *ListSnapshotsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListSnapshotsRequest) ProtoMessage() {}
|
||||
func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
||||
|
||||
func (m *ListSnapshotsRequest) GetTagFilters() map[string]string {
|
||||
if m != nil {
|
||||
return m.TagFilters
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListSnapshotsResponse struct {
|
||||
SnapshotIDs []string `protobuf:"bytes,2,rep,name=snapshotIDs" json:"snapshotIDs,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListSnapshotsResponse) Reset() { *m = ListSnapshotsResponse{} }
|
||||
func (m *ListSnapshotsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListSnapshotsResponse) ProtoMessage() {}
|
||||
func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
||||
|
||||
func (m *ListSnapshotsResponse) GetSnapshotIDs() []string {
|
||||
if m != nil {
|
||||
return m.SnapshotIDs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateSnapshotRequest struct {
|
||||
VolumeID string `protobuf:"bytes,1,opt,name=volumeID" json:"volumeID,omitempty"`
|
||||
VolumeAZ string `protobuf:"bytes,2,opt,name=volumeAZ" json:"volumeAZ,omitempty"`
|
||||
Tags map[string]string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
}
|
||||
|
||||
func (m *CreateSnapshotRequest) Reset() { *m = CreateSnapshotRequest{} }
|
||||
func (m *CreateSnapshotRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateSnapshotRequest) ProtoMessage() {}
|
||||
func (*CreateSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
||||
|
||||
func (m *CreateSnapshotRequest) GetVolumeID() string {
|
||||
if m != nil {
|
||||
return m.VolumeID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateSnapshotRequest) GetVolumeAZ() string {
|
||||
if m != nil {
|
||||
return m.VolumeAZ
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateSnapshotRequest) GetTags() map[string]string {
|
||||
if m != nil {
|
||||
return m.Tags
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateSnapshotResponse struct {
|
||||
SnapshotID string `protobuf:"bytes,1,opt,name=snapshotID" json:"snapshotID,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateSnapshotResponse) Reset() { *m = CreateSnapshotResponse{} }
|
||||
func (m *CreateSnapshotResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateSnapshotResponse) ProtoMessage() {}
|
||||
func (*CreateSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
||||
|
||||
func (m *CreateSnapshotResponse) GetSnapshotID() string {
|
||||
if m != nil {
|
||||
return m.SnapshotID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteSnapshotRequest struct {
|
||||
SnapshotID string `protobuf:"bytes,1,opt,name=snapshotID" json:"snapshotID,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DeleteSnapshotRequest) Reset() { *m = DeleteSnapshotRequest{} }
|
||||
func (m *DeleteSnapshotRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteSnapshotRequest) ProtoMessage() {}
|
||||
func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
|
||||
|
||||
func (m *DeleteSnapshotRequest) GetSnapshotID() string {
|
||||
if m != nil {
|
||||
return m.SnapshotID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CreateVolumeRequest)(nil), "generated.CreateVolumeRequest")
|
||||
proto.RegisterType((*CreateVolumeResponse)(nil), "generated.CreateVolumeResponse")
|
||||
proto.RegisterType((*GetVolumeInfoRequest)(nil), "generated.GetVolumeInfoRequest")
|
||||
proto.RegisterType((*GetVolumeInfoResponse)(nil), "generated.GetVolumeInfoResponse")
|
||||
proto.RegisterType((*IsVolumeReadyRequest)(nil), "generated.IsVolumeReadyRequest")
|
||||
proto.RegisterType((*IsVolumeReadyResponse)(nil), "generated.IsVolumeReadyResponse")
|
||||
proto.RegisterType((*ListSnapshotsRequest)(nil), "generated.ListSnapshotsRequest")
|
||||
proto.RegisterType((*ListSnapshotsResponse)(nil), "generated.ListSnapshotsResponse")
|
||||
proto.RegisterType((*CreateSnapshotRequest)(nil), "generated.CreateSnapshotRequest")
|
||||
proto.RegisterType((*CreateSnapshotResponse)(nil), "generated.CreateSnapshotResponse")
|
||||
proto.RegisterType((*DeleteSnapshotRequest)(nil), "generated.DeleteSnapshotRequest")
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// Client API for BlockStore service
|
||||
|
||||
type BlockStoreClient interface {
|
||||
Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
CreateVolumeFromSnapshot(ctx context.Context, in *CreateVolumeRequest, opts ...grpc.CallOption) (*CreateVolumeResponse, error)
|
||||
GetVolumeInfo(ctx context.Context, in *GetVolumeInfoRequest, opts ...grpc.CallOption) (*GetVolumeInfoResponse, error)
|
||||
IsVolumeReady(ctx context.Context, in *IsVolumeReadyRequest, opts ...grpc.CallOption) (*IsVolumeReadyResponse, error)
|
||||
ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error)
|
||||
CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*CreateSnapshotResponse, error)
|
||||
DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
}
|
||||
|
||||
type blockStoreClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewBlockStoreClient(cc *grpc.ClientConn) BlockStoreClient {
|
||||
return &blockStoreClient{cc}
|
||||
}
|
||||
|
||||
func (c *blockStoreClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := grpc.Invoke(ctx, "/generated.BlockStore/Init", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *blockStoreClient) CreateVolumeFromSnapshot(ctx context.Context, in *CreateVolumeRequest, opts ...grpc.CallOption) (*CreateVolumeResponse, error) {
|
||||
out := new(CreateVolumeResponse)
|
||||
err := grpc.Invoke(ctx, "/generated.BlockStore/CreateVolumeFromSnapshot", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *blockStoreClient) GetVolumeInfo(ctx context.Context, in *GetVolumeInfoRequest, opts ...grpc.CallOption) (*GetVolumeInfoResponse, error) {
|
||||
out := new(GetVolumeInfoResponse)
|
||||
err := grpc.Invoke(ctx, "/generated.BlockStore/GetVolumeInfo", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *blockStoreClient) IsVolumeReady(ctx context.Context, in *IsVolumeReadyRequest, opts ...grpc.CallOption) (*IsVolumeReadyResponse, error) {
|
||||
out := new(IsVolumeReadyResponse)
|
||||
err := grpc.Invoke(ctx, "/generated.BlockStore/IsVolumeReady", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *blockStoreClient) ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error) {
|
||||
out := new(ListSnapshotsResponse)
|
||||
err := grpc.Invoke(ctx, "/generated.BlockStore/ListSnapshots", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *blockStoreClient) CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*CreateSnapshotResponse, error) {
|
||||
out := new(CreateSnapshotResponse)
|
||||
err := grpc.Invoke(ctx, "/generated.BlockStore/CreateSnapshot", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *blockStoreClient) DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := grpc.Invoke(ctx, "/generated.BlockStore/DeleteSnapshot", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for BlockStore service
|
||||
|
||||
type BlockStoreServer interface {
|
||||
Init(context.Context, *InitRequest) (*Empty, error)
|
||||
CreateVolumeFromSnapshot(context.Context, *CreateVolumeRequest) (*CreateVolumeResponse, error)
|
||||
GetVolumeInfo(context.Context, *GetVolumeInfoRequest) (*GetVolumeInfoResponse, error)
|
||||
IsVolumeReady(context.Context, *IsVolumeReadyRequest) (*IsVolumeReadyResponse, error)
|
||||
ListSnapshots(context.Context, *ListSnapshotsRequest) (*ListSnapshotsResponse, error)
|
||||
CreateSnapshot(context.Context, *CreateSnapshotRequest) (*CreateSnapshotResponse, error)
|
||||
DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*Empty, error)
|
||||
}
|
||||
|
||||
func RegisterBlockStoreServer(s *grpc.Server, srv BlockStoreServer) {
|
||||
s.RegisterService(&_BlockStore_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _BlockStore_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InitRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BlockStoreServer).Init(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BlockStore/Init",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BlockStoreServer).Init(ctx, req.(*InitRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BlockStore_CreateVolumeFromSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateVolumeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BlockStoreServer).CreateVolumeFromSnapshot(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BlockStore/CreateVolumeFromSnapshot",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BlockStoreServer).CreateVolumeFromSnapshot(ctx, req.(*CreateVolumeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BlockStore_GetVolumeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetVolumeInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BlockStoreServer).GetVolumeInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BlockStore/GetVolumeInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BlockStoreServer).GetVolumeInfo(ctx, req.(*GetVolumeInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BlockStore_IsVolumeReady_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IsVolumeReadyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BlockStoreServer).IsVolumeReady(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BlockStore/IsVolumeReady",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BlockStoreServer).IsVolumeReady(ctx, req.(*IsVolumeReadyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BlockStore_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListSnapshotsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BlockStoreServer).ListSnapshots(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BlockStore/ListSnapshots",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BlockStoreServer).ListSnapshots(ctx, req.(*ListSnapshotsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BlockStore_CreateSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateSnapshotRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BlockStoreServer).CreateSnapshot(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BlockStore/CreateSnapshot",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BlockStoreServer).CreateSnapshot(ctx, req.(*CreateSnapshotRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BlockStore_DeleteSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteSnapshotRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BlockStoreServer).DeleteSnapshot(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BlockStore/DeleteSnapshot",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BlockStoreServer).DeleteSnapshot(ctx, req.(*DeleteSnapshotRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _BlockStore_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.BlockStore",
|
||||
HandlerType: (*BlockStoreServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Init",
|
||||
Handler: _BlockStore_Init_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateVolumeFromSnapshot",
|
||||
Handler: _BlockStore_CreateVolumeFromSnapshot_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetVolumeInfo",
|
||||
Handler: _BlockStore_GetVolumeInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "IsVolumeReady",
|
||||
Handler: _BlockStore_IsVolumeReady_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListSnapshots",
|
||||
Handler: _BlockStore_ListSnapshots_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateSnapshot",
|
||||
Handler: _BlockStore_CreateSnapshot_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteSnapshot",
|
||||
Handler: _BlockStore_DeleteSnapshot_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "BlockStore.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("BlockStore.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 539 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xc1, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xd5, 0xc6, 0x06, 0x35, 0x53, 0x5a, 0xa2, 0xc5, 0xae, 0x2c, 0x1f, 0x8a, 0xf1, 0x29, 0x42,
|
||||
0x22, 0xa0, 0x70, 0x68, 0x41, 0x02, 0x09, 0x48, 0x8b, 0x22, 0x50, 0x91, 0x9c, 0xc2, 0x01, 0x4e,
|
||||
0x86, 0x2c, 0x69, 0x54, 0xc7, 0x6b, 0x76, 0x37, 0x95, 0xfc, 0x01, 0xfc, 0x0a, 0x5f, 0xc0, 0x47,
|
||||
0xf0, 0x59, 0xc8, 0xf6, 0xda, 0xde, 0xb5, 0xdd, 0x54, 0x55, 0x6e, 0x9e, 0x19, 0xcf, 0xdb, 0x37,
|
||||
0xcf, 0x6f, 0xd6, 0x30, 0x78, 0x1b, 0xd1, 0x1f, 0x97, 0x33, 0x41, 0x19, 0x19, 0x25, 0x8c, 0x0a,
|
||||
0x8a, 0xfb, 0x0b, 0x12, 0x13, 0x16, 0x0a, 0x32, 0x77, 0xef, 0xcd, 0x2e, 0x42, 0x46, 0xe6, 0x45,
|
||||
0xc1, 0xff, 0x8d, 0xe0, 0xc1, 0x3b, 0x46, 0x42, 0x41, 0xbe, 0xd0, 0x68, 0xbd, 0x22, 0x01, 0xf9,
|
||||
0xb5, 0x26, 0x5c, 0xe0, 0x43, 0x00, 0x1e, 0x87, 0x09, 0xbf, 0xa0, 0x62, 0x3a, 0x71, 0x90, 0x87,
|
||||
0x86, 0xfd, 0x40, 0xc9, 0x64, 0xf5, 0xab, 0xbc, 0xe1, 0x3c, 0x4d, 0x88, 0xd3, 0x2b, 0xea, 0x75,
|
||||
0x06, 0xbb, 0xb0, 0x53, 0x44, 0x6f, 0xbe, 0x3a, 0x46, 0x5e, 0xad, 0x62, 0x8c, 0xc1, 0x5c, 0xd2,
|
||||
0x84, 0x3b, 0xa6, 0x87, 0x86, 0x46, 0x90, 0x3f, 0xfb, 0x63, 0xb0, 0x74, 0x1a, 0x3c, 0xa1, 0x31,
|
||||
0x57, 0x70, 0x2a, 0x16, 0x55, 0xec, 0x9f, 0x81, 0xf5, 0x9e, 0x88, 0xa2, 0x61, 0x1a, 0xff, 0xa4,
|
||||
0x25, 0xf7, 0x0d, 0x3d, 0x1a, 0xaf, 0x9e, 0xce, 0xcb, 0xff, 0x00, 0x76, 0x03, 0x4f, 0x92, 0xd0,
|
||||
0x87, 0x45, 0xad, 0x61, 0xcb, 0x81, 0x7a, 0xca, 0x40, 0x67, 0x60, 0x4d, 0x79, 0x39, 0x4c, 0x38,
|
||||
0x4f, 0xb7, 0x25, 0xf7, 0x04, 0xec, 0x06, 0x9e, 0x24, 0x67, 0xc1, 0x1d, 0x96, 0x25, 0x72, 0xb4,
|
||||
0x9d, 0xa0, 0x08, 0xfc, 0x3f, 0x08, 0xac, 0x8f, 0x4b, 0x2e, 0x66, 0xf2, 0x93, 0xf1, 0xf2, 0xfc,
|
||||
0x4f, 0x00, 0x22, 0x5c, 0x9c, 0x2e, 0x23, 0x41, 0x18, 0x77, 0x90, 0x67, 0x0c, 0x77, 0xc7, 0x4f,
|
||||
0x47, 0x95, 0x3d, 0x46, 0x5d, 0x4d, 0xa3, 0xf3, 0xaa, 0xe3, 0x24, 0x16, 0x2c, 0x0d, 0x14, 0x08,
|
||||
0xf7, 0x15, 0xdc, 0x6f, 0x94, 0xf1, 0x00, 0x8c, 0x4b, 0x92, 0xca, 0xf1, 0xb2, 0xc7, 0x8c, 0xe4,
|
||||
0x55, 0x18, 0xad, 0x4b, 0xa7, 0x14, 0xc1, 0xcb, 0xde, 0x31, 0xf2, 0x5f, 0x80, 0xdd, 0x38, 0x52,
|
||||
0xce, 0xe5, 0xc1, 0x6e, 0xed, 0xb7, 0x4c, 0x5b, 0x63, 0xd8, 0x0f, 0xd4, 0x94, 0xff, 0x0f, 0x81,
|
||||
0x5d, 0x98, 0xa6, 0xec, 0xde, 0x52, 0x64, 0xfc, 0x1a, 0x4c, 0x11, 0x2e, 0xb8, 0x63, 0xe4, 0xb2,
|
||||
0x3c, 0x56, 0x64, 0xe9, 0x3c, 0x27, 0xd3, 0x45, 0x2a, 0x92, 0xf7, 0xb9, 0x47, 0xd0, 0xaf, 0x52,
|
||||
0xb7, 0x52, 0xe1, 0x18, 0x0e, 0x9a, 0x27, 0xd4, 0xde, 0xdb, 0xb4, 0x88, 0xfe, 0x11, 0xd8, 0x13,
|
||||
0x12, 0x91, 0xb6, 0x06, 0x37, 0x34, 0x8e, 0xff, 0x9a, 0x00, 0xf5, 0x3d, 0x81, 0x9f, 0x81, 0x39,
|
||||
0x8d, 0x97, 0x02, 0x1f, 0x28, 0x43, 0x67, 0x09, 0x09, 0xe7, 0x0e, 0x94, 0xfc, 0xc9, 0x2a, 0x11,
|
||||
0x29, 0xfe, 0x06, 0x8e, 0xba, 0xb2, 0xa7, 0x8c, 0xae, 0x4a, 0x0e, 0xf8, 0xb0, 0x25, 0x9d, 0x76,
|
||||
0xbd, 0xb8, 0x0f, 0xaf, 0xad, 0xcb, 0xb1, 0x03, 0xd8, 0xd3, 0x76, 0x11, 0xab, 0x1d, 0x5d, 0x5b,
|
||||
0xef, 0x7a, 0xd7, 0xbf, 0x50, 0x63, 0x6a, 0x2b, 0xa4, 0x61, 0x76, 0x2d, 0xab, 0x86, 0xd9, 0xbd,
|
||||
0x7d, 0x01, 0xec, 0x69, 0xf6, 0xd5, 0x30, 0xbb, 0x76, 0x49, 0xc3, 0xec, 0x76, 0xfe, 0x67, 0xd8,
|
||||
0xd7, 0xcd, 0x80, 0xbd, 0x9b, 0x9c, 0xe8, 0x3e, 0xda, 0xf0, 0x86, 0x84, 0x9d, 0xc0, 0xbe, 0xee,
|
||||
0x14, 0x0d, 0xb6, 0xd3, 0x44, 0xed, 0xaf, 0xfe, 0xfd, 0x6e, 0xfe, 0xdf, 0x78, 0xfe, 0x3f, 0x00,
|
||||
0x00, 0xff, 0xff, 0xd7, 0x15, 0x7f, 0x32, 0x64, 0x06, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,621 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: ObjectStore.proto
|
||||
|
||||
package generated
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
type PutObjectRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
|
||||
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PutObjectRequest) Reset() { *m = PutObjectRequest{} }
|
||||
func (m *PutObjectRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*PutObjectRequest) ProtoMessage() {}
|
||||
func (*PutObjectRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
|
||||
|
||||
func (m *PutObjectRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PutObjectRequest) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PutObjectRequest) GetBody() []byte {
|
||||
if m != nil {
|
||||
return m.Body
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetObjectRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetObjectRequest) Reset() { *m = GetObjectRequest{} }
|
||||
func (m *GetObjectRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetObjectRequest) ProtoMessage() {}
|
||||
func (*GetObjectRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
|
||||
|
||||
func (m *GetObjectRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GetObjectRequest) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Bytes struct {
|
||||
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Bytes) Reset() { *m = Bytes{} }
|
||||
func (m *Bytes) String() string { return proto.CompactTextString(m) }
|
||||
func (*Bytes) ProtoMessage() {}
|
||||
func (*Bytes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
|
||||
|
||||
func (m *Bytes) GetData() []byte {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListCommonPrefixesRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Delimiter string `protobuf:"bytes,2,opt,name=delimiter" json:"delimiter,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListCommonPrefixesRequest) Reset() { *m = ListCommonPrefixesRequest{} }
|
||||
func (m *ListCommonPrefixesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListCommonPrefixesRequest) ProtoMessage() {}
|
||||
func (*ListCommonPrefixesRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
|
||||
|
||||
func (m *ListCommonPrefixesRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ListCommonPrefixesRequest) GetDelimiter() string {
|
||||
if m != nil {
|
||||
return m.Delimiter
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListCommonPrefixesResponse struct {
|
||||
Prefixes []string `protobuf:"bytes,1,rep,name=prefixes" json:"prefixes,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListCommonPrefixesResponse) Reset() { *m = ListCommonPrefixesResponse{} }
|
||||
func (m *ListCommonPrefixesResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListCommonPrefixesResponse) ProtoMessage() {}
|
||||
func (*ListCommonPrefixesResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
|
||||
|
||||
func (m *ListCommonPrefixesResponse) GetPrefixes() []string {
|
||||
if m != nil {
|
||||
return m.Prefixes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListObjectsRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Prefix string `protobuf:"bytes,2,opt,name=prefix" json:"prefix,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListObjectsRequest) Reset() { *m = ListObjectsRequest{} }
|
||||
func (m *ListObjectsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListObjectsRequest) ProtoMessage() {}
|
||||
func (*ListObjectsRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
|
||||
|
||||
func (m *ListObjectsRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ListObjectsRequest) GetPrefix() string {
|
||||
if m != nil {
|
||||
return m.Prefix
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListObjectsResponse struct {
|
||||
Keys []string `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListObjectsResponse) Reset() { *m = ListObjectsResponse{} }
|
||||
func (m *ListObjectsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListObjectsResponse) ProtoMessage() {}
|
||||
func (*ListObjectsResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
|
||||
|
||||
func (m *ListObjectsResponse) GetKeys() []string {
|
||||
if m != nil {
|
||||
return m.Keys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteObjectRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DeleteObjectRequest) Reset() { *m = DeleteObjectRequest{} }
|
||||
func (m *DeleteObjectRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteObjectRequest) ProtoMessage() {}
|
||||
func (*DeleteObjectRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
|
||||
|
||||
func (m *DeleteObjectRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DeleteObjectRequest) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateSignedURLRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
|
||||
Ttl int64 `protobuf:"varint,3,opt,name=ttl" json:"ttl,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateSignedURLRequest) Reset() { *m = CreateSignedURLRequest{} }
|
||||
func (m *CreateSignedURLRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateSignedURLRequest) ProtoMessage() {}
|
||||
func (*CreateSignedURLRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
|
||||
|
||||
func (m *CreateSignedURLRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateSignedURLRequest) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateSignedURLRequest) GetTtl() int64 {
|
||||
if m != nil {
|
||||
return m.Ttl
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CreateSignedURLResponse struct {
|
||||
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateSignedURLResponse) Reset() { *m = CreateSignedURLResponse{} }
|
||||
func (m *CreateSignedURLResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateSignedURLResponse) ProtoMessage() {}
|
||||
func (*CreateSignedURLResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} }
|
||||
|
||||
func (m *CreateSignedURLResponse) GetUrl() string {
|
||||
if m != nil {
|
||||
return m.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*PutObjectRequest)(nil), "generated.PutObjectRequest")
|
||||
proto.RegisterType((*GetObjectRequest)(nil), "generated.GetObjectRequest")
|
||||
proto.RegisterType((*Bytes)(nil), "generated.Bytes")
|
||||
proto.RegisterType((*ListCommonPrefixesRequest)(nil), "generated.ListCommonPrefixesRequest")
|
||||
proto.RegisterType((*ListCommonPrefixesResponse)(nil), "generated.ListCommonPrefixesResponse")
|
||||
proto.RegisterType((*ListObjectsRequest)(nil), "generated.ListObjectsRequest")
|
||||
proto.RegisterType((*ListObjectsResponse)(nil), "generated.ListObjectsResponse")
|
||||
proto.RegisterType((*DeleteObjectRequest)(nil), "generated.DeleteObjectRequest")
|
||||
proto.RegisterType((*CreateSignedURLRequest)(nil), "generated.CreateSignedURLRequest")
|
||||
proto.RegisterType((*CreateSignedURLResponse)(nil), "generated.CreateSignedURLResponse")
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// Client API for ObjectStore service
|
||||
|
||||
type ObjectStoreClient interface {
|
||||
Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
PutObject(ctx context.Context, opts ...grpc.CallOption) (ObjectStore_PutObjectClient, error)
|
||||
GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (ObjectStore_GetObjectClient, error)
|
||||
ListCommonPrefixes(ctx context.Context, in *ListCommonPrefixesRequest, opts ...grpc.CallOption) (*ListCommonPrefixesResponse, error)
|
||||
ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error)
|
||||
DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
CreateSignedURL(ctx context.Context, in *CreateSignedURLRequest, opts ...grpc.CallOption) (*CreateSignedURLResponse, error)
|
||||
}
|
||||
|
||||
type objectStoreClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewObjectStoreClient(cc *grpc.ClientConn) ObjectStoreClient {
|
||||
return &objectStoreClient{cc}
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := grpc.Invoke(ctx, "/generated.ObjectStore/Init", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) PutObject(ctx context.Context, opts ...grpc.CallOption) (ObjectStore_PutObjectClient, error) {
|
||||
stream, err := grpc.NewClientStream(ctx, &_ObjectStore_serviceDesc.Streams[0], c.cc, "/generated.ObjectStore/PutObject", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &objectStorePutObjectClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type ObjectStore_PutObjectClient interface {
|
||||
Send(*PutObjectRequest) error
|
||||
CloseAndRecv() (*Empty, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type objectStorePutObjectClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectClient) Send(m *PutObjectRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectClient) CloseAndRecv() (*Empty, error) {
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m := new(Empty)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (ObjectStore_GetObjectClient, error) {
|
||||
stream, err := grpc.NewClientStream(ctx, &_ObjectStore_serviceDesc.Streams[1], c.cc, "/generated.ObjectStore/GetObject", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &objectStoreGetObjectClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type ObjectStore_GetObjectClient interface {
|
||||
Recv() (*Bytes, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type objectStoreGetObjectClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *objectStoreGetObjectClient) Recv() (*Bytes, error) {
|
||||
m := new(Bytes)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) ListCommonPrefixes(ctx context.Context, in *ListCommonPrefixesRequest, opts ...grpc.CallOption) (*ListCommonPrefixesResponse, error) {
|
||||
out := new(ListCommonPrefixesResponse)
|
||||
err := grpc.Invoke(ctx, "/generated.ObjectStore/ListCommonPrefixes", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) {
|
||||
out := new(ListObjectsResponse)
|
||||
err := grpc.Invoke(ctx, "/generated.ObjectStore/ListObjects", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := grpc.Invoke(ctx, "/generated.ObjectStore/DeleteObject", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) CreateSignedURL(ctx context.Context, in *CreateSignedURLRequest, opts ...grpc.CallOption) (*CreateSignedURLResponse, error) {
|
||||
out := new(CreateSignedURLResponse)
|
||||
err := grpc.Invoke(ctx, "/generated.ObjectStore/CreateSignedURL", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for ObjectStore service
|
||||
|
||||
type ObjectStoreServer interface {
|
||||
Init(context.Context, *InitRequest) (*Empty, error)
|
||||
PutObject(ObjectStore_PutObjectServer) error
|
||||
GetObject(*GetObjectRequest, ObjectStore_GetObjectServer) error
|
||||
ListCommonPrefixes(context.Context, *ListCommonPrefixesRequest) (*ListCommonPrefixesResponse, error)
|
||||
ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error)
|
||||
DeleteObject(context.Context, *DeleteObjectRequest) (*Empty, error)
|
||||
CreateSignedURL(context.Context, *CreateSignedURLRequest) (*CreateSignedURLResponse, error)
|
||||
}
|
||||
|
||||
func RegisterObjectStoreServer(s *grpc.Server, srv ObjectStoreServer) {
|
||||
s.RegisterService(&_ObjectStore_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _ObjectStore_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InitRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).Init(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/Init",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).Init(ctx, req.(*InitRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_PutObject_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(ObjectStoreServer).PutObject(&objectStorePutObjectServer{stream})
|
||||
}
|
||||
|
||||
type ObjectStore_PutObjectServer interface {
|
||||
SendAndClose(*Empty) error
|
||||
Recv() (*PutObjectRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type objectStorePutObjectServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectServer) SendAndClose(m *Empty) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectServer) Recv() (*PutObjectRequest, error) {
|
||||
m := new(PutObjectRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _ObjectStore_GetObject_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(GetObjectRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ObjectStoreServer).GetObject(m, &objectStoreGetObjectServer{stream})
|
||||
}
|
||||
|
||||
type ObjectStore_GetObjectServer interface {
|
||||
Send(*Bytes) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type objectStoreGetObjectServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *objectStoreGetObjectServer) Send(m *Bytes) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _ObjectStore_ListCommonPrefixes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListCommonPrefixesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).ListCommonPrefixes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/ListCommonPrefixes",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).ListCommonPrefixes(ctx, req.(*ListCommonPrefixesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListObjectsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).ListObjects(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/ListObjects",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).ListObjects(ctx, req.(*ListObjectsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_DeleteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteObjectRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).DeleteObject(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/DeleteObject",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).DeleteObject(ctx, req.(*DeleteObjectRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_CreateSignedURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateSignedURLRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).CreateSignedURL(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/CreateSignedURL",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).CreateSignedURL(ctx, req.(*CreateSignedURLRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _ObjectStore_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.ObjectStore",
|
||||
HandlerType: (*ObjectStoreServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Init",
|
||||
Handler: _ObjectStore_Init_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListCommonPrefixes",
|
||||
Handler: _ObjectStore_ListCommonPrefixes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListObjects",
|
||||
Handler: _ObjectStore_ListObjects_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteObject",
|
||||
Handler: _ObjectStore_DeleteObject_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateSignedURL",
|
||||
Handler: _ObjectStore_CreateSignedURL_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "PutObject",
|
||||
Handler: _ObjectStore_PutObject_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "GetObject",
|
||||
Handler: _ObjectStore_GetObject_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "ObjectStore.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("ObjectStore.proto", fileDescriptor1) }
|
||||
|
||||
var fileDescriptor1 = []byte{
|
||||
// 444 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xdf, 0x8b, 0xd3, 0x40,
|
||||
0x10, 0xc7, 0x89, 0xa9, 0xc5, 0xcc, 0x15, 0x8c, 0x73, 0x50, 0x6b, 0x4e, 0xa5, 0x2e, 0x0a, 0x15,
|
||||
0xa1, 0x1c, 0xfa, 0xe2, 0xc3, 0x81, 0xe2, 0x9d, 0x88, 0x50, 0xb0, 0xa6, 0x0a, 0xbe, 0xa6, 0x97,
|
||||
0xf1, 0x8c, 0xcd, 0x2f, 0x37, 0x13, 0x30, 0xff, 0x81, 0x7f, 0xb6, 0x64, 0xb3, 0xc6, 0x4d, 0x2e,
|
||||
0x67, 0xf1, 0xde, 0x66, 0x67, 0xe7, 0xfb, 0x9d, 0xc9, 0xce, 0x87, 0xc0, 0x9d, 0x0f, 0xdb, 0xef,
|
||||
0x74, 0xce, 0x1b, 0xce, 0x24, 0x2d, 0x73, 0x99, 0x71, 0x86, 0xce, 0x05, 0xa5, 0x24, 0x03, 0xa6,
|
||||
0xd0, 0x9b, 0x6c, 0xbe, 0x05, 0x92, 0xc2, 0xe6, 0x42, 0xac, 0xc1, 0x5d, 0x97, 0xdc, 0x08, 0x7c,
|
||||
0xfa, 0x51, 0x52, 0xc1, 0x38, 0x85, 0xf1, 0xb6, 0x3c, 0xdf, 0x11, 0xcf, 0xac, 0xb9, 0xb5, 0x70,
|
||||
0x7c, 0x7d, 0x42, 0x17, 0xec, 0x1d, 0x55, 0xb3, 0x1b, 0x2a, 0x59, 0x87, 0x88, 0x30, 0xda, 0x66,
|
||||
0x61, 0x35, 0xb3, 0xe7, 0xd6, 0x62, 0xe2, 0xab, 0x58, 0x9c, 0x80, 0xfb, 0x8e, 0xae, 0xeb, 0x28,
|
||||
0x8e, 0xe0, 0xe6, 0x9b, 0x8a, 0xa9, 0xa8, 0xad, 0xc3, 0x80, 0x03, 0x25, 0x98, 0xf8, 0x2a, 0x16,
|
||||
0x1f, 0xe1, 0xde, 0x2a, 0x2a, 0xf8, 0x34, 0x4b, 0x92, 0x2c, 0x5d, 0x4b, 0xfa, 0x1a, 0xfd, 0xa4,
|
||||
0x62, 0x5f, 0x8f, 0xfb, 0xe0, 0x84, 0x14, 0x47, 0x49, 0xc4, 0x24, 0x75, 0xa7, 0xbf, 0x09, 0xf1,
|
||||
0x12, 0xbc, 0x21, 0xcb, 0x22, 0xcf, 0xd2, 0x82, 0xd0, 0x83, 0x5b, 0xb9, 0xce, 0xcd, 0xac, 0xb9,
|
||||
0xbd, 0x70, 0xfc, 0xf6, 0x2c, 0xce, 0x00, 0x6b, 0x65, 0xf3, 0xa1, 0x7b, 0xa7, 0x98, 0xc2, 0xb8,
|
||||
0x51, 0xea, 0x11, 0xf4, 0x49, 0x3c, 0x85, 0xc3, 0x8e, 0x8b, 0x6e, 0x8c, 0x30, 0xda, 0x51, 0xf5,
|
||||
0xa7, 0xa9, 0x8a, 0xc5, 0x2b, 0x38, 0x3c, 0xa3, 0x98, 0x98, 0xae, 0xfb, 0xb6, 0x9f, 0x60, 0x7a,
|
||||
0x2a, 0x29, 0x60, 0xda, 0x44, 0x17, 0x29, 0x85, 0x9f, 0xfd, 0xd5, 0xff, 0x6f, 0xdc, 0x05, 0x9b,
|
||||
0x39, 0x56, 0x0b, 0xb7, 0xfd, 0x3a, 0x14, 0xcf, 0xe0, 0xee, 0x25, 0x57, 0xfd, 0x15, 0x2e, 0xd8,
|
||||
0xa5, 0x8c, 0xb5, 0x67, 0x1d, 0x3e, 0xff, 0x35, 0x82, 0x03, 0x83, 0x4e, 0x3c, 0x86, 0xd1, 0xfb,
|
||||
0x34, 0x62, 0x9c, 0x2e, 0x5b, 0x40, 0x97, 0x75, 0x42, 0x0f, 0xe6, 0xb9, 0x46, 0xfe, 0x6d, 0x92,
|
||||
0x73, 0x85, 0x27, 0xe0, 0xb4, 0xc0, 0xe2, 0x91, 0x71, 0xdd, 0xc7, 0xf8, 0xb2, 0x76, 0x61, 0xd5,
|
||||
0xea, 0x16, 0xce, 0x8e, 0xba, 0x8f, 0x6c, 0x47, 0xad, 0x88, 0x3c, 0xb6, 0x30, 0x68, 0x56, 0xde,
|
||||
0x85, 0x05, 0x1f, 0x1b, 0x95, 0x57, 0xe2, 0xe9, 0x3d, 0xd9, 0x53, 0xa5, 0x9f, 0x6c, 0x05, 0x07,
|
||||
0x06, 0x0f, 0xf8, 0xa0, 0xa7, 0xea, 0xd2, 0xe6, 0x3d, 0xbc, 0xea, 0x5a, 0xbb, 0xbd, 0x86, 0x89,
|
||||
0x89, 0x0c, 0x9a, 0xf5, 0x03, 0x2c, 0x0d, 0x3c, 0xf7, 0x17, 0xb8, 0xdd, 0xdb, 0x2e, 0x3e, 0x32,
|
||||
0x8a, 0x86, 0x79, 0xf2, 0xc4, 0xbf, 0x4a, 0x9a, 0xd9, 0xb6, 0x63, 0xf5, 0x03, 0x7a, 0xf1, 0x3b,
|
||||
0x00, 0x00, 0xff, 0xff, 0xf3, 0xb2, 0x85, 0x9a, 0xae, 0x04, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: Shared.proto
|
||||
|
||||
package generated
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
type Empty struct {
|
||||
}
|
||||
|
||||
func (m *Empty) Reset() { *m = Empty{} }
|
||||
func (m *Empty) String() string { return proto.CompactTextString(m) }
|
||||
func (*Empty) ProtoMessage() {}
|
||||
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
|
||||
|
||||
type InitRequest struct {
|
||||
Config map[string]string `protobuf:"bytes,1,rep,name=config" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
}
|
||||
|
||||
func (m *InitRequest) Reset() { *m = InitRequest{} }
|
||||
func (m *InitRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*InitRequest) ProtoMessage() {}
|
||||
func (*InitRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
|
||||
|
||||
func (m *InitRequest) GetConfig() map[string]string {
|
||||
if m != nil {
|
||||
return m.Config
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Empty)(nil), "generated.Empty")
|
||||
proto.RegisterType((*InitRequest)(nil), "generated.InitRequest")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("Shared.proto", fileDescriptor2) }
|
||||
|
||||
var fileDescriptor2 = []byte{
|
||||
// 156 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x09, 0xce, 0x48, 0x2c,
|
||||
0x4a, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4c, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a,
|
||||
0x2c, 0x49, 0x4d, 0x51, 0x62, 0xe7, 0x62, 0x75, 0xcd, 0x2d, 0x28, 0xa9, 0x54, 0x6a, 0x61, 0xe4,
|
||||
0xe2, 0xf6, 0xcc, 0xcb, 0x2c, 0x09, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0xb2, 0xe2, 0x62,
|
||||
0x4b, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0x97, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x52, 0xd2, 0x83,
|
||||
0x6b, 0xd2, 0x43, 0x52, 0xa7, 0xe7, 0x0c, 0x56, 0xe4, 0x9a, 0x57, 0x52, 0x54, 0x19, 0x04, 0xd5,
|
||||
0x21, 0x65, 0xc9, 0xc5, 0x8d, 0x24, 0x2c, 0x24, 0xc0, 0xc5, 0x9c, 0x9d, 0x5a, 0x29, 0xc1, 0xa8,
|
||||
0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x62, 0x0a, 0x89, 0x70, 0xb1, 0x96, 0x25, 0xe6, 0x94, 0xa6, 0x4a,
|
||||
0x30, 0x81, 0xc5, 0x20, 0x1c, 0x2b, 0x26, 0x0b, 0xc6, 0x24, 0x36, 0xb0, 0x0b, 0x8d, 0x01, 0x01,
|
||||
0x00, 0x00, 0xff, 0xff, 0x85, 0xab, 0x54, 0x37, 0xb1, 0x00, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
syntax = "proto3";
|
||||
package generated;
|
||||
|
||||
import "Shared.proto";
|
||||
|
||||
message CreateVolumeRequest {
|
||||
string snapshotID = 1;
|
||||
string volumeType = 2;
|
||||
string volumeAZ = 3;
|
||||
int64 iops = 4;
|
||||
}
|
||||
|
||||
message CreateVolumeResponse {
|
||||
string volumeID = 1;
|
||||
}
|
||||
|
||||
message GetVolumeInfoRequest {
|
||||
string volumeID = 1;
|
||||
string volumeAZ = 2;
|
||||
}
|
||||
|
||||
message GetVolumeInfoResponse {
|
||||
string volumeType = 1;
|
||||
int64 iops = 2;
|
||||
}
|
||||
|
||||
message IsVolumeReadyRequest {
|
||||
string volumeID = 1;
|
||||
string volumeAZ = 2;
|
||||
}
|
||||
|
||||
message IsVolumeReadyResponse {
|
||||
bool ready = 1;
|
||||
}
|
||||
|
||||
message ListSnapshotsRequest {
|
||||
map<string, string> tagFilters = 1;
|
||||
}
|
||||
|
||||
message ListSnapshotsResponse {
|
||||
repeated string snapshotIDs = 2;
|
||||
}
|
||||
|
||||
message CreateSnapshotRequest {
|
||||
string volumeID = 1;
|
||||
string volumeAZ = 2;
|
||||
map<string, string> tags = 3;
|
||||
}
|
||||
|
||||
message CreateSnapshotResponse {
|
||||
string snapshotID = 1;
|
||||
}
|
||||
|
||||
message DeleteSnapshotRequest {
|
||||
string snapshotID = 1;
|
||||
}
|
||||
|
||||
service BlockStore {
|
||||
rpc Init(InitRequest) returns (Empty);
|
||||
rpc CreateVolumeFromSnapshot(CreateVolumeRequest) returns (CreateVolumeResponse);
|
||||
rpc GetVolumeInfo(GetVolumeInfoRequest) returns (GetVolumeInfoResponse);
|
||||
rpc IsVolumeReady(IsVolumeReadyRequest) returns (IsVolumeReadyResponse);
|
||||
rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse);
|
||||
rpc CreateSnapshot(CreateSnapshotRequest) returns (CreateSnapshotResponse);
|
||||
rpc DeleteSnapshot(DeleteSnapshotRequest) returns (Empty);
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
syntax = "proto3";
|
||||
package generated;
|
||||
|
||||
import "Shared.proto";
|
||||
|
||||
message PutObjectRequest {
|
||||
string bucket = 1;
|
||||
string key = 2;
|
||||
bytes body = 3;
|
||||
}
|
||||
|
||||
message GetObjectRequest {
|
||||
string bucket = 1;
|
||||
string key = 2;
|
||||
}
|
||||
|
||||
message Bytes {
|
||||
bytes data = 1;
|
||||
}
|
||||
|
||||
message ListCommonPrefixesRequest {
|
||||
string bucket = 1;
|
||||
string delimiter = 2;
|
||||
}
|
||||
|
||||
message ListCommonPrefixesResponse {
|
||||
repeated string prefixes = 1;
|
||||
}
|
||||
|
||||
message ListObjectsRequest {
|
||||
string bucket = 1;
|
||||
string prefix = 2;
|
||||
}
|
||||
|
||||
message ListObjectsResponse {
|
||||
repeated string keys = 1;
|
||||
}
|
||||
|
||||
message DeleteObjectRequest {
|
||||
string bucket = 1;
|
||||
string key = 2;
|
||||
}
|
||||
|
||||
|
||||
message CreateSignedURLRequest {
|
||||
string bucket = 1;
|
||||
string key = 2;
|
||||
int64 ttl = 3;
|
||||
}
|
||||
|
||||
message CreateSignedURLResponse {
|
||||
string url = 1;
|
||||
}
|
||||
|
||||
service ObjectStore {
|
||||
rpc Init(InitRequest) returns (Empty);
|
||||
rpc PutObject(stream PutObjectRequest) returns (Empty);
|
||||
rpc GetObject(GetObjectRequest) returns (stream Bytes);
|
||||
rpc ListCommonPrefixes(ListCommonPrefixesRequest) returns (ListCommonPrefixesResponse);
|
||||
rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse);
|
||||
rpc DeleteObject(DeleteObjectRequest) returns (Empty);
|
||||
rpc CreateSignedURL(CreateSignedURLRequest) returns (CreateSignedURLResponse);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
syntax = "proto3";
|
||||
package generated;
|
||||
|
||||
message Empty {}
|
||||
|
||||
message InitRequest {
|
||||
map<string, string> config = 1;
|
||||
}
|
Loading…
Reference in New Issue