Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterLogHTTPServer(s *http.Server, srv LogHTTPServer)
- func RegisterLogServer(s grpc.ServiceRegistrar, srv LogServer)
- 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) GetDomain() 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 GetLogListRep
- func (*GetLogListRep) Descriptor() ([]byte, []int)deprecated
- func (x *GetLogListRep) GetList() []*LogInfo
- func (x *GetLogListRep) GetTotal() int64
- func (*GetLogListRep) ProtoMessage()
- func (x *GetLogListRep) ProtoReflect() protoreflect.Message
- func (x *GetLogListRep) Reset()
- func (x *GetLogListRep) String() string
- func (m *GetLogListRep) Validate() error
- func (m *GetLogListRep) ValidateAll() error
- type GetLogListRepMultiError
- type GetLogListRepValidationError
- func (e GetLogListRepValidationError) Cause() error
- func (e GetLogListRepValidationError) Error() string
- func (e GetLogListRepValidationError) ErrorName() string
- func (e GetLogListRepValidationError) Field() string
- func (e GetLogListRepValidationError) Key() bool
- func (e GetLogListRepValidationError) 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 LogClient
- type LogHTTPClient
- type LogHTTPClientImpl
- type LogHTTPServer
- type LogInfo
- func (*LogInfo) Descriptor() ([]byte, []int)deprecated
- func (x *LogInfo) GetCode() string
- func (x *LogInfo) GetComponent() string
- func (x *LogInfo) GetCreatedAt() string
- func (x *LogInfo) GetId() int64
- func (x *LogInfo) GetIp() string
- func (x *LogInfo) GetLatency() string
- func (x *LogInfo) GetMethod() string
- func (x *LogInfo) GetName() string
- func (x *LogInfo) GetOperation() string
- func (x *LogInfo) GetPath() string
- func (x *LogInfo) GetReason() string
- func (x *LogInfo) GetRequest() string
- func (x *LogInfo) GetRole() string
- func (x *LogInfo) GetTraceId() string
- func (x *LogInfo) GetUserId() string
- func (x *LogInfo) GetUsername() string
- func (*LogInfo) ProtoMessage()
- func (x *LogInfo) ProtoReflect() protoreflect.Message
- func (x *LogInfo) Reset()
- func (x *LogInfo) String() string
- func (m *LogInfo) Validate() error
- func (m *LogInfo) ValidateAll() error
- type LogInfoMultiError
- type LogInfoValidationError
- type LogServer
- type RepStatus
- func (*RepStatus) Descriptor() ([]byte, []int)deprecated
- func (x *RepStatus) GetSuccess() bool
- func (*RepStatus) ProtoMessage()
- func (x *RepStatus) ProtoReflect() protoreflect.Message
- func (x *RepStatus) Reset()
- func (x *RepStatus) String() string
- func (m *RepStatus) Validate() error
- func (m *RepStatus) ValidateAll() error
- type RepStatusMultiError
- type RepStatusValidationError
- type UnimplementedLogServer
- type UnsafeLogServer
Constants ¶
const ( Log_CreateLog_FullMethodName = "/api.log.v1.Log/CreateLog" Log_GetLogList_FullMethodName = "/api.log.v1.Log/GetLogList" )
const OperationLogCreateLog = "/api.log.v1.Log/CreateLog"
const OperationLogGetLogList = "/api.log.v1.Log/GetLogList"
Variables ¶
var File_api_log_v1_log_proto protoreflect.FileDescriptor
var Log_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.log.v1.Log", HandlerType: (*LogServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateLog", Handler: _Log_CreateLog_Handler, }, { MethodName: "GetLogList", Handler: _Log_GetLogList_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "log/v1/log.proto", }
Log_ServiceDesc is the grpc.ServiceDesc for Log service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLogHTTPServer ¶
func RegisterLogHTTPServer(s *http.Server, srv LogHTTPServer)
func RegisterLogServer ¶
func RegisterLogServer(s grpc.ServiceRegistrar, srv LogServer)
Types ¶
type CreateLogReq ¶
type CreateLogReq struct { // domain Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,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"` // 表 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) GetDomain ¶ added in v0.0.46
func (x *CreateLogReq) GetDomain() 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 GetLogListRep ¶
type GetLogListRep struct { // 总数 Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 列表 List []*LogInfo `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
列表
func (*GetLogListRep) Descriptor
deprecated
func (*GetLogListRep) Descriptor() ([]byte, []int)
Deprecated: Use GetLogListRep.ProtoReflect.Descriptor instead.
func (*GetLogListRep) GetList ¶
func (x *GetLogListRep) GetList() []*LogInfo
func (*GetLogListRep) GetTotal ¶
func (x *GetLogListRep) GetTotal() int64
func (*GetLogListRep) ProtoMessage ¶
func (*GetLogListRep) ProtoMessage()
func (*GetLogListRep) ProtoReflect ¶
func (x *GetLogListRep) ProtoReflect() protoreflect.Message
func (*GetLogListRep) Reset ¶
func (x *GetLogListRep) Reset()
func (*GetLogListRep) String ¶
func (x *GetLogListRep) String() string
func (*GetLogListRep) Validate ¶
func (m *GetLogListRep) Validate() error
Validate checks the field values on GetLogListRep 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 (*GetLogListRep) ValidateAll ¶
func (m *GetLogListRep) ValidateAll() error
ValidateAll checks the field values on GetLogListRep 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 GetLogListRepMultiError, or nil if none found.
type GetLogListRepMultiError ¶
type GetLogListRepMultiError []error
GetLogListRepMultiError is an error wrapping multiple validation errors returned by GetLogListRep.ValidateAll() if the designated constraints aren't met.
func (GetLogListRepMultiError) AllErrors ¶
func (m GetLogListRepMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetLogListRepMultiError) Error ¶
func (m GetLogListRepMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetLogListRepValidationError ¶
type GetLogListRepValidationError struct {
// contains filtered or unexported fields
}
GetLogListRepValidationError is the validation error returned by GetLogListRep.Validate if the designated constraints aren't met.
func (GetLogListRepValidationError) Cause ¶
func (e GetLogListRepValidationError) Cause() error
Cause function returns cause value.
func (GetLogListRepValidationError) Error ¶
func (e GetLogListRepValidationError) Error() string
Error satisfies the builtin error interface
func (GetLogListRepValidationError) ErrorName ¶
func (e GetLogListRepValidationError) ErrorName() string
ErrorName returns error name.
func (GetLogListRepValidationError) Field ¶
func (e GetLogListRepValidationError) Field() string
Field function returns field value.
func (GetLogListRepValidationError) Key ¶
func (e GetLogListRepValidationError) Key() bool
Key function returns key value.
func (GetLogListRepValidationError) Reason ¶
func (e GetLogListRepValidationError) 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 LogClient ¶
type LogClient interface { // 创建日志 CreateLog(ctx context.Context, in *CreateLogReq, opts ...grpc.CallOption) (*RepStatus, error) // 获取日志列表 GetLogList(ctx context.Context, in *GetLogListReq, opts ...grpc.CallOption) (*GetLogListRep, error) }
LogClient is the client API for Log 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 NewLogClient ¶
func NewLogClient(cc grpc.ClientConnInterface) LogClient
type LogHTTPClient ¶
type LogHTTPClient interface { CreateLog(ctx context.Context, req *CreateLogReq, opts ...http.CallOption) (rsp *RepStatus, err error) GetLogList(ctx context.Context, req *GetLogListReq, opts ...http.CallOption) (rsp *GetLogListRep, err error) }
func NewLogHTTPClient ¶
func NewLogHTTPClient(client *http.Client) LogHTTPClient
type LogHTTPClientImpl ¶
type LogHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*LogHTTPClientImpl) CreateLog ¶
func (c *LogHTTPClientImpl) CreateLog(ctx context.Context, in *CreateLogReq, opts ...http.CallOption) (*RepStatus, error)
func (*LogHTTPClientImpl) GetLogList ¶
func (c *LogHTTPClientImpl) GetLogList(ctx context.Context, in *GetLogListReq, opts ...http.CallOption) (*GetLogListRep, error)
type LogHTTPServer ¶
type LogHTTPServer interface { // CreateLog 创建日志 CreateLog(context.Context, *CreateLogReq) (*RepStatus, error) // GetLogList 获取日志列表 GetLogList(context.Context, *GetLogListReq) (*GetLogListRep, error) }
type LogInfo ¶
type LogInfo 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 (*LogInfo) Descriptor
deprecated
func (*LogInfo) GetComponent ¶
func (*LogInfo) GetCreatedAt ¶
func (*LogInfo) GetLatency ¶
func (*LogInfo) GetOperation ¶
func (*LogInfo) GetRequest ¶
func (*LogInfo) GetTraceId ¶
func (*LogInfo) GetUsername ¶
func (*LogInfo) ProtoMessage ¶
func (*LogInfo) ProtoMessage()
func (*LogInfo) ProtoReflect ¶
func (x *LogInfo) ProtoReflect() protoreflect.Message
func (*LogInfo) Validate ¶
Validate checks the field values on LogInfo 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 (*LogInfo) ValidateAll ¶
ValidateAll checks the field values on LogInfo 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 LogInfoMultiError, or nil if none found.
type LogInfoMultiError ¶
type LogInfoMultiError []error
LogInfoMultiError is an error wrapping multiple validation errors returned by LogInfo.ValidateAll() if the designated constraints aren't met.
func (LogInfoMultiError) AllErrors ¶
func (m LogInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LogInfoMultiError) Error ¶
func (m LogInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LogInfoValidationError ¶
type LogInfoValidationError struct {
// contains filtered or unexported fields
}
LogInfoValidationError is the validation error returned by LogInfo.Validate if the designated constraints aren't met.
func (LogInfoValidationError) Cause ¶
func (e LogInfoValidationError) Cause() error
Cause function returns cause value.
func (LogInfoValidationError) Error ¶
func (e LogInfoValidationError) Error() string
Error satisfies the builtin error interface
func (LogInfoValidationError) ErrorName ¶
func (e LogInfoValidationError) ErrorName() string
ErrorName returns error name.
func (LogInfoValidationError) Field ¶
func (e LogInfoValidationError) Field() string
Field function returns field value.
func (LogInfoValidationError) Key ¶
func (e LogInfoValidationError) Key() bool
Key function returns key value.
func (LogInfoValidationError) Reason ¶
func (e LogInfoValidationError) Reason() string
Reason function returns reason value.
type LogServer ¶
type LogServer interface { // 创建日志 CreateLog(context.Context, *CreateLogReq) (*RepStatus, error) // 获取日志列表 GetLogList(context.Context, *GetLogListReq) (*GetLogListRep, error) // contains filtered or unexported methods }
LogServer is the server API for Log service. All implementations must embed UnimplementedLogServer for forward compatibility
type RepStatus ¶
type RepStatus struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
角色状态
func (*RepStatus) Descriptor
deprecated
func (*RepStatus) GetSuccess ¶
func (*RepStatus) ProtoMessage ¶
func (*RepStatus) ProtoMessage()
func (*RepStatus) ProtoReflect ¶
func (x *RepStatus) ProtoReflect() protoreflect.Message
func (*RepStatus) Validate ¶
Validate checks the field values on RepStatus 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 (*RepStatus) ValidateAll ¶
ValidateAll checks the field values on RepStatus 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 RepStatusMultiError, or nil if none found.
type RepStatusMultiError ¶
type RepStatusMultiError []error
RepStatusMultiError is an error wrapping multiple validation errors returned by RepStatus.ValidateAll() if the designated constraints aren't met.
func (RepStatusMultiError) AllErrors ¶
func (m RepStatusMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RepStatusMultiError) Error ¶
func (m RepStatusMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RepStatusValidationError ¶
type RepStatusValidationError struct {
// contains filtered or unexported fields
}
RepStatusValidationError is the validation error returned by RepStatus.Validate if the designated constraints aren't met.
func (RepStatusValidationError) Cause ¶
func (e RepStatusValidationError) Cause() error
Cause function returns cause value.
func (RepStatusValidationError) Error ¶
func (e RepStatusValidationError) Error() string
Error satisfies the builtin error interface
func (RepStatusValidationError) ErrorName ¶
func (e RepStatusValidationError) ErrorName() string
ErrorName returns error name.
func (RepStatusValidationError) Field ¶
func (e RepStatusValidationError) Field() string
Field function returns field value.
func (RepStatusValidationError) Key ¶
func (e RepStatusValidationError) Key() bool
Key function returns key value.
func (RepStatusValidationError) Reason ¶
func (e RepStatusValidationError) Reason() string
Reason function returns reason value.
type UnimplementedLogServer ¶
type UnimplementedLogServer struct { }
UnimplementedLogServer must be embedded to have forward compatible implementations.
func (UnimplementedLogServer) CreateLog ¶
func (UnimplementedLogServer) CreateLog(context.Context, *CreateLogReq) (*RepStatus, error)
func (UnimplementedLogServer) GetLogList ¶
func (UnimplementedLogServer) GetLogList(context.Context, *GetLogListReq) (*GetLogListRep, error)
type UnsafeLogServer ¶
type UnsafeLogServer interface {
// contains filtered or unexported methods
}
UnsafeLogServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogServer will result in compilation errors.