使用最新的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.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 CreateHTTPAccessLogsRequest struct {
state protoimpl.MessageState
@@ -312,7 +303,7 @@ type ListHTTPAccessLogsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Deprecated: Do not use.
// Deprecated: Marked as deprecated in service_http_access_log.proto.
AccessLogs []*HTTPAccessLog `protobuf:"bytes,1,rep,name=accessLogs,proto3" json:"accessLogs,omitempty"`
HttpAccessLogs []*HTTPAccessLog `protobuf:"bytes,4,rep,name=httpAccessLogs,proto3" json:"httpAccessLogs,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"`
@@ -351,7 +342,7 @@ func (*ListHTTPAccessLogsResponse) Descriptor() ([]byte, []int) {
return file_service_http_access_log_proto_rawDescGZIP(), []int{3}
}
// Deprecated: Do not use.
// Deprecated: Marked as deprecated in service_http_access_log.proto.
func (x *ListHTTPAccessLogsResponse) GetAccessLogs() []*HTTPAccessLog {
if x != nil {
return x.AccessLogs
@@ -858,199 +849,3 @@ func file_service_http_access_log_proto_init() {
file_service_http_access_log_proto_goTypes = nil
file_service_http_access_log_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
// HTTPAccessLogServiceClient is the client API for HTTPAccessLogService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type HTTPAccessLogServiceClient interface {
// 创建访问日志
CreateHTTPAccessLogs(ctx context.Context, in *CreateHTTPAccessLogsRequest, opts ...grpc.CallOption) (*CreateHTTPAccessLogsResponse, error)
// 列出单页访问日志
ListHTTPAccessLogs(ctx context.Context, in *ListHTTPAccessLogsRequest, opts ...grpc.CallOption) (*ListHTTPAccessLogsResponse, error)
// 查找单个日志
FindHTTPAccessLog(ctx context.Context, in *FindHTTPAccessLogRequest, opts ...grpc.CallOption) (*FindHTTPAccessLogResponse, error)
// 查找日志分区
FindHTTPAccessLogPartitions(ctx context.Context, in *FindHTTPAccessLogPartitionsRequest, opts ...grpc.CallOption) (*FindHTTPAccessLogPartitionsResponse, error)
}
type hTTPAccessLogServiceClient struct {
cc grpc.ClientConnInterface
}
func NewHTTPAccessLogServiceClient(cc grpc.ClientConnInterface) HTTPAccessLogServiceClient {
return &hTTPAccessLogServiceClient{cc}
}
func (c *hTTPAccessLogServiceClient) CreateHTTPAccessLogs(ctx context.Context, in *CreateHTTPAccessLogsRequest, opts ...grpc.CallOption) (*CreateHTTPAccessLogsResponse, error) {
out := new(CreateHTTPAccessLogsResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogService/createHTTPAccessLogs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogServiceClient) ListHTTPAccessLogs(ctx context.Context, in *ListHTTPAccessLogsRequest, opts ...grpc.CallOption) (*ListHTTPAccessLogsResponse, error) {
out := new(ListHTTPAccessLogsResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogService/listHTTPAccessLogs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogServiceClient) FindHTTPAccessLog(ctx context.Context, in *FindHTTPAccessLogRequest, opts ...grpc.CallOption) (*FindHTTPAccessLogResponse, error) {
out := new(FindHTTPAccessLogResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogService/findHTTPAccessLog", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPAccessLogServiceClient) FindHTTPAccessLogPartitions(ctx context.Context, in *FindHTTPAccessLogPartitionsRequest, opts ...grpc.CallOption) (*FindHTTPAccessLogPartitionsResponse, error) {
out := new(FindHTTPAccessLogPartitionsResponse)
err := c.cc.Invoke(ctx, "/pb.HTTPAccessLogService/findHTTPAccessLogPartitions", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HTTPAccessLogServiceServer is the server API for HTTPAccessLogService service.
type HTTPAccessLogServiceServer interface {
// 创建访问日志
CreateHTTPAccessLogs(context.Context, *CreateHTTPAccessLogsRequest) (*CreateHTTPAccessLogsResponse, error)
// 列出单页访问日志
ListHTTPAccessLogs(context.Context, *ListHTTPAccessLogsRequest) (*ListHTTPAccessLogsResponse, error)
// 查找单个日志
FindHTTPAccessLog(context.Context, *FindHTTPAccessLogRequest) (*FindHTTPAccessLogResponse, error)
// 查找日志分区
FindHTTPAccessLogPartitions(context.Context, *FindHTTPAccessLogPartitionsRequest) (*FindHTTPAccessLogPartitionsResponse, error)
}
// UnimplementedHTTPAccessLogServiceServer can be embedded to have forward compatible implementations.
type UnimplementedHTTPAccessLogServiceServer struct {
}
func (*UnimplementedHTTPAccessLogServiceServer) CreateHTTPAccessLogs(context.Context, *CreateHTTPAccessLogsRequest) (*CreateHTTPAccessLogsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPAccessLogs not implemented")
}
func (*UnimplementedHTTPAccessLogServiceServer) ListHTTPAccessLogs(context.Context, *ListHTTPAccessLogsRequest) (*ListHTTPAccessLogsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListHTTPAccessLogs not implemented")
}
func (*UnimplementedHTTPAccessLogServiceServer) FindHTTPAccessLog(context.Context, *FindHTTPAccessLogRequest) (*FindHTTPAccessLogResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindHTTPAccessLog not implemented")
}
func (*UnimplementedHTTPAccessLogServiceServer) FindHTTPAccessLogPartitions(context.Context, *FindHTTPAccessLogPartitionsRequest) (*FindHTTPAccessLogPartitionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindHTTPAccessLogPartitions not implemented")
}
func RegisterHTTPAccessLogServiceServer(s *grpc.Server, srv HTTPAccessLogServiceServer) {
s.RegisterService(&_HTTPAccessLogService_serviceDesc, srv)
}
func _HTTPAccessLogService_CreateHTTPAccessLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateHTTPAccessLogsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogServiceServer).CreateHTTPAccessLogs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogService/CreateHTTPAccessLogs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogServiceServer).CreateHTTPAccessLogs(ctx, req.(*CreateHTTPAccessLogsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogService_ListHTTPAccessLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListHTTPAccessLogsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogServiceServer).ListHTTPAccessLogs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogService/ListHTTPAccessLogs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogServiceServer).ListHTTPAccessLogs(ctx, req.(*ListHTTPAccessLogsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogService_FindHTTPAccessLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindHTTPAccessLogRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogServiceServer).FindHTTPAccessLog(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogService/FindHTTPAccessLog",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogServiceServer).FindHTTPAccessLog(ctx, req.(*FindHTTPAccessLogRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPAccessLogService_FindHTTPAccessLogPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindHTTPAccessLogPartitionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAccessLogServiceServer).FindHTTPAccessLogPartitions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.HTTPAccessLogService/FindHTTPAccessLogPartitions",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAccessLogServiceServer).FindHTTPAccessLogPartitions(ctx, req.(*FindHTTPAccessLogPartitionsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _HTTPAccessLogService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.HTTPAccessLogService",
HandlerType: (*HTTPAccessLogServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createHTTPAccessLogs",
Handler: _HTTPAccessLogService_CreateHTTPAccessLogs_Handler,
},
{
MethodName: "listHTTPAccessLogs",
Handler: _HTTPAccessLogService_ListHTTPAccessLogs_Handler,
},
{
MethodName: "findHTTPAccessLog",
Handler: _HTTPAccessLogService_FindHTTPAccessLog_Handler,
},
{
MethodName: "findHTTPAccessLogPartitions",
Handler: _HTTPAccessLogService_FindHTTPAccessLogPartitions_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_http_access_log.proto",
}