Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGrpcLogServiceServer(s grpc.ServiceRegistrar, srv GrpcLogServiceServer)
- type GrpcLogServiceClient
- type GrpcLogServiceServer
- type LogItem
- type LogRequest
- func (*LogRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LogRequest) GetAction() LogRequest_Actions
- func (x *LogRequest) GetEntity() LogRequest_Entities
- func (x *LogRequest) GetEntityId() int64
- func (x *LogRequest) GetLogMsgId() int64
- func (x *LogRequest) GetTimestamp() *timestamppb.Timestamp
- func (*LogRequest) ProtoMessage()
- func (x *LogRequest) ProtoReflect() protoreflect.Message
- func (x *LogRequest) Reset()
- func (x *LogRequest) String() string
- type LogRequest_Actions
- func (LogRequest_Actions) Descriptor() protoreflect.EnumDescriptor
- func (x LogRequest_Actions) Enum() *LogRequest_Actions
- func (LogRequest_Actions) EnumDescriptor() ([]byte, []int)deprecated
- func (x LogRequest_Actions) Number() protoreflect.EnumNumber
- func (x LogRequest_Actions) String() string
- func (LogRequest_Actions) Type() protoreflect.EnumType
- type LogRequest_Entities
- func (LogRequest_Entities) Descriptor() protoreflect.EnumDescriptor
- func (x LogRequest_Entities) Enum() *LogRequest_Entities
- func (LogRequest_Entities) EnumDescriptor() ([]byte, []int)deprecated
- func (x LogRequest_Entities) Number() protoreflect.EnumNumber
- func (x LogRequest_Entities) String() string
- func (LogRequest_Entities) Type() protoreflect.EnumType
- type Response
- type UnimplementedGrpcLogServiceServer
- type UnsafeGrpcLogServiceServer
Constants ¶
const ( ENTITY_USER = "USER" ENTITY_CHECKLIST = "CHECKLIST" ACTION_CREATE = "CREATE" ACTION_UPDATE = "UPDATE" ACTION_GET = "GET" ACTION_DELETE = "DELETE" ACTION_REGISTER = "REGISTER" ACTION_LOGIN = "LOGIN" )
Variables ¶
var ( LogRequest_Actions_name = map[int32]string{ 0: "REGISTER", 1: "LOGIN", 2: "CREATE", 3: "UPDATE", 4: "GET", 5: "DELETE", } LogRequest_Actions_value = map[string]int32{ "REGISTER": 0, "LOGIN": 1, "CREATE": 2, "UPDATE": 3, "GET": 4, "DELETE": 5, } )
Enum value maps for LogRequest_Actions.
var ( LogRequest_Entities_name = map[int32]string{ 0: "USER", 1: "CHECKLIST", } LogRequest_Entities_value = map[string]int32{ "USER": 0, "CHECKLIST": 1, } )
Enum value maps for LogRequest_Entities.
var File_pkg_domain_grpc_log_proto protoreflect.FileDescriptor
var GrpcLogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc_log.GrpcLogService", HandlerType: (*GrpcLogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Log", Handler: _GrpcLogService_Log_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/domain/grpc_log.proto", }
GrpcLogService_ServiceDesc is the grpc.ServiceDesc for GrpcLogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGrpcLogServiceServer ¶
func RegisterGrpcLogServiceServer(s grpc.ServiceRegistrar, srv GrpcLogServiceServer)
Types ¶
type GrpcLogServiceClient ¶
type GrpcLogServiceClient interface {
Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*Response, error)
}
GrpcLogServiceClient is the client API for GrpcLogService 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 NewGrpcLogServiceClient ¶
func NewGrpcLogServiceClient(cc grpc.ClientConnInterface) GrpcLogServiceClient
type GrpcLogServiceServer ¶
type GrpcLogServiceServer interface { Log(context.Context, *LogRequest) (*Response, error) // contains filtered or unexported methods }
GrpcLogServiceServer is the server API for GrpcLogService service. All implementations must embed UnimplementedGrpcLogServiceServer for forward compatibility
type LogRequest ¶
type LogRequest struct { LogMsgId int64 `protobuf:"varint,1,opt,name=log_msg_id,json=logMsgId,proto3" json:"log_msg_id,omitempty"` Action LogRequest_Actions `protobuf:"varint,2,opt,name=action,proto3,enum=grpc_log.LogRequest_Actions" json:"action,omitempty"` Entity LogRequest_Entities `protobuf:"varint,3,opt,name=entity,proto3,enum=grpc_log.LogRequest_Entities" json:"entity,omitempty"` EntityId int64 `protobuf:"varint,4,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*LogRequest) Descriptor
deprecated
func (*LogRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogRequest.ProtoReflect.Descriptor instead.
func (*LogRequest) GetAction ¶
func (x *LogRequest) GetAction() LogRequest_Actions
func (*LogRequest) GetEntity ¶
func (x *LogRequest) GetEntity() LogRequest_Entities
func (*LogRequest) GetEntityId ¶
func (x *LogRequest) GetEntityId() int64
func (*LogRequest) GetLogMsgId ¶
func (x *LogRequest) GetLogMsgId() int64
func (*LogRequest) GetTimestamp ¶
func (x *LogRequest) GetTimestamp() *timestamppb.Timestamp
func (*LogRequest) ProtoMessage ¶
func (*LogRequest) ProtoMessage()
func (*LogRequest) ProtoReflect ¶
func (x *LogRequest) ProtoReflect() protoreflect.Message
func (*LogRequest) Reset ¶
func (x *LogRequest) Reset()
func (*LogRequest) String ¶
func (x *LogRequest) String() string
type LogRequest_Actions ¶
type LogRequest_Actions int32
const ( LogRequest_REGISTER LogRequest_Actions = 0 LogRequest_LOGIN LogRequest_Actions = 1 LogRequest_CREATE LogRequest_Actions = 2 LogRequest_UPDATE LogRequest_Actions = 3 LogRequest_GET LogRequest_Actions = 4 LogRequest_DELETE LogRequest_Actions = 5 )
func ToPbAction ¶
func ToPbAction(action string) (LogRequest_Actions, error)
func (LogRequest_Actions) Descriptor ¶
func (LogRequest_Actions) Descriptor() protoreflect.EnumDescriptor
func (LogRequest_Actions) Enum ¶
func (x LogRequest_Actions) Enum() *LogRequest_Actions
func (LogRequest_Actions) EnumDescriptor
deprecated
func (LogRequest_Actions) EnumDescriptor() ([]byte, []int)
Deprecated: Use LogRequest_Actions.Descriptor instead.
func (LogRequest_Actions) Number ¶
func (x LogRequest_Actions) Number() protoreflect.EnumNumber
func (LogRequest_Actions) String ¶
func (x LogRequest_Actions) String() string
func (LogRequest_Actions) Type ¶
func (LogRequest_Actions) Type() protoreflect.EnumType
type LogRequest_Entities ¶
type LogRequest_Entities int32
const ( LogRequest_USER LogRequest_Entities = 0 LogRequest_CHECKLIST LogRequest_Entities = 1 )
func ToPbEntity ¶
func ToPbEntity(entity string) (LogRequest_Entities, error)
func (LogRequest_Entities) Descriptor ¶
func (LogRequest_Entities) Descriptor() protoreflect.EnumDescriptor
func (LogRequest_Entities) Enum ¶
func (x LogRequest_Entities) Enum() *LogRequest_Entities
func (LogRequest_Entities) EnumDescriptor
deprecated
func (LogRequest_Entities) EnumDescriptor() ([]byte, []int)
Deprecated: Use LogRequest_Entities.Descriptor instead.
func (LogRequest_Entities) Number ¶
func (x LogRequest_Entities) Number() protoreflect.EnumNumber
func (LogRequest_Entities) String ¶
func (x LogRequest_Entities) String() string
func (LogRequest_Entities) Type ¶
func (LogRequest_Entities) Type() protoreflect.EnumType
type Response ¶
type Response struct { LogMsgId int64 `protobuf:"varint,1,opt,name=log_msg_id,json=logMsgId,proto3" json:"log_msg_id,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetLogMsgId ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedGrpcLogServiceServer ¶
type UnimplementedGrpcLogServiceServer struct { }
UnimplementedGrpcLogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGrpcLogServiceServer) Log ¶
func (UnimplementedGrpcLogServiceServer) Log(context.Context, *LogRequest) (*Response, error)
type UnsafeGrpcLogServiceServer ¶
type UnsafeGrpcLogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGrpcLogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GrpcLogServiceServer will result in compilation errors.