mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-29 00:11:21 -05:00
91 lines
2.4 KiB
Go
91 lines
2.4 KiB
Go
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
|
// source: proto/v0/thumbnails.proto
|
|
|
|
package proto
|
|
|
|
import (
|
|
fmt "fmt"
|
|
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
|
proto "google.golang.org/protobuf/proto"
|
|
math "math"
|
|
)
|
|
|
|
import (
|
|
context "context"
|
|
api "go-micro.dev/v4/api"
|
|
client "go-micro.dev/v4/client"
|
|
server "go-micro.dev/v4/server"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ api.Endpoint
|
|
var _ context.Context
|
|
var _ client.Option
|
|
var _ server.Option
|
|
|
|
// Api Endpoints for ThumbnailService service
|
|
|
|
func NewThumbnailServiceEndpoints() []*api.Endpoint {
|
|
return []*api.Endpoint{}
|
|
}
|
|
|
|
// Client API for ThumbnailService service
|
|
|
|
type ThumbnailService interface {
|
|
// Generates the thumbnail and returns it.
|
|
GetThumbnail(ctx context.Context, in *GetThumbnailRequest, opts ...client.CallOption) (*GetThumbnailResponse, error)
|
|
}
|
|
|
|
type thumbnailService struct {
|
|
c client.Client
|
|
name string
|
|
}
|
|
|
|
func NewThumbnailService(name string, c client.Client) ThumbnailService {
|
|
return &thumbnailService{
|
|
c: c,
|
|
name: name,
|
|
}
|
|
}
|
|
|
|
func (c *thumbnailService) GetThumbnail(ctx context.Context, in *GetThumbnailRequest, opts ...client.CallOption) (*GetThumbnailResponse, error) {
|
|
req := c.c.NewRequest(c.name, "ThumbnailService.GetThumbnail", in)
|
|
out := new(GetThumbnailResponse)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for ThumbnailService service
|
|
|
|
type ThumbnailServiceHandler interface {
|
|
// Generates the thumbnail and returns it.
|
|
GetThumbnail(context.Context, *GetThumbnailRequest, *GetThumbnailResponse) error
|
|
}
|
|
|
|
func RegisterThumbnailServiceHandler(s server.Server, hdlr ThumbnailServiceHandler, opts ...server.HandlerOption) error {
|
|
type thumbnailService interface {
|
|
GetThumbnail(ctx context.Context, in *GetThumbnailRequest, out *GetThumbnailResponse) error
|
|
}
|
|
type ThumbnailService struct {
|
|
thumbnailService
|
|
}
|
|
h := &thumbnailServiceHandler{hdlr}
|
|
return s.Handle(s.NewHandler(&ThumbnailService{h}, opts...))
|
|
}
|
|
|
|
type thumbnailServiceHandler struct {
|
|
ThumbnailServiceHandler
|
|
}
|
|
|
|
func (h *thumbnailServiceHandler) GetThumbnail(ctx context.Context, in *GetThumbnailRequest, out *GetThumbnailResponse) error {
|
|
return h.ThumbnailServiceHandler.GetThumbnail(ctx, in, out)
|
|
}
|