// 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...)...) }