242 lines
9.0 KiB
Go
242 lines
9.0 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v5.28.3
|
|
// source: helios/depot/depot.proto
|
|
|
|
package pbdepot
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
Depot_GetObject_FullMethodName = "/helios.depot.Depot/GetObject"
|
|
Depot_GetObjects_FullMethodName = "/helios.depot.Depot/GetObjects"
|
|
Depot_UploadNewObject_FullMethodName = "/helios.depot.Depot/UploadNewObject"
|
|
Depot_DeleteObject_FullMethodName = "/helios.depot.Depot/DeleteObject"
|
|
)
|
|
|
|
// DepotClient is the client API for Depot service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
//
|
|
// Depot stores assets as objects and has other features of handling media.
|
|
type DepotClient interface {
|
|
// Returns NOT_FOUND if the object does not exist.
|
|
GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*GetObjectResponse, error)
|
|
GetObjects(ctx context.Context, in *GetObjectsRequest, opts ...grpc.CallOption) (*GetObjectsResponse, error)
|
|
UploadNewObject(ctx context.Context, in *UploadNewObjectRequest, opts ...grpc.CallOption) (*UploadNewObjectResponse, error)
|
|
DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*DeleteObjectResponse, error)
|
|
}
|
|
|
|
type depotClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewDepotClient(cc grpc.ClientConnInterface) DepotClient {
|
|
return &depotClient{cc}
|
|
}
|
|
|
|
func (c *depotClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*GetObjectResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetObjectResponse)
|
|
err := c.cc.Invoke(ctx, Depot_GetObject_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *depotClient) GetObjects(ctx context.Context, in *GetObjectsRequest, opts ...grpc.CallOption) (*GetObjectsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetObjectsResponse)
|
|
err := c.cc.Invoke(ctx, Depot_GetObjects_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *depotClient) UploadNewObject(ctx context.Context, in *UploadNewObjectRequest, opts ...grpc.CallOption) (*UploadNewObjectResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UploadNewObjectResponse)
|
|
err := c.cc.Invoke(ctx, Depot_UploadNewObject_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *depotClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*DeleteObjectResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteObjectResponse)
|
|
err := c.cc.Invoke(ctx, Depot_DeleteObject_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// DepotServer is the server API for Depot service.
|
|
// All implementations must embed UnimplementedDepotServer
|
|
// for forward compatibility.
|
|
//
|
|
// Depot stores assets as objects and has other features of handling media.
|
|
type DepotServer interface {
|
|
// Returns NOT_FOUND if the object does not exist.
|
|
GetObject(context.Context, *GetObjectRequest) (*GetObjectResponse, error)
|
|
GetObjects(context.Context, *GetObjectsRequest) (*GetObjectsResponse, error)
|
|
UploadNewObject(context.Context, *UploadNewObjectRequest) (*UploadNewObjectResponse, error)
|
|
DeleteObject(context.Context, *DeleteObjectRequest) (*DeleteObjectResponse, error)
|
|
mustEmbedUnimplementedDepotServer()
|
|
}
|
|
|
|
// UnimplementedDepotServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedDepotServer struct{}
|
|
|
|
func (UnimplementedDepotServer) GetObject(context.Context, *GetObjectRequest) (*GetObjectResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetObject not implemented")
|
|
}
|
|
func (UnimplementedDepotServer) GetObjects(context.Context, *GetObjectsRequest) (*GetObjectsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetObjects not implemented")
|
|
}
|
|
func (UnimplementedDepotServer) UploadNewObject(context.Context, *UploadNewObjectRequest) (*UploadNewObjectResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UploadNewObject not implemented")
|
|
}
|
|
func (UnimplementedDepotServer) DeleteObject(context.Context, *DeleteObjectRequest) (*DeleteObjectResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteObject not implemented")
|
|
}
|
|
func (UnimplementedDepotServer) mustEmbedUnimplementedDepotServer() {}
|
|
func (UnimplementedDepotServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeDepotServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to DepotServer will
|
|
// result in compilation errors.
|
|
type UnsafeDepotServer interface {
|
|
mustEmbedUnimplementedDepotServer()
|
|
}
|
|
|
|
func RegisterDepotServer(s grpc.ServiceRegistrar, srv DepotServer) {
|
|
// If the following call pancis, it indicates UnimplementedDepotServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&Depot_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Depot_GetObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetObjectRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DepotServer).GetObject(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Depot_GetObject_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DepotServer).GetObject(ctx, req.(*GetObjectRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Depot_GetObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetObjectsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DepotServer).GetObjects(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Depot_GetObjects_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DepotServer).GetObjects(ctx, req.(*GetObjectsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Depot_UploadNewObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UploadNewObjectRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DepotServer).UploadNewObject(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Depot_UploadNewObject_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DepotServer).UploadNewObject(ctx, req.(*UploadNewObjectRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Depot_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.(DepotServer).DeleteObject(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Depot_DeleteObject_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DepotServer).DeleteObject(ctx, req.(*DeleteObjectRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Depot_ServiceDesc is the grpc.ServiceDesc for Depot service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Depot_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "helios.depot.Depot",
|
|
HandlerType: (*DepotServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetObject",
|
|
Handler: _Depot_GetObject_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetObjects",
|
|
Handler: _Depot_GetObjects_Handler,
|
|
},
|
|
{
|
|
MethodName: "UploadNewObject",
|
|
Handler: _Depot_UploadNewObject_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteObject",
|
|
Handler: _Depot_DeleteObject_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "helios/depot/depot.proto",
|
|
}
|