Documentation ¶
Index ¶
- Variables
- func RegisterSessionsServer(s grpc.ServiceRegistrar, srv SessionsServer)
- type SessionData
- func (*SessionData) Descriptor() ([]byte, []int)deprecated
- func (x *SessionData) GetAgent() string
- func (x *SessionData) GetIp() string
- func (x *SessionData) GetKey() string
- func (*SessionData) ProtoMessage()
- func (x *SessionData) ProtoReflect() protoreflect.Message
- func (x *SessionData) Reset()
- func (x *SessionData) String() string
- type SessionsClient
- type SessionsServer
- type UnimplementedSessionsServer
- type UnsafeSessionsServer
- type User
- type ValidationResult
Constants ¶
This section is empty.
Variables ¶
var File_sessions_service_go_grpc_sessions_service_proto protoreflect.FileDescriptor
var Sessions_ServiceDesc = grpc.ServiceDesc{ ServiceName: "msg.sessions.Sessions", HandlerType: (*SessionsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Validate", Handler: _Sessions_Validate_Handler, }, { MethodName: "EndAll", Handler: _Sessions_EndAll_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sessions_service_go_grpc/sessions_service.proto", }
Sessions_ServiceDesc is the grpc.ServiceDesc for Sessions service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSessionsServer ¶
func RegisterSessionsServer(s grpc.ServiceRegistrar, srv SessionsServer)
Types ¶
type SessionData ¶
type SessionData struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` Agent string `protobuf:"bytes,3,opt,name=agent,proto3" json:"agent,omitempty"` // contains filtered or unexported fields }
func (*SessionData) Descriptor
deprecated
func (*SessionData) Descriptor() ([]byte, []int)
Deprecated: Use SessionData.ProtoReflect.Descriptor instead.
func (*SessionData) GetAgent ¶
func (x *SessionData) GetAgent() string
func (*SessionData) GetIp ¶
func (x *SessionData) GetIp() string
func (*SessionData) GetKey ¶
func (x *SessionData) GetKey() string
func (*SessionData) ProtoMessage ¶
func (*SessionData) ProtoMessage()
func (*SessionData) ProtoReflect ¶
func (x *SessionData) ProtoReflect() protoreflect.Message
func (*SessionData) Reset ¶
func (x *SessionData) Reset()
func (*SessionData) String ¶
func (x *SessionData) String() string
type SessionsClient ¶
type SessionsClient interface { Validate(ctx context.Context, in *SessionData, opts ...grpc.CallOption) (*ValidationResult, error) EndAll(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) }
SessionsClient is the client API for Sessions 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 NewSessionsClient ¶
func NewSessionsClient(cc grpc.ClientConnInterface) SessionsClient
type SessionsServer ¶
type SessionsServer interface { Validate(context.Context, *SessionData) (*ValidationResult, error) EndAll(context.Context, *User) (*emptypb.Empty, error) // contains filtered or unexported methods }
SessionsServer is the server API for Sessions service. All implementations must embed UnimplementedSessionsServer for forward compatibility
type UnimplementedSessionsServer ¶
type UnimplementedSessionsServer struct { }
UnimplementedSessionsServer must be embedded to have forward compatible implementations.
func (UnimplementedSessionsServer) Validate ¶
func (UnimplementedSessionsServer) Validate(context.Context, *SessionData) (*ValidationResult, error)
type UnsafeSessionsServer ¶
type UnsafeSessionsServer interface {
// contains filtered or unexported methods
}
UnsafeSessionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SessionsServer will result in compilation errors.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type ValidationResult ¶
type ValidationResult struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*ValidationResult) Descriptor
deprecated
func (*ValidationResult) Descriptor() ([]byte, []int)
Deprecated: Use ValidationResult.ProtoReflect.Descriptor instead.
func (*ValidationResult) GetUser ¶
func (x *ValidationResult) GetUser() string
func (*ValidationResult) ProtoMessage ¶
func (*ValidationResult) ProtoMessage()
func (*ValidationResult) ProtoReflect ¶
func (x *ValidationResult) ProtoReflect() protoreflect.Message
func (*ValidationResult) Reset ¶
func (x *ValidationResult) Reset()
func (*ValidationResult) String ¶
func (x *ValidationResult) String() string