micro-config-service/micro/service_micro_grpc.pb.go
Vasiliy Tolstov c36b9e002f
Some checks failed
codeql / analyze (go) (pull_request) Failing after 3m20s
dependabot-automerge / automerge (pull_request) Has been skipped
prbuild / test (pull_request) Failing after 1m29s
prbuild / lint (pull_request) Failing after 2m41s
autoapprove / autoapprove (pull_request) Failing after 1m25s
automerge / automerge (pull_request) Failing after 4s
update for latest micro changes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-08-15 07:43:43 +03:00

66 lines
2.0 KiB
Go

// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v4.0.2
// source: service.proto
package servicepb
import (
context "context"
proto "go.unistack.org/micro-config-service/v4/proto"
client "go.unistack.org/micro/v4/client"
options "go.unistack.org/micro/v4/options"
server "go.unistack.org/micro/v4/server"
)
type configServiceClient struct {
c client.Client
name string
}
func NewConfigServiceClient(name string, c client.Client) proto.ConfigServiceClient {
return &configServiceClient{c: c, name: name}
}
func (c *configServiceClient) Load(ctx context.Context, req *proto.LoadRequest, opts ...options.Option) (*proto.LoadResponse, error) {
rsp := &proto.LoadResponse{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "ConfigService.Load", req), rsp, opts...)
if err != nil {
return nil, err
}
return rsp, nil
}
func (c *configServiceClient) Save(ctx context.Context, req *proto.SaveRequest, opts ...options.Option) (*proto.SaveResponse, error) {
rsp := &proto.SaveResponse{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "ConfigService.Save", req), rsp, opts...)
if err != nil {
return nil, err
}
return rsp, nil
}
type configServiceServer struct {
proto.ConfigServiceServer
}
func (h *configServiceServer) Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error {
return h.ConfigServiceServer.Load(ctx, req, rsp)
}
func (h *configServiceServer) Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error {
return h.ConfigServiceServer.Save(ctx, req, rsp)
}
func RegisterConfigServiceServer(s server.Server, sh proto.ConfigServiceServer, opts ...options.Option) error {
type configService interface {
Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error
Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error
}
type ConfigService struct {
configService
}
h := &configServiceServer{sh}
var nopts []options.Option
return s.Handle(&ConfigService{h}, append(nopts, opts...)...)
}