Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorBadRequest(format string, args ...interface{}) *errors.Error
- func ErrorRecordNotFound(format string, args ...interface{}) *errors.Error
- func ErrorSystemError(format string, args ...interface{}) *errors.Error
- func IsBadRequest(err error) bool
- func IsRecordNotFound(err error) bool
- func IsSystemError(err error) bool
- func RegisterLogServiceHTTPServer(s *http.Server, srv LogServiceHTTPServer)
- func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer)
- type CreateLogReq
- func (*CreateLogReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateLogReq) GetCode() string
- func (x *CreateLogReq) GetComponent() string
- func (x *CreateLogReq) GetCreatedAt() string
- func (x *CreateLogReq) GetIp() string
- func (x *CreateLogReq) GetLatency() string
- func (x *CreateLogReq) GetMethod() string
- func (x *CreateLogReq) GetName() string
- func (x *CreateLogReq) GetOperation() string
- func (x *CreateLogReq) GetPath() string
- func (x *CreateLogReq) GetReason() string
- func (x *CreateLogReq) GetRequest() string
- func (x *CreateLogReq) GetRole() string
- func (x *CreateLogReq) GetTraceId() string
- func (x *CreateLogReq) GetUserId() string
- func (x *CreateLogReq) GetUsername() string
- func (*CreateLogReq) ProtoMessage()
- func (x *CreateLogReq) ProtoReflect() protoreflect.Message
- func (x *CreateLogReq) Reset()
- func (x *CreateLogReq) String() string
- func (m *CreateLogReq) Validate() error
- func (m *CreateLogReq) ValidateAll() error
- type CreateLogReqMultiError
- type CreateLogReqValidationError
- func (e CreateLogReqValidationError) Cause() error
- func (e CreateLogReqValidationError) Error() string
- func (e CreateLogReqValidationError) ErrorName() string
- func (e CreateLogReqValidationError) Field() string
- func (e CreateLogReqValidationError) Key() bool
- func (e CreateLogReqValidationError) Reason() string
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type GetLogListPageRes
- func (*GetLogListPageRes) Descriptor() ([]byte, []int)deprecated
- func (x *GetLogListPageRes) GetList() []*Log
- func (x *GetLogListPageRes) GetTotal() int64
- func (*GetLogListPageRes) ProtoMessage()
- func (x *GetLogListPageRes) ProtoReflect() protoreflect.Message
- func (x *GetLogListPageRes) Reset()
- func (x *GetLogListPageRes) String() string
- func (m *GetLogListPageRes) Validate() error
- func (m *GetLogListPageRes) ValidateAll() error
- type GetLogListPageResMultiError
- type GetLogListPageResValidationError
- func (e GetLogListPageResValidationError) Cause() error
- func (e GetLogListPageResValidationError) Error() string
- func (e GetLogListPageResValidationError) ErrorName() string
- func (e GetLogListPageResValidationError) Field() string
- func (e GetLogListPageResValidationError) Key() bool
- func (e GetLogListPageResValidationError) Reason() string
- type GetLogListReq
- func (*GetLogListReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetLogListReq) GetIp() string
- func (x *GetLogListReq) GetName() string
- func (x *GetLogListReq) GetOperation() string
- func (x *GetLogListReq) GetPage() int64
- func (x *GetLogListReq) GetPageSize() int64
- func (x *GetLogListReq) GetRole() string
- func (x *GetLogListReq) GetTraceId() string
- func (x *GetLogListReq) GetUserId() string
- func (x *GetLogListReq) GetUsername() string
- func (*GetLogListReq) ProtoMessage()
- func (x *GetLogListReq) ProtoReflect() protoreflect.Message
- func (x *GetLogListReq) Reset()
- func (x *GetLogListReq) String() string
- func (m *GetLogListReq) Validate() error
- func (m *GetLogListReq) ValidateAll() error
- type GetLogListReqMultiError
- type GetLogListReqValidationError
- func (e GetLogListReqValidationError) Cause() error
- func (e GetLogListReqValidationError) Error() string
- func (e GetLogListReqValidationError) ErrorName() string
- func (e GetLogListReqValidationError) Field() string
- func (e GetLogListReqValidationError) Key() bool
- func (e GetLogListReqValidationError) Reason() string
- type Log
- func (*Log) Descriptor() ([]byte, []int)deprecated
- func (x *Log) GetCode() string
- func (x *Log) GetComponent() string
- func (x *Log) GetCreatedAt() string
- func (x *Log) GetId() int64
- func (x *Log) GetIp() string
- func (x *Log) GetLatency() string
- func (x *Log) GetMethod() string
- func (x *Log) GetName() string
- func (x *Log) GetOperation() string
- func (x *Log) GetPath() string
- func (x *Log) GetReason() string
- func (x *Log) GetRequest() string
- func (x *Log) GetRole() string
- func (x *Log) GetTraceId() string
- func (x *Log) GetUserId() string
- func (x *Log) GetUsername() string
- func (*Log) ProtoMessage()
- func (x *Log) ProtoReflect() protoreflect.Message
- func (x *Log) Reset()
- func (x *Log) String() string
- func (m *Log) Validate() error
- func (m *Log) ValidateAll() error
- type LogMultiError
- type LogServiceClient
- type LogServiceHTTPClient
- type LogServiceHTTPClientImpl
- type LogServiceHTTPServer
- type LogServiceServer
- type LogValidationError
- type UnimplementedLogServiceServer
- type UnsafeLogServiceServer
Constants ¶
const ( LogService_GetLogList_FullMethodName = "/log.v1.LogService/GetLogList" LogService_CreateLog_FullMethodName = "/log.v1.LogService/CreateLog" )
const OperationLogServiceCreateLog = "/log.v1.LogService/CreateLog"
const OperationLogServiceGetLogList = "/log.v1.LogService/GetLogList"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "RECORD_NOT_FOUND", 1: "BAD_REQUEST", 2: "SYSTEM_ERROR", } ErrorReason_value = map[string]int32{ "RECORD_NOT_FOUND": 0, "BAD_REQUEST": 1, "SYSTEM_ERROR": 2, } )
Enum value maps for ErrorReason.
var File_log_v1_error_reason_proto protoreflect.FileDescriptor
var File_log_v1_log_proto protoreflect.FileDescriptor
var LogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "log.v1.LogService", HandlerType: (*LogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetLogList", Handler: _LogService_GetLogList_Handler, }, { MethodName: "CreateLog", Handler: _LogService_CreateLog_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "log/v1/log.proto", }
LogService_ServiceDesc is the grpc.ServiceDesc for LogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrorBadRequest ¶
func ErrorRecordNotFound ¶
func ErrorSystemError ¶
func IsBadRequest ¶
func IsRecordNotFound ¶
func IsSystemError ¶
func RegisterLogServiceHTTPServer ¶
func RegisterLogServiceHTTPServer(s *http.Server, srv LogServiceHTTPServer)
func RegisterLogServiceServer ¶
func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer)
Types ¶
type CreateLogReq ¶
type CreateLogReq struct { // trace id TraceId string `protobuf:"bytes,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // http/rpc Component string `protobuf:"bytes,3,opt,name=component,proto3" json:"component,omitempty"` // 表 Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // 响应时长 Latency string `protobuf:"bytes,5,opt,name=latency,proto3" json:"latency,omitempty"` // 用户id UserId string `protobuf:"bytes,6,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 请求方式 Method string `protobuf:"bytes,7,opt,name=method,proto3" json:"method,omitempty"` // 请求路径 Path string `protobuf:"bytes,8,opt,name=path,proto3" json:"path,omitempty"` // 请求内容 Request string `protobuf:"bytes,9,opt,name=request,proto3" json:"request,omitempty"` // 响应编码 Code string `protobuf:"bytes,10,opt,name=code,proto3" json:"code,omitempty"` // 提示信息 Reason string `protobuf:"bytes,11,opt,name=reason,proto3" json:"reason,omitempty"` // 请求ip Ip string `protobuf:"bytes,12,opt,name=ip,proto3" json:"ip,omitempty"` // 创建时间 CreatedAt string `protobuf:"bytes,13,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // kratos操作路径 Operation string `protobuf:"bytes,14,opt,name=operation,proto3" json:"operation,omitempty"` // 用户名 Username string `protobuf:"bytes,15,opt,name=username,proto3" json:"username,omitempty"` // 角色 Role string `protobuf:"bytes,16,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
请求 - 创建
func (*CreateLogReq) Descriptor
deprecated
func (*CreateLogReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateLogReq.ProtoReflect.Descriptor instead.
func (*CreateLogReq) GetCode ¶
func (x *CreateLogReq) GetCode() string
func (*CreateLogReq) GetComponent ¶
func (x *CreateLogReq) GetComponent() string
func (*CreateLogReq) GetCreatedAt ¶
func (x *CreateLogReq) GetCreatedAt() string
func (*CreateLogReq) GetIp ¶
func (x *CreateLogReq) GetIp() string
func (*CreateLogReq) GetLatency ¶
func (x *CreateLogReq) GetLatency() string
func (*CreateLogReq) GetMethod ¶
func (x *CreateLogReq) GetMethod() string
func (*CreateLogReq) GetName ¶
func (x *CreateLogReq) GetName() string
func (*CreateLogReq) GetOperation ¶
func (x *CreateLogReq) GetOperation() string
func (*CreateLogReq) GetPath ¶
func (x *CreateLogReq) GetPath() string
func (*CreateLogReq) GetReason ¶
func (x *CreateLogReq) GetReason() string
func (*CreateLogReq) GetRequest ¶
func (x *CreateLogReq) GetRequest() string
func (*CreateLogReq) GetRole ¶
func (x *CreateLogReq) GetRole() string
func (*CreateLogReq) GetTraceId ¶
func (x *CreateLogReq) GetTraceId() string
func (*CreateLogReq) GetUserId ¶
func (x *CreateLogReq) GetUserId() string
func (*CreateLogReq) GetUsername ¶
func (x *CreateLogReq) GetUsername() string
func (*CreateLogReq) ProtoMessage ¶
func (*CreateLogReq) ProtoMessage()
func (*CreateLogReq) ProtoReflect ¶
func (x *CreateLogReq) ProtoReflect() protoreflect.Message
func (*CreateLogReq) Reset ¶
func (x *CreateLogReq) Reset()
func (*CreateLogReq) String ¶
func (x *CreateLogReq) String() string
func (*CreateLogReq) Validate ¶
func (m *CreateLogReq) Validate() error
Validate checks the field values on CreateLogReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CreateLogReq) ValidateAll ¶
func (m *CreateLogReq) ValidateAll() error
ValidateAll checks the field values on CreateLogReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CreateLogReqMultiError, or nil if none found.
type CreateLogReqMultiError ¶
type CreateLogReqMultiError []error
CreateLogReqMultiError is an error wrapping multiple validation errors returned by CreateLogReq.ValidateAll() if the designated constraints aren't met.
func (CreateLogReqMultiError) AllErrors ¶
func (m CreateLogReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateLogReqMultiError) Error ¶
func (m CreateLogReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateLogReqValidationError ¶
type CreateLogReqValidationError struct {
// contains filtered or unexported fields
}
CreateLogReqValidationError is the validation error returned by CreateLogReq.Validate if the designated constraints aren't met.
func (CreateLogReqValidationError) Cause ¶
func (e CreateLogReqValidationError) Cause() error
Cause function returns cause value.
func (CreateLogReqValidationError) Error ¶
func (e CreateLogReqValidationError) Error() string
Error satisfies the builtin error interface
func (CreateLogReqValidationError) ErrorName ¶
func (e CreateLogReqValidationError) ErrorName() string
ErrorName returns error name.
func (CreateLogReqValidationError) Field ¶
func (e CreateLogReqValidationError) Field() string
Field function returns field value.
func (CreateLogReqValidationError) Key ¶
func (e CreateLogReqValidationError) Key() bool
Key function returns key value.
func (CreateLogReqValidationError) Reason ¶
func (e CreateLogReqValidationError) Reason() string
Reason function returns reason value.
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_RECORD_NOT_FOUND ErrorReason = 0 ErrorReason_BAD_REQUEST ErrorReason = 1 ErrorReason_SYSTEM_ERROR ErrorReason = 2 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type GetLogListPageRes ¶
type GetLogListPageRes struct { // 总数 Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 列表 List []*Log `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
响应 - 分页
func (*GetLogListPageRes) Descriptor
deprecated
func (*GetLogListPageRes) Descriptor() ([]byte, []int)
Deprecated: Use GetLogListPageRes.ProtoReflect.Descriptor instead.
func (*GetLogListPageRes) GetList ¶
func (x *GetLogListPageRes) GetList() []*Log
func (*GetLogListPageRes) GetTotal ¶
func (x *GetLogListPageRes) GetTotal() int64
func (*GetLogListPageRes) ProtoMessage ¶
func (*GetLogListPageRes) ProtoMessage()
func (*GetLogListPageRes) ProtoReflect ¶
func (x *GetLogListPageRes) ProtoReflect() protoreflect.Message
func (*GetLogListPageRes) Reset ¶
func (x *GetLogListPageRes) Reset()
func (*GetLogListPageRes) String ¶
func (x *GetLogListPageRes) String() string
func (*GetLogListPageRes) Validate ¶
func (m *GetLogListPageRes) Validate() error
Validate checks the field values on GetLogListPageRes with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetLogListPageRes) ValidateAll ¶
func (m *GetLogListPageRes) ValidateAll() error
ValidateAll checks the field values on GetLogListPageRes with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetLogListPageResMultiError, or nil if none found.
type GetLogListPageResMultiError ¶
type GetLogListPageResMultiError []error
GetLogListPageResMultiError is an error wrapping multiple validation errors returned by GetLogListPageRes.ValidateAll() if the designated constraints aren't met.
func (GetLogListPageResMultiError) AllErrors ¶
func (m GetLogListPageResMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetLogListPageResMultiError) Error ¶
func (m GetLogListPageResMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetLogListPageResValidationError ¶
type GetLogListPageResValidationError struct {
// contains filtered or unexported fields
}
GetLogListPageResValidationError is the validation error returned by GetLogListPageRes.Validate if the designated constraints aren't met.
func (GetLogListPageResValidationError) Cause ¶
func (e GetLogListPageResValidationError) Cause() error
Cause function returns cause value.
func (GetLogListPageResValidationError) Error ¶
func (e GetLogListPageResValidationError) Error() string
Error satisfies the builtin error interface
func (GetLogListPageResValidationError) ErrorName ¶
func (e GetLogListPageResValidationError) ErrorName() string
ErrorName returns error name.
func (GetLogListPageResValidationError) Field ¶
func (e GetLogListPageResValidationError) Field() string
Field function returns field value.
func (GetLogListPageResValidationError) Key ¶
func (e GetLogListPageResValidationError) Key() bool
Key function returns key value.
func (GetLogListPageResValidationError) Reason ¶
func (e GetLogListPageResValidationError) Reason() string
Reason function returns reason value.
type GetLogListReq ¶
type GetLogListReq struct { // 主键id Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // 页记录数 PageSize int64 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` // 名称 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // userId UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户名 Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"` // 角色 Role string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"` // 路径 Operation string `protobuf:"bytes,7,opt,name=operation,proto3" json:"operation,omitempty"` // ip Ip string `protobuf:"bytes,8,opt,name=ip,proto3" json:"ip,omitempty"` // trace_id TraceId string `protobuf:"bytes,9,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // contains filtered or unexported fields }
请求 - 分页列表
func (*GetLogListReq) Descriptor
deprecated
func (*GetLogListReq) Descriptor() ([]byte, []int)
Deprecated: Use GetLogListReq.ProtoReflect.Descriptor instead.
func (*GetLogListReq) GetIp ¶
func (x *GetLogListReq) GetIp() string
func (*GetLogListReq) GetName ¶
func (x *GetLogListReq) GetName() string
func (*GetLogListReq) GetOperation ¶
func (x *GetLogListReq) GetOperation() string
func (*GetLogListReq) GetPage ¶
func (x *GetLogListReq) GetPage() int64
func (*GetLogListReq) GetPageSize ¶
func (x *GetLogListReq) GetPageSize() int64
func (*GetLogListReq) GetRole ¶
func (x *GetLogListReq) GetRole() string
func (*GetLogListReq) GetTraceId ¶
func (x *GetLogListReq) GetTraceId() string
func (*GetLogListReq) GetUserId ¶
func (x *GetLogListReq) GetUserId() string
func (*GetLogListReq) GetUsername ¶
func (x *GetLogListReq) GetUsername() string
func (*GetLogListReq) ProtoMessage ¶
func (*GetLogListReq) ProtoMessage()
func (*GetLogListReq) ProtoReflect ¶
func (x *GetLogListReq) ProtoReflect() protoreflect.Message
func (*GetLogListReq) Reset ¶
func (x *GetLogListReq) Reset()
func (*GetLogListReq) String ¶
func (x *GetLogListReq) String() string
func (*GetLogListReq) Validate ¶
func (m *GetLogListReq) Validate() error
Validate checks the field values on GetLogListReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetLogListReq) ValidateAll ¶
func (m *GetLogListReq) ValidateAll() error
ValidateAll checks the field values on GetLogListReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetLogListReqMultiError, or nil if none found.
type GetLogListReqMultiError ¶
type GetLogListReqMultiError []error
GetLogListReqMultiError is an error wrapping multiple validation errors returned by GetLogListReq.ValidateAll() if the designated constraints aren't met.
func (GetLogListReqMultiError) AllErrors ¶
func (m GetLogListReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetLogListReqMultiError) Error ¶
func (m GetLogListReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetLogListReqValidationError ¶
type GetLogListReqValidationError struct {
// contains filtered or unexported fields
}
GetLogListReqValidationError is the validation error returned by GetLogListReq.Validate if the designated constraints aren't met.
func (GetLogListReqValidationError) Cause ¶
func (e GetLogListReqValidationError) Cause() error
Cause function returns cause value.
func (GetLogListReqValidationError) Error ¶
func (e GetLogListReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetLogListReqValidationError) ErrorName ¶
func (e GetLogListReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetLogListReqValidationError) Field ¶
func (e GetLogListReqValidationError) Field() string
Field function returns field value.
func (GetLogListReqValidationError) Key ¶
func (e GetLogListReqValidationError) Key() bool
Key function returns key value.
func (GetLogListReqValidationError) Reason ¶
func (e GetLogListReqValidationError) Reason() string
Reason function returns reason value.
type Log ¶
type Log struct { // 日志id Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // trace id TraceId string `protobuf:"bytes,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // http/rpc Component string `protobuf:"bytes,3,opt,name=component,proto3" json:"component,omitempty"` // kratos操作路径 Operation string `protobuf:"bytes,5,opt,name=operation,proto3" json:"operation,omitempty"` // 用户id UserId string `protobuf:"bytes,6,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 请求方式 Method string `protobuf:"bytes,7,opt,name=method,proto3" json:"method,omitempty"` // 请求路径 Path string `protobuf:"bytes,8,opt,name=path,proto3" json:"path,omitempty"` // 请求内容 Request string `protobuf:"bytes,9,opt,name=request,proto3" json:"request,omitempty"` // 响应内容 Code string `protobuf:"bytes,10,opt,name=code,proto3" json:"code,omitempty"` // 提示信息 Reason string `protobuf:"bytes,11,opt,name=reason,proto3" json:"reason,omitempty"` // 请求ip Ip string `protobuf:"bytes,12,opt,name=ip,proto3" json:"ip,omitempty"` // 创建时间 CreatedAt string `protobuf:"bytes,13,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 名称 Name string `protobuf:"bytes,14,opt,name=name,proto3" json:"name,omitempty"` // 响应时长 Latency string `protobuf:"bytes,15,opt,name=latency,proto3" json:"latency,omitempty"` // 用户名 Username string `protobuf:"bytes,16,opt,name=username,proto3" json:"username,omitempty"` // 角色 Role string `protobuf:"bytes,17,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
响应 - 日志信息
func (*Log) Descriptor
deprecated
func (*Log) GetComponent ¶
func (*Log) GetCreatedAt ¶
func (*Log) GetLatency ¶
func (*Log) GetOperation ¶
func (*Log) GetRequest ¶
func (*Log) GetTraceId ¶
func (*Log) GetUsername ¶
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
func (*Log) ProtoReflect ¶
func (x *Log) ProtoReflect() protoreflect.Message
func (*Log) Validate ¶
Validate checks the field values on Log with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Log) ValidateAll ¶
ValidateAll checks the field values on Log with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LogMultiError, or nil if none found.
type LogMultiError ¶
type LogMultiError []error
LogMultiError is an error wrapping multiple validation errors returned by Log.ValidateAll() if the designated constraints aren't met.
func (LogMultiError) AllErrors ¶
func (m LogMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LogMultiError) Error ¶
func (m LogMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LogServiceClient ¶
type LogServiceClient interface { // 列表 GetLogList(ctx context.Context, in *GetLogListReq, opts ...grpc.CallOption) (*GetLogListPageRes, error) // 创建 CreateLog(ctx context.Context, in *CreateLogReq, opts ...grpc.CallOption) (*emptypb.Empty, error) }
LogServiceClient is the client API for LogService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
日志服务
func NewLogServiceClient ¶
func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient
type LogServiceHTTPClient ¶
type LogServiceHTTPClient interface { CreateLog(ctx context.Context, req *CreateLogReq, opts ...http.CallOption) (rsp *emptypb.Empty, err error) GetLogList(ctx context.Context, req *GetLogListReq, opts ...http.CallOption) (rsp *GetLogListPageRes, err error) }
func NewLogServiceHTTPClient ¶
func NewLogServiceHTTPClient(client *http.Client) LogServiceHTTPClient
type LogServiceHTTPClientImpl ¶
type LogServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*LogServiceHTTPClientImpl) CreateLog ¶
func (c *LogServiceHTTPClientImpl) CreateLog(ctx context.Context, in *CreateLogReq, opts ...http.CallOption) (*emptypb.Empty, error)
func (*LogServiceHTTPClientImpl) GetLogList ¶
func (c *LogServiceHTTPClientImpl) GetLogList(ctx context.Context, in *GetLogListReq, opts ...http.CallOption) (*GetLogListPageRes, error)
type LogServiceHTTPServer ¶
type LogServiceHTTPServer interface { // CreateLog 创建 CreateLog(context.Context, *CreateLogReq) (*emptypb.Empty, error) // GetLogList 列表 GetLogList(context.Context, *GetLogListReq) (*GetLogListPageRes, error) }
type LogServiceServer ¶
type LogServiceServer interface { // 列表 GetLogList(context.Context, *GetLogListReq) (*GetLogListPageRes, error) // 创建 CreateLog(context.Context, *CreateLogReq) (*emptypb.Empty, error) // contains filtered or unexported methods }
LogServiceServer is the server API for LogService service. All implementations must embed UnimplementedLogServiceServer for forward compatibility.
日志服务
type LogValidationError ¶
type LogValidationError struct {
// contains filtered or unexported fields
}
LogValidationError is the validation error returned by Log.Validate if the designated constraints aren't met.
func (LogValidationError) Cause ¶
func (e LogValidationError) Cause() error
Cause function returns cause value.
func (LogValidationError) Error ¶
func (e LogValidationError) Error() string
Error satisfies the builtin error interface
func (LogValidationError) ErrorName ¶
func (e LogValidationError) ErrorName() string
ErrorName returns error name.
func (LogValidationError) Field ¶
func (e LogValidationError) Field() string
Field function returns field value.
func (LogValidationError) Key ¶
func (e LogValidationError) Key() bool
Key function returns key value.
func (LogValidationError) Reason ¶
func (e LogValidationError) Reason() string
Reason function returns reason value.
type UnimplementedLogServiceServer ¶
type UnimplementedLogServiceServer struct{}
UnimplementedLogServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedLogServiceServer) CreateLog ¶
func (UnimplementedLogServiceServer) CreateLog(context.Context, *CreateLogReq) (*emptypb.Empty, error)
func (UnimplementedLogServiceServer) GetLogList ¶
func (UnimplementedLogServiceServer) GetLogList(context.Context, *GetLogListReq) (*GetLogListPageRes, error)
type UnsafeLogServiceServer ¶
type UnsafeLogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogServiceServer will result in compilation errors.