mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-02 20:00:25 +08:00
使用最新的protoc-gen-go和protoc-gen-go-grpc插件
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.19.4
|
||||
// source: service_script.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -25,10 +20,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 添加脚本
|
||||
type CreateScriptRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -1130,389 +1121,3 @@ func file_service_script_proto_init() {
|
||||
file_service_script_proto_goTypes = nil
|
||||
file_service_script_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// ScriptServiceClient is the client API for ScriptService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type ScriptServiceClient interface {
|
||||
// 添加脚本
|
||||
CreateScript(ctx context.Context, in *CreateScriptRequest, opts ...grpc.CallOption) (*CreateScriptResponse, error)
|
||||
// 删除脚本
|
||||
DeleteScript(ctx context.Context, in *DeleteScriptRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 计算脚本数量
|
||||
CountAllEnabledScripts(ctx context.Context, in *CountAllEnabledScriptsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
|
||||
// 列出单页脚本
|
||||
ListEnabledScripts(ctx context.Context, in *ListEnabledScriptsRequest, opts ...grpc.CallOption) (*ListEnabledScriptsResponse, error)
|
||||
// 发布脚本
|
||||
PublishScripts(ctx context.Context, in *PublishScriptsRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 检查脚本是否需要有更新
|
||||
CheckScriptUpdates(ctx context.Context, in *CheckScriptUpdatesRequest, opts ...grpc.CallOption) (*CheckScriptUpdatesResponse, error)
|
||||
// 查找单个脚本
|
||||
FindEnabledScript(ctx context.Context, in *FindEnabledScriptRequest, opts ...grpc.CallOption) (*FindEnabledScriptResponse, error)
|
||||
// 修改脚本
|
||||
UpdateScript(ctx context.Context, in *UpdateScriptRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 组合脚本配置
|
||||
ComposeScriptConfigs(ctx context.Context, in *ComposeScriptConfigsRequest, opts ...grpc.CallOption) (*ComposeScriptConfigsResponse, error)
|
||||
}
|
||||
|
||||
type scriptServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewScriptServiceClient(cc grpc.ClientConnInterface) ScriptServiceClient {
|
||||
return &scriptServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) CreateScript(ctx context.Context, in *CreateScriptRequest, opts ...grpc.CallOption) (*CreateScriptResponse, error) {
|
||||
out := new(CreateScriptResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/createScript", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) DeleteScript(ctx context.Context, in *DeleteScriptRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/deleteScript", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) CountAllEnabledScripts(ctx context.Context, in *CountAllEnabledScriptsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
|
||||
out := new(RPCCountResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/countAllEnabledScripts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) ListEnabledScripts(ctx context.Context, in *ListEnabledScriptsRequest, opts ...grpc.CallOption) (*ListEnabledScriptsResponse, error) {
|
||||
out := new(ListEnabledScriptsResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/listEnabledScripts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) PublishScripts(ctx context.Context, in *PublishScriptsRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/publishScripts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) CheckScriptUpdates(ctx context.Context, in *CheckScriptUpdatesRequest, opts ...grpc.CallOption) (*CheckScriptUpdatesResponse, error) {
|
||||
out := new(CheckScriptUpdatesResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/checkScriptUpdates", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) FindEnabledScript(ctx context.Context, in *FindEnabledScriptRequest, opts ...grpc.CallOption) (*FindEnabledScriptResponse, error) {
|
||||
out := new(FindEnabledScriptResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/findEnabledScript", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) UpdateScript(ctx context.Context, in *UpdateScriptRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/updateScript", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *scriptServiceClient) ComposeScriptConfigs(ctx context.Context, in *ComposeScriptConfigsRequest, opts ...grpc.CallOption) (*ComposeScriptConfigsResponse, error) {
|
||||
out := new(ComposeScriptConfigsResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.ScriptService/composeScriptConfigs", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ScriptServiceServer is the server API for ScriptService service.
|
||||
type ScriptServiceServer interface {
|
||||
// 添加脚本
|
||||
CreateScript(context.Context, *CreateScriptRequest) (*CreateScriptResponse, error)
|
||||
// 删除脚本
|
||||
DeleteScript(context.Context, *DeleteScriptRequest) (*RPCSuccess, error)
|
||||
// 计算脚本数量
|
||||
CountAllEnabledScripts(context.Context, *CountAllEnabledScriptsRequest) (*RPCCountResponse, error)
|
||||
// 列出单页脚本
|
||||
ListEnabledScripts(context.Context, *ListEnabledScriptsRequest) (*ListEnabledScriptsResponse, error)
|
||||
// 发布脚本
|
||||
PublishScripts(context.Context, *PublishScriptsRequest) (*RPCSuccess, error)
|
||||
// 检查脚本是否需要有更新
|
||||
CheckScriptUpdates(context.Context, *CheckScriptUpdatesRequest) (*CheckScriptUpdatesResponse, error)
|
||||
// 查找单个脚本
|
||||
FindEnabledScript(context.Context, *FindEnabledScriptRequest) (*FindEnabledScriptResponse, error)
|
||||
// 修改脚本
|
||||
UpdateScript(context.Context, *UpdateScriptRequest) (*RPCSuccess, error)
|
||||
// 组合脚本配置
|
||||
ComposeScriptConfigs(context.Context, *ComposeScriptConfigsRequest) (*ComposeScriptConfigsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedScriptServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedScriptServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedScriptServiceServer) CreateScript(context.Context, *CreateScriptRequest) (*CreateScriptResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateScript not implemented")
|
||||
}
|
||||
func (*UnimplementedScriptServiceServer) DeleteScript(context.Context, *DeleteScriptRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteScript not implemented")
|
||||
}
|
||||
func (*UnimplementedScriptServiceServer) CountAllEnabledScripts(context.Context, *CountAllEnabledScriptsRequest) (*RPCCountResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledScripts not implemented")
|
||||
}
|
||||
func (*UnimplementedScriptServiceServer) ListEnabledScripts(context.Context, *ListEnabledScriptsRequest) (*ListEnabledScriptsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledScripts not implemented")
|
||||
}
|
||||
func (*UnimplementedScriptServiceServer) PublishScripts(context.Context, *PublishScriptsRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PublishScripts not implemented")
|
||||
}
|
||||
func (*UnimplementedScriptServiceServer) CheckScriptUpdates(context.Context, *CheckScriptUpdatesRequest) (*CheckScriptUpdatesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CheckScriptUpdates not implemented")
|
||||
}
|
||||
func (*UnimplementedScriptServiceServer) FindEnabledScript(context.Context, *FindEnabledScriptRequest) (*FindEnabledScriptResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledScript not implemented")
|
||||
}
|
||||
func (*UnimplementedScriptServiceServer) UpdateScript(context.Context, *UpdateScriptRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateScript not implemented")
|
||||
}
|
||||
func (*UnimplementedScriptServiceServer) ComposeScriptConfigs(context.Context, *ComposeScriptConfigsRequest) (*ComposeScriptConfigsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ComposeScriptConfigs not implemented")
|
||||
}
|
||||
|
||||
func RegisterScriptServiceServer(s *grpc.Server, srv ScriptServiceServer) {
|
||||
s.RegisterService(&_ScriptService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _ScriptService_CreateScript_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateScriptRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).CreateScript(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/CreateScript",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).CreateScript(ctx, req.(*CreateScriptRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ScriptService_DeleteScript_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteScriptRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).DeleteScript(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/DeleteScript",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).DeleteScript(ctx, req.(*DeleteScriptRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ScriptService_CountAllEnabledScripts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CountAllEnabledScriptsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).CountAllEnabledScripts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/CountAllEnabledScripts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).CountAllEnabledScripts(ctx, req.(*CountAllEnabledScriptsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ScriptService_ListEnabledScripts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListEnabledScriptsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).ListEnabledScripts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/ListEnabledScripts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).ListEnabledScripts(ctx, req.(*ListEnabledScriptsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ScriptService_PublishScripts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PublishScriptsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).PublishScripts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/PublishScripts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).PublishScripts(ctx, req.(*PublishScriptsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ScriptService_CheckScriptUpdates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CheckScriptUpdatesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).CheckScriptUpdates(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/CheckScriptUpdates",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).CheckScriptUpdates(ctx, req.(*CheckScriptUpdatesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ScriptService_FindEnabledScript_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindEnabledScriptRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).FindEnabledScript(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/FindEnabledScript",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).FindEnabledScript(ctx, req.(*FindEnabledScriptRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ScriptService_UpdateScript_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateScriptRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).UpdateScript(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/UpdateScript",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).UpdateScript(ctx, req.(*UpdateScriptRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ScriptService_ComposeScriptConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ComposeScriptConfigsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ScriptServiceServer).ComposeScriptConfigs(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.ScriptService/ComposeScriptConfigs",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ScriptServiceServer).ComposeScriptConfigs(ctx, req.(*ComposeScriptConfigsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _ScriptService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.ScriptService",
|
||||
HandlerType: (*ScriptServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "createScript",
|
||||
Handler: _ScriptService_CreateScript_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "deleteScript",
|
||||
Handler: _ScriptService_DeleteScript_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "countAllEnabledScripts",
|
||||
Handler: _ScriptService_CountAllEnabledScripts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "listEnabledScripts",
|
||||
Handler: _ScriptService_ListEnabledScripts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "publishScripts",
|
||||
Handler: _ScriptService_PublishScripts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "checkScriptUpdates",
|
||||
Handler: _ScriptService_CheckScriptUpdates_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findEnabledScript",
|
||||
Handler: _ScriptService_FindEnabledScript_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "updateScript",
|
||||
Handler: _ScriptService_UpdateScript_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "composeScriptConfigs",
|
||||
Handler: _ScriptService_ComposeScriptConfigs_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_script.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user