使用最新的protoc-gen-go和protoc-gen-go-grpc插件

This commit is contained in:
刘祥超
2023-08-06 23:36:50 +08:00
parent 65be70d015
commit e6af6b6575
315 changed files with 55373 additions and 51574 deletions

View File

@@ -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_http_access_log_policy.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 CountAllHTTPAccessLogPoliciesRequest struct {
state protoimpl.MessageState
@@ -939,313 +930,3 @@ func file_service_http_access_log_policy_proto_init() {
file_service_http_access_log_policy_proto_goTypes = nil
file_service_http_access_log_policy_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
// HTTPAccessLogPolicyServiceClient is the client API for HTTPAccessLogPolicyService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type HTTPAccessLogPolicyServiceClient interface {
// 计算访问日志策略数量
CountAllHTTPAccessLogPolicies(ctx context.Context, in *CountAllHTTPAccessLogPoliciesRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出单页访问日志策略
ListHTTPAccessLogPolicies(ctx context.Context, in *ListHTTPAccessLogPoliciesRequest, opts ...grpc.CallOption) (*ListHTTPAccessLogPoliciesResponse, error)
// 创建访问日志策略
CreateHTTPAccessLogPolicy(ctx context.Context, in *CreateHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*CreateHTTPAccessLogPolicyResponse, error)
// 修改访问日志策略
UpdateHTTPAccessLogPolicy(ctx context.Context, in *UpdateHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找单个访问日志策略
FindHTTPAccessLogPolicy(ctx context.Context, in *FindHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*FindHTTPAccessLogPolicyResponse, error)
// 删除访问日志策略
DeleteHTTPAccessLogPolicy(ctx context.Context, in *DeleteHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 测试写入某个访问日志策略
WriteHTTPAccessLogPolicy(ctx context.Context, in *WriteHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type hTTPAccessLogPolicyServiceClient struct {
cc grpc.ClientConnInterface
}
func NewHTTPAccessLogPolicyServiceClient(cc grpc.ClientConnInterface) HTTPAccessLogPolicyServiceClient {
return &hTTPAccessLogPolicyServiceClient{cc}
}
func (c *hTTPAccessLogPolicyServiceClient) CountAllHTTPAccessLogPolicies(ctx context.Context, in *CountAllHTTPAccessLogPoliciesRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogPolicyService/countAllHTTPAccessLogPolicies", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogPolicyServiceClient) ListHTTPAccessLogPolicies(ctx context.Context, in *ListHTTPAccessLogPoliciesRequest, opts ...grpc.CallOption) (*ListHTTPAccessLogPoliciesResponse, error) {
out := new(ListHTTPAccessLogPoliciesResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogPolicyService/listHTTPAccessLogPolicies", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogPolicyServiceClient) CreateHTTPAccessLogPolicy(ctx context.Context, in *CreateHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*CreateHTTPAccessLogPolicyResponse, error) {
out := new(CreateHTTPAccessLogPolicyResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogPolicyService/createHTTPAccessLogPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogPolicyServiceClient) UpdateHTTPAccessLogPolicy(ctx context.Context, in *UpdateHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogPolicyService/updateHTTPAccessLogPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogPolicyServiceClient) FindHTTPAccessLogPolicy(ctx context.Context, in *FindHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*FindHTTPAccessLogPolicyResponse, error) {
out := new(FindHTTPAccessLogPolicyResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogPolicyService/findHTTPAccessLogPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogPolicyServiceClient) DeleteHTTPAccessLogPolicy(ctx context.Context, in *DeleteHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogPolicyService/deleteHTTPAccessLogPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogPolicyServiceClient) WriteHTTPAccessLogPolicy(ctx context.Context, in *WriteHTTPAccessLogPolicyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogPolicyService/writeHTTPAccessLogPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HTTPAccessLogPolicyServiceServer is the server API for HTTPAccessLogPolicyService service.
type HTTPAccessLogPolicyServiceServer interface {
// 计算访问日志策略数量
CountAllHTTPAccessLogPolicies(context.Context, *CountAllHTTPAccessLogPoliciesRequest) (*RPCCountResponse, error)
// 列出单页访问日志策略
ListHTTPAccessLogPolicies(context.Context, *ListHTTPAccessLogPoliciesRequest) (*ListHTTPAccessLogPoliciesResponse, error)
// 创建访问日志策略
CreateHTTPAccessLogPolicy(context.Context, *CreateHTTPAccessLogPolicyRequest) (*CreateHTTPAccessLogPolicyResponse, error)
// 修改访问日志策略
UpdateHTTPAccessLogPolicy(context.Context, *UpdateHTTPAccessLogPolicyRequest) (*RPCSuccess, error)
// 查找单个访问日志策略
FindHTTPAccessLogPolicy(context.Context, *FindHTTPAccessLogPolicyRequest) (*FindHTTPAccessLogPolicyResponse, error)
// 删除访问日志策略
DeleteHTTPAccessLogPolicy(context.Context, *DeleteHTTPAccessLogPolicyRequest) (*RPCSuccess, error)
// 测试写入某个访问日志策略
WriteHTTPAccessLogPolicy(context.Context, *WriteHTTPAccessLogPolicyRequest) (*RPCSuccess, error)
}
// UnimplementedHTTPAccessLogPolicyServiceServer can be embedded to have forward compatible implementations.
type UnimplementedHTTPAccessLogPolicyServiceServer struct {
}
func (*UnimplementedHTTPAccessLogPolicyServiceServer) CountAllHTTPAccessLogPolicies(context.Context, *CountAllHTTPAccessLogPoliciesRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountAllHTTPAccessLogPolicies not implemented")
}
func (*UnimplementedHTTPAccessLogPolicyServiceServer) ListHTTPAccessLogPolicies(context.Context, *ListHTTPAccessLogPoliciesRequest) (*ListHTTPAccessLogPoliciesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListHTTPAccessLogPolicies not implemented")
}
func (*UnimplementedHTTPAccessLogPolicyServiceServer) CreateHTTPAccessLogPolicy(context.Context, *CreateHTTPAccessLogPolicyRequest) (*CreateHTTPAccessLogPolicyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPAccessLogPolicy not implemented")
}
func (*UnimplementedHTTPAccessLogPolicyServiceServer) UpdateHTTPAccessLogPolicy(context.Context, *UpdateHTTPAccessLogPolicyRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPAccessLogPolicy not implemented")
}
func (*UnimplementedHTTPAccessLogPolicyServiceServer) FindHTTPAccessLogPolicy(context.Context, *FindHTTPAccessLogPolicyRequest) (*FindHTTPAccessLogPolicyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindHTTPAccessLogPolicy not implemented")
}
func (*UnimplementedHTTPAccessLogPolicyServiceServer) DeleteHTTPAccessLogPolicy(context.Context, *DeleteHTTPAccessLogPolicyRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteHTTPAccessLogPolicy not implemented")
}
func (*UnimplementedHTTPAccessLogPolicyServiceServer) WriteHTTPAccessLogPolicy(context.Context, *WriteHTTPAccessLogPolicyRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method WriteHTTPAccessLogPolicy not implemented")
}
func RegisterHTTPAccessLogPolicyServiceServer(s *grpc.Server, srv HTTPAccessLogPolicyServiceServer) {
s.RegisterService(&_HTTPAccessLogPolicyService_serviceDesc, srv)
}
func _HTTPAccessLogPolicyService_CountAllHTTPAccessLogPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountAllHTTPAccessLogPoliciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogPolicyServiceServer).CountAllHTTPAccessLogPolicies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogPolicyService/CountAllHTTPAccessLogPolicies",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogPolicyServiceServer).CountAllHTTPAccessLogPolicies(ctx, req.(*CountAllHTTPAccessLogPoliciesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogPolicyService_ListHTTPAccessLogPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListHTTPAccessLogPoliciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogPolicyServiceServer).ListHTTPAccessLogPolicies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogPolicyService/ListHTTPAccessLogPolicies",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogPolicyServiceServer).ListHTTPAccessLogPolicies(ctx, req.(*ListHTTPAccessLogPoliciesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogPolicyService_CreateHTTPAccessLogPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateHTTPAccessLogPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogPolicyServiceServer).CreateHTTPAccessLogPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogPolicyService/CreateHTTPAccessLogPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogPolicyServiceServer).CreateHTTPAccessLogPolicy(ctx, req.(*CreateHTTPAccessLogPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogPolicyService_UpdateHTTPAccessLogPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateHTTPAccessLogPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogPolicyServiceServer).UpdateHTTPAccessLogPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogPolicyService/UpdateHTTPAccessLogPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogPolicyServiceServer).UpdateHTTPAccessLogPolicy(ctx, req.(*UpdateHTTPAccessLogPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogPolicyService_FindHTTPAccessLogPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindHTTPAccessLogPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogPolicyServiceServer).FindHTTPAccessLogPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogPolicyService/FindHTTPAccessLogPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogPolicyServiceServer).FindHTTPAccessLogPolicy(ctx, req.(*FindHTTPAccessLogPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogPolicyService_DeleteHTTPAccessLogPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteHTTPAccessLogPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogPolicyServiceServer).DeleteHTTPAccessLogPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogPolicyService/DeleteHTTPAccessLogPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogPolicyServiceServer).DeleteHTTPAccessLogPolicy(ctx, req.(*DeleteHTTPAccessLogPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogPolicyService_WriteHTTPAccessLogPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WriteHTTPAccessLogPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogPolicyServiceServer).WriteHTTPAccessLogPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogPolicyService/WriteHTTPAccessLogPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogPolicyServiceServer).WriteHTTPAccessLogPolicy(ctx, req.(*WriteHTTPAccessLogPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
var _HTTPAccessLogPolicyService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.HTTPAccessLogPolicyService",
HandlerType: (*HTTPAccessLogPolicyServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "countAllHTTPAccessLogPolicies",
Handler: _HTTPAccessLogPolicyService_CountAllHTTPAccessLogPolicies_Handler,
},
{
MethodName: "listHTTPAccessLogPolicies",
Handler: _HTTPAccessLogPolicyService_ListHTTPAccessLogPolicies_Handler,
},
{
MethodName: "createHTTPAccessLogPolicy",
Handler: _HTTPAccessLogPolicyService_CreateHTTPAccessLogPolicy_Handler,
},
{
MethodName: "updateHTTPAccessLogPolicy",
Handler: _HTTPAccessLogPolicyService_UpdateHTTPAccessLogPolicy_Handler,
},
{
MethodName: "findHTTPAccessLogPolicy",
Handler: _HTTPAccessLogPolicyService_FindHTTPAccessLogPolicy_Handler,
},
{
MethodName: "deleteHTTPAccessLogPolicy",
Handler: _HTTPAccessLogPolicyService_DeleteHTTPAccessLogPolicy_Handler,
},
{
MethodName: "writeHTTPAccessLogPolicy",
Handler: _HTTPAccessLogPolicyService_WriteHTTPAccessLogPolicy_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_http_access_log_policy.proto",
}