2021-01-28 14:15:31 +01:00

353 lines
13 KiB
Go

// Copyright (c) 2021 Gitpod GmbH. All rights reserved.
// Licensed under the GNU Affero General Public License (AGPL).
// See License-AGPL.txt in the project root for license information.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: blobs.proto
package api
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
type UploadUrlRequest struct {
OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UploadUrlRequest) Reset() { *m = UploadUrlRequest{} }
func (m *UploadUrlRequest) String() string { return proto.CompactTextString(m) }
func (*UploadUrlRequest) ProtoMessage() {}
func (*UploadUrlRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_674b571f3bc1c185, []int{0}
}
func (m *UploadUrlRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UploadUrlRequest.Unmarshal(m, b)
}
func (m *UploadUrlRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UploadUrlRequest.Marshal(b, m, deterministic)
}
func (m *UploadUrlRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UploadUrlRequest.Merge(m, src)
}
func (m *UploadUrlRequest) XXX_Size() int {
return xxx_messageInfo_UploadUrlRequest.Size(m)
}
func (m *UploadUrlRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UploadUrlRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UploadUrlRequest proto.InternalMessageInfo
func (m *UploadUrlRequest) GetOwnerId() string {
if m != nil {
return m.OwnerId
}
return ""
}
func (m *UploadUrlRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type UploadUrlResponse struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UploadUrlResponse) Reset() { *m = UploadUrlResponse{} }
func (m *UploadUrlResponse) String() string { return proto.CompactTextString(m) }
func (*UploadUrlResponse) ProtoMessage() {}
func (*UploadUrlResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_674b571f3bc1c185, []int{1}
}
func (m *UploadUrlResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UploadUrlResponse.Unmarshal(m, b)
}
func (m *UploadUrlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UploadUrlResponse.Marshal(b, m, deterministic)
}
func (m *UploadUrlResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_UploadUrlResponse.Merge(m, src)
}
func (m *UploadUrlResponse) XXX_Size() int {
return xxx_messageInfo_UploadUrlResponse.Size(m)
}
func (m *UploadUrlResponse) XXX_DiscardUnknown() {
xxx_messageInfo_UploadUrlResponse.DiscardUnknown(m)
}
var xxx_messageInfo_UploadUrlResponse proto.InternalMessageInfo
func (m *UploadUrlResponse) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
type DownloadUrlRequest struct {
OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DownloadUrlRequest) Reset() { *m = DownloadUrlRequest{} }
func (m *DownloadUrlRequest) String() string { return proto.CompactTextString(m) }
func (*DownloadUrlRequest) ProtoMessage() {}
func (*DownloadUrlRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_674b571f3bc1c185, []int{2}
}
func (m *DownloadUrlRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DownloadUrlRequest.Unmarshal(m, b)
}
func (m *DownloadUrlRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DownloadUrlRequest.Marshal(b, m, deterministic)
}
func (m *DownloadUrlRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DownloadUrlRequest.Merge(m, src)
}
func (m *DownloadUrlRequest) XXX_Size() int {
return xxx_messageInfo_DownloadUrlRequest.Size(m)
}
func (m *DownloadUrlRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DownloadUrlRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DownloadUrlRequest proto.InternalMessageInfo
func (m *DownloadUrlRequest) GetOwnerId() string {
if m != nil {
return m.OwnerId
}
return ""
}
func (m *DownloadUrlRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type DownloadUrlResponse struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DownloadUrlResponse) Reset() { *m = DownloadUrlResponse{} }
func (m *DownloadUrlResponse) String() string { return proto.CompactTextString(m) }
func (*DownloadUrlResponse) ProtoMessage() {}
func (*DownloadUrlResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_674b571f3bc1c185, []int{3}
}
func (m *DownloadUrlResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DownloadUrlResponse.Unmarshal(m, b)
}
func (m *DownloadUrlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DownloadUrlResponse.Marshal(b, m, deterministic)
}
func (m *DownloadUrlResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DownloadUrlResponse.Merge(m, src)
}
func (m *DownloadUrlResponse) XXX_Size() int {
return xxx_messageInfo_DownloadUrlResponse.Size(m)
}
func (m *DownloadUrlResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DownloadUrlResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DownloadUrlResponse proto.InternalMessageInfo
func (m *DownloadUrlResponse) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
func init() {
proto.RegisterType((*UploadUrlRequest)(nil), "contentservice.UploadUrlRequest")
proto.RegisterType((*UploadUrlResponse)(nil), "contentservice.UploadUrlResponse")
proto.RegisterType((*DownloadUrlRequest)(nil), "contentservice.DownloadUrlRequest")
proto.RegisterType((*DownloadUrlResponse)(nil), "contentservice.DownloadUrlResponse")
}
func init() {
proto.RegisterFile("blobs.proto", fileDescriptor_674b571f3bc1c185)
}
var fileDescriptor_674b571f3bc1c185 = []byte{
// 246 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xca, 0xc9, 0x4f,
0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4b, 0xce, 0xcf, 0x2b, 0x49, 0xcd, 0x2b,
0x29, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x55, 0x72, 0xe4, 0x12, 0x08, 0x2d, 0xc8, 0xc9, 0x4f,
0x4c, 0x09, 0x2d, 0xca, 0x09, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x92, 0xe4, 0xe2, 0xc8,
0x2f, 0xcf, 0x4b, 0x2d, 0x8a, 0xcf, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x62, 0x07,
0xf3, 0x3d, 0x53, 0x84, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x98, 0xc0, 0xc2, 0x60,
0xb6, 0x92, 0x2a, 0x97, 0x20, 0x92, 0x11, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x42, 0x02, 0x5c,
0xcc, 0xa5, 0x45, 0x39, 0x50, 0xed, 0x20, 0xa6, 0x92, 0x33, 0x97, 0x90, 0x4b, 0x7e, 0x79, 0x1e,
0x65, 0x76, 0xa9, 0x73, 0x09, 0xa3, 0x18, 0x82, 0xcb, 0x36, 0xa3, 0xdd, 0x8c, 0x5c, 0xdc, 0x4e,
0x39, 0xf9, 0x49, 0xc1, 0x10, 0x7f, 0x0a, 0x05, 0x71, 0x71, 0xc2, 0x1d, 0x29, 0xa4, 0xa0, 0x87,
0x1a, 0x0a, 0x7a, 0xe8, 0x41, 0x20, 0xa5, 0x88, 0x47, 0x05, 0xc4, 0x4e, 0x25, 0x06, 0xa1, 0x08,
0x2e, 0x6e, 0x24, 0xc7, 0x08, 0x29, 0xa1, 0xeb, 0xc1, 0xf4, 0xae, 0x94, 0x32, 0x5e, 0x35, 0x30,
0x93, 0x9d, 0x0c, 0xa3, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0x41,
0xcc, 0x82, 0xfc, 0x14, 0xdd, 0xcc, 0x7c, 0x28, 0x4b, 0x1f, 0x6a, 0x86, 0x2e, 0xd4, 0x10, 0xfd,
0xc4, 0x82, 0xcc, 0x24, 0x36, 0x70, 0xfc, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x00,
0x80, 0x82, 0xee, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// BlobServiceClient is the client API for BlobService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type BlobServiceClient interface {
// UploadUrl provides a URL to which clients can upload the content via HTTP PUT.
UploadUrl(ctx context.Context, in *UploadUrlRequest, opts ...grpc.CallOption) (*UploadUrlResponse, error)
// DownloadUrl provides a URL from which clients cat download the content via HTTP GET.
DownloadUrl(ctx context.Context, in *DownloadUrlRequest, opts ...grpc.CallOption) (*DownloadUrlResponse, error)
}
type blobServiceClient struct {
cc grpc.ClientConnInterface
}
func NewBlobServiceClient(cc grpc.ClientConnInterface) BlobServiceClient {
return &blobServiceClient{cc}
}
func (c *blobServiceClient) UploadUrl(ctx context.Context, in *UploadUrlRequest, opts ...grpc.CallOption) (*UploadUrlResponse, error) {
out := new(UploadUrlResponse)
err := c.cc.Invoke(ctx, "/contentservice.BlobService/UploadUrl", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *blobServiceClient) DownloadUrl(ctx context.Context, in *DownloadUrlRequest, opts ...grpc.CallOption) (*DownloadUrlResponse, error) {
out := new(DownloadUrlResponse)
err := c.cc.Invoke(ctx, "/contentservice.BlobService/DownloadUrl", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// BlobServiceServer is the server API for BlobService service.
type BlobServiceServer interface {
// UploadUrl provides a URL to which clients can upload the content via HTTP PUT.
UploadUrl(context.Context, *UploadUrlRequest) (*UploadUrlResponse, error)
// DownloadUrl provides a URL from which clients cat download the content via HTTP GET.
DownloadUrl(context.Context, *DownloadUrlRequest) (*DownloadUrlResponse, error)
}
// UnimplementedBlobServiceServer can be embedded to have forward compatible implementations.
type UnimplementedBlobServiceServer struct {
}
func (*UnimplementedBlobServiceServer) UploadUrl(ctx context.Context, req *UploadUrlRequest) (*UploadUrlResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UploadUrl not implemented")
}
func (*UnimplementedBlobServiceServer) DownloadUrl(ctx context.Context, req *DownloadUrlRequest) (*DownloadUrlResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DownloadUrl not implemented")
}
func RegisterBlobServiceServer(s *grpc.Server, srv BlobServiceServer) {
s.RegisterService(&_BlobService_serviceDesc, srv)
}
func _BlobService_UploadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UploadUrlRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BlobServiceServer).UploadUrl(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/contentservice.BlobService/UploadUrl",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlobServiceServer).UploadUrl(ctx, req.(*UploadUrlRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BlobService_DownloadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DownloadUrlRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BlobServiceServer).DownloadUrl(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/contentservice.BlobService/DownloadUrl",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlobServiceServer).DownloadUrl(ctx, req.(*DownloadUrlRequest))
}
return interceptor(ctx, in, info, handler)
}
var _BlobService_serviceDesc = grpc.ServiceDesc{
ServiceName: "contentservice.BlobService",
HandlerType: (*BlobServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UploadUrl",
Handler: _BlobService_UploadUrl_Handler,
},
{
MethodName: "DownloadUrl",
Handler: _BlobService_DownloadUrl_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "blobs.proto",
}