initial import

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-08-25 15:36:01 +03:00
parent 9ae6f7a365
commit a911e8aef0
12 changed files with 1121 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions:
// - protoc-gen-go-micro v3.10.4
// - protoc v5.27.1
// source: cms_template_service.proto
package cms_template_proto
import (
context "context"
cms_template_proto "go.unistack.org/cms-template-proto"
client "go.unistack.org/micro/v3/client"
)
var (
TemplateServiceName = "TemplateService"
)
type TemplateServiceClient interface {
Call(ctx context.Context, req *cms_template_proto.CallReq, opts ...client.CallOption) (*cms_template_proto.CallRsp, error)
}
type TemplateServiceServer interface {
Call(ctx context.Context, req *cms_template_proto.CallReq, rsp *cms_template_proto.CallRsp) error
}

View File

@@ -0,0 +1,50 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.10.4
// source: cms_template_service.proto
package cms_template_proto
import (
context "context"
cms_template_proto "go.unistack.org/cms-template-proto"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"
)
type templateServiceClient struct {
c client.Client
name string
}
func NewTemplateServiceClient(name string, c client.Client) cms_template_proto.TemplateServiceClient {
return &templateServiceClient{c: c, name: name}
}
func (c *templateServiceClient) Call(ctx context.Context, req *cms_template_proto.CallReq, opts ...client.CallOption) (*cms_template_proto.CallRsp, error) {
rsp := &cms_template_proto.CallRsp{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "TemplateService.Call", req), rsp, opts...)
if err != nil {
return nil, err
}
return rsp, nil
}
type templateServiceServer struct {
cms_template_proto.TemplateServiceServer
}
func (h *templateServiceServer) Call(ctx context.Context, req *cms_template_proto.CallReq, rsp *cms_template_proto.CallRsp) error {
return h.TemplateServiceServer.Call(ctx, req, rsp)
}
func RegisterTemplateServiceServer(s server.Server, sh cms_template_proto.TemplateServiceServer, opts ...server.HandlerOption) error {
type templateService interface {
Call(ctx context.Context, req *cms_template_proto.CallReq, rsp *cms_template_proto.CallRsp) error
}
type TemplateService struct {
templateService
}
h := &templateServiceServer{sh}
var nopts []server.HandlerOption
return s.Handle(s.NewHandler(&TemplateService{h}, append(nopts, opts...)...))
}