sessions_service_go_grpc

package
v0.0.0-...-b4b79d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_sessions_service_go_grpc_sessions_service_proto protoreflect.FileDescriptor
View Source
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) EndAll

func (UnimplementedSessionsServer) Validate

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId

func (x *User) GetId() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL