82 lines
3.1 KiB
Go
82 lines
3.1 KiB
Go
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
|
// protoc-gen-go-micro version: v3.10.3
|
|
// source: dashboard.proto
|
|
|
|
package go_generate
|
|
|
|
import (
|
|
context "context"
|
|
_ "go.unistack.org/micro-client-http/v3"
|
|
v3 "go.unistack.org/micro-server-http/v3"
|
|
client "go.unistack.org/micro/v3/client"
|
|
server "go.unistack.org/micro/v3/server"
|
|
go_generate "go.unistack.org/unistack-org/pkgdash/proto/go_generate"
|
|
)
|
|
|
|
type dashboardServiceClient struct {
|
|
c client.Client
|
|
name string
|
|
}
|
|
|
|
func NewDashboardServiceClient(name string, c client.Client) DashboardServiceClient {
|
|
return &dashboardServiceClient{c: c, name: name}
|
|
}
|
|
|
|
func (c *dashboardServiceClient) ListPackage(ctx context.Context, req *go_generate.ListPackageReq, opts ...client.CallOption) (*go_generate.ListPackageRsp, error) {
|
|
rsp := &go_generate.ListPackageRsp{}
|
|
err := c.c.Call(ctx, c.c.NewRequest(c.name, "DashboardService.ListPackage", req), rsp, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return rsp, nil
|
|
}
|
|
|
|
func (c *dashboardServiceClient) UpdateInfo(ctx context.Context, req *go_generate.UpdateInfoPackageRsp, opts ...client.CallOption) (*go_generate.UpdateInfoPackageReq, error) {
|
|
rsp := &go_generate.UpdateInfoPackageReq{}
|
|
err := c.c.Call(ctx, c.c.NewRequest(c.name, "DashboardService.UpdateInfo", req), rsp, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return rsp, nil
|
|
}
|
|
|
|
func (c *dashboardServiceClient) AddComment(ctx context.Context, req *go_generate.CommentRsp, opts ...client.CallOption) (*go_generate.CommentReq, error) {
|
|
rsp := &go_generate.CommentReq{}
|
|
err := c.c.Call(ctx, c.c.NewRequest(c.name, "DashboardService.AddComment", req), rsp, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return rsp, nil
|
|
}
|
|
|
|
type dashboardServiceServer struct {
|
|
DashboardServiceServer
|
|
}
|
|
|
|
func (h *dashboardServiceServer) ListPackage(ctx context.Context, req *go_generate.ListPackageReq, rsp *go_generate.ListPackageRsp) error {
|
|
return h.DashboardServiceServer.ListPackage(ctx, req, rsp)
|
|
}
|
|
|
|
func (h *dashboardServiceServer) UpdateInfo(ctx context.Context, req *go_generate.UpdateInfoPackageRsp, rsp *go_generate.UpdateInfoPackageReq) error {
|
|
return h.DashboardServiceServer.UpdateInfo(ctx, req, rsp)
|
|
}
|
|
|
|
func (h *dashboardServiceServer) AddComment(ctx context.Context, req *go_generate.CommentRsp, rsp *go_generate.CommentReq) error {
|
|
return h.DashboardServiceServer.AddComment(ctx, req, rsp)
|
|
}
|
|
|
|
func RegisterDashboardServiceServer(s server.Server, sh DashboardServiceServer, opts ...server.HandlerOption) error {
|
|
type dashboardService interface {
|
|
ListPackage(ctx context.Context, req *go_generate.ListPackageReq, rsp *go_generate.ListPackageRsp) error
|
|
UpdateInfo(ctx context.Context, req *go_generate.UpdateInfoPackageRsp, rsp *go_generate.UpdateInfoPackageReq) error
|
|
AddComment(ctx context.Context, req *go_generate.CommentRsp, rsp *go_generate.CommentReq) error
|
|
}
|
|
type DashboardService struct {
|
|
dashboardService
|
|
}
|
|
h := &dashboardServiceServer{sh}
|
|
var nopts []server.HandlerOption
|
|
nopts = append(nopts, v3.HandlerEndpoints(DashboardServiceServerEndpoints))
|
|
return s.Handle(s.NewHandler(&DashboardService{h}, append(nopts, opts...)...))
|
|
}
|