mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
533 lines
19 KiB
Go
533 lines
19 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"`
|
|
ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,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 ""
|
|
}
|
|
|
|
func (m *UploadUrlRequest) GetContentType() string {
|
|
if m != nil {
|
|
return m.ContentType
|
|
}
|
|
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"`
|
|
ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,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 ""
|
|
}
|
|
|
|
func (m *DownloadUrlRequest) GetContentType() string {
|
|
if m != nil {
|
|
return m.ContentType
|
|
}
|
|
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 ""
|
|
}
|
|
|
|
type DeleteRequest struct {
|
|
OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
|
|
// Types that are valid to be assigned to Name:
|
|
// *DeleteRequest_Exact
|
|
// *DeleteRequest_Prefix
|
|
Name isDeleteRequest_Name `protobuf_oneof:"name"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
|
|
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*DeleteRequest) ProtoMessage() {}
|
|
func (*DeleteRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_674b571f3bc1c185, []int{4}
|
|
}
|
|
|
|
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_DeleteRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *DeleteRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeleteRequest.Merge(m, src)
|
|
}
|
|
func (m *DeleteRequest) XXX_Size() int {
|
|
return xxx_messageInfo_DeleteRequest.Size(m)
|
|
}
|
|
func (m *DeleteRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
|
|
|
|
func (m *DeleteRequest) GetOwnerId() string {
|
|
if m != nil {
|
|
return m.OwnerId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type isDeleteRequest_Name interface {
|
|
isDeleteRequest_Name()
|
|
}
|
|
|
|
type DeleteRequest_Exact struct {
|
|
Exact string `protobuf:"bytes,2,opt,name=exact,proto3,oneof"`
|
|
}
|
|
|
|
type DeleteRequest_Prefix struct {
|
|
Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3,oneof"`
|
|
}
|
|
|
|
func (*DeleteRequest_Exact) isDeleteRequest_Name() {}
|
|
|
|
func (*DeleteRequest_Prefix) isDeleteRequest_Name() {}
|
|
|
|
func (m *DeleteRequest) GetName() isDeleteRequest_Name {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DeleteRequest) GetExact() string {
|
|
if x, ok := m.GetName().(*DeleteRequest_Exact); ok {
|
|
return x.Exact
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DeleteRequest) GetPrefix() string {
|
|
if x, ok := m.GetName().(*DeleteRequest_Prefix); ok {
|
|
return x.Prefix
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
|
func (*DeleteRequest) XXX_OneofWrappers() []interface{} {
|
|
return []interface{}{
|
|
(*DeleteRequest_Exact)(nil),
|
|
(*DeleteRequest_Prefix)(nil),
|
|
}
|
|
}
|
|
|
|
type DeleteResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
|
|
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*DeleteResponse) ProtoMessage() {}
|
|
func (*DeleteResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_674b571f3bc1c185, []int{5}
|
|
}
|
|
|
|
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_DeleteResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *DeleteResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeleteResponse.Merge(m, src)
|
|
}
|
|
func (m *DeleteResponse) XXX_Size() int {
|
|
return xxx_messageInfo_DeleteResponse.Size(m)
|
|
}
|
|
func (m *DeleteResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeleteResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo
|
|
|
|
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")
|
|
proto.RegisterType((*DeleteRequest)(nil), "contentservice.DeleteRequest")
|
|
proto.RegisterType((*DeleteResponse)(nil), "contentservice.DeleteResponse")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("blobs.proto", fileDescriptor_674b571f3bc1c185)
|
|
}
|
|
|
|
var fileDescriptor_674b571f3bc1c185 = []byte{
|
|
// 331 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x52, 0xcd, 0x4e, 0xf2, 0x50,
|
|
0x10, 0xe5, 0xe7, 0xfb, 0xaa, 0x4c, 0x95, 0xe0, 0x98, 0x98, 0x4a, 0xa2, 0x81, 0x1a, 0xa3, 0x1b,
|
|
0x4a, 0xd4, 0x37, 0x20, 0x2c, 0x60, 0x5b, 0x25, 0x31, 0x6e, 0x48, 0x7f, 0x06, 0x6d, 0x52, 0x3a,
|
|
0xd7, 0xf6, 0x22, 0xf0, 0x02, 0x3e, 0xb7, 0xa1, 0xf7, 0x42, 0xf8, 0x09, 0xc4, 0x8d, 0xbb, 0x33,
|
|
0x77, 0xe6, 0xcc, 0x39, 0x9d, 0x53, 0x30, 0xfd, 0x98, 0xfd, 0xcc, 0x11, 0x29, 0x4b, 0xc6, 0x6a,
|
|
0xc0, 0x89, 0xa4, 0x44, 0x66, 0x94, 0x7e, 0x45, 0x01, 0xd9, 0x21, 0xd4, 0x06, 0x22, 0x66, 0x2f,
|
|
0x1c, 0xa4, 0xb1, 0x4b, 0x9f, 0x13, 0xca, 0x24, 0x5e, 0xc2, 0x31, 0x4f, 0x13, 0x4a, 0x87, 0x51,
|
|
0x68, 0x15, 0x1b, 0xc5, 0xfb, 0x8a, 0x7b, 0x94, 0xd7, 0xfd, 0x10, 0x11, 0xfe, 0x25, 0xde, 0x98,
|
|
0xac, 0x52, 0xfe, 0x9c, 0x63, 0x6c, 0xc2, 0x89, 0x5e, 0x3a, 0x94, 0x73, 0x41, 0x56, 0x39, 0xef,
|
|
0x99, 0xfa, 0xed, 0x65, 0x2e, 0xc8, 0xbe, 0x85, 0xb3, 0x35, 0x95, 0x4c, 0x70, 0x92, 0x11, 0xd6,
|
|
0xa0, 0x3c, 0x49, 0x63, 0xad, 0xb0, 0x80, 0xf6, 0x08, 0xb0, 0xcb, 0xd3, 0xe4, 0xcf, 0xed, 0xdc,
|
|
0xc1, 0xf9, 0x86, 0xce, 0x5e, 0x43, 0x21, 0x9c, 0x76, 0x29, 0x26, 0x49, 0xbf, 0xf0, 0x72, 0x01,
|
|
0xff, 0x69, 0xe6, 0x05, 0x52, 0x99, 0xe9, 0x15, 0x5c, 0x55, 0xa2, 0x05, 0x86, 0x48, 0x69, 0x14,
|
|
0xcd, 0x94, 0x93, 0x5e, 0xc1, 0xd5, 0x75, 0xc7, 0x50, 0xee, 0xed, 0x1a, 0x54, 0x97, 0x2a, 0xca,
|
|
0xc9, 0xe3, 0x77, 0x09, 0xcc, 0x4e, 0xcc, 0xfe, 0xb3, 0x4a, 0x09, 0x5d, 0xa8, 0xac, 0xee, 0x87,
|
|
0x0d, 0x67, 0x33, 0x43, 0x67, 0x3b, 0xc0, 0x7a, 0xf3, 0xc0, 0x84, 0x52, 0xb0, 0x0b, 0xf8, 0x0a,
|
|
0xe6, 0xda, 0x11, 0xd0, 0xde, 0xe6, 0xec, 0x26, 0x51, 0xbf, 0x39, 0x38, 0xb3, 0xda, 0xdc, 0x07,
|
|
0x43, 0x7d, 0x0f, 0x5e, 0xed, 0x10, 0xd6, 0xaf, 0x59, 0xbf, 0xde, 0xd7, 0x5e, 0xae, 0xea, 0x3c,
|
|
0xbc, 0xb5, 0xdf, 0x23, 0xf9, 0x31, 0xf1, 0x9d, 0x80, 0xc7, 0x0b, 0x28, 0x38, 0x6c, 0x45, 0xac,
|
|
0x51, 0x5b, 0xd3, 0x5b, 0x9a, 0xdf, 0xf6, 0x44, 0xe4, 0x1b, 0xf9, 0x8f, 0xfe, 0xf4, 0x13, 0x00,
|
|
0x00, 0xff, 0xff, 0xa3, 0xfb, 0x81, 0x8a, 0xf7, 0x02, 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 can download the content via HTTP GET.
|
|
DownloadUrl(ctx context.Context, in *DownloadUrlRequest, opts ...grpc.CallOption) (*DownloadUrlResponse, error)
|
|
// Delete deletes the uploaded content.
|
|
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, 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
|
|
}
|
|
|
|
func (c *blobServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
|
|
out := new(DeleteResponse)
|
|
err := c.cc.Invoke(ctx, "/contentservice.BlobService/Delete", 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 can download the content via HTTP GET.
|
|
DownloadUrl(context.Context, *DownloadUrlRequest) (*DownloadUrlResponse, error)
|
|
// Delete deletes the uploaded content.
|
|
Delete(context.Context, *DeleteRequest) (*DeleteResponse, 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 (*UnimplementedBlobServiceServer) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete 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)
|
|
}
|
|
|
|
func _BlobService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BlobServiceServer).Delete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/contentservice.BlobService/Delete",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BlobServiceServer).Delete(ctx, req.(*DeleteRequest))
|
|
}
|
|
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,
|
|
},
|
|
{
|
|
MethodName: "Delete",
|
|
Handler: _BlobService_Delete_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "blobs.proto",
|
|
}
|