puzzlesessionservice

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 5

README

puzzlesessionservice

service description to interract with session

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_session_proto protoreflect.FileDescriptor
View Source
var Session_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "puzzlesessionservice.Session",
	HandlerType: (*SessionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Generate",
			Handler:    _Session_Generate_Handler,
		},
		{
			MethodName: "GetSessionInfo",
			Handler:    _Session_GetSessionInfo_Handler,
		},
		{
			MethodName: "UpdateSessionInfo",
			Handler:    _Session_UpdateSessionInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "session.proto",
}

Session_ServiceDesc is the grpc.ServiceDesc for Session service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSessionServer

func RegisterSessionServer(s grpc.ServiceRegistrar, srv SessionServer)

Types

type Response added in v1.2.0

type Response struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated added in v1.2.0

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetSuccess added in v1.2.0

func (x *Response) GetSuccess() bool

func (*Response) ProtoMessage added in v1.2.0

func (*Response) ProtoMessage()

func (*Response) ProtoReflect added in v1.2.0

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

func (*Response) Reset added in v1.2.0

func (x *Response) Reset()

func (*Response) String added in v1.2.0

func (x *Response) String() string

type SessionClient

type SessionClient interface {
	// generate sessionId
	Generate(ctx context.Context, in *SessionInfo, opts ...grpc.CallOption) (*SessionId, error)
	GetSessionInfo(ctx context.Context, in *SessionId, opts ...grpc.CallOption) (*SessionInfo, error)
	UpdateSessionInfo(ctx context.Context, in *SessionUpdate, opts ...grpc.CallOption) (*Response, error)
}

SessionClient is the client API for Session 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 NewSessionClient

func NewSessionClient(cc grpc.ClientConnInterface) SessionClient

type SessionId

type SessionId struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionId) Descriptor deprecated

func (*SessionId) Descriptor() ([]byte, []int)

Deprecated: Use SessionId.ProtoReflect.Descriptor instead.

func (*SessionId) GetId

func (x *SessionId) GetId() uint64

func (*SessionId) ProtoMessage

func (*SessionId) ProtoMessage()

func (*SessionId) ProtoReflect

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

func (*SessionId) Reset

func (x *SessionId) Reset()

func (*SessionId) String

func (x *SessionId) String() string

type SessionInfo

type SessionInfo struct {
	Info map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SessionInfo) Descriptor deprecated

func (*SessionInfo) Descriptor() ([]byte, []int)

Deprecated: Use SessionInfo.ProtoReflect.Descriptor instead.

func (*SessionInfo) GetInfo

func (x *SessionInfo) GetInfo() map[string]string

func (*SessionInfo) ProtoMessage

func (*SessionInfo) ProtoMessage()

func (*SessionInfo) ProtoReflect

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

func (*SessionInfo) Reset

func (x *SessionInfo) Reset()

func (*SessionInfo) String

func (x *SessionInfo) String() string

type SessionServer

type SessionServer interface {
	// generate sessionId
	Generate(context.Context, *SessionInfo) (*SessionId, error)
	GetSessionInfo(context.Context, *SessionId) (*SessionInfo, error)
	UpdateSessionInfo(context.Context, *SessionUpdate) (*Response, error)
	// contains filtered or unexported methods
}

SessionServer is the server API for Session service. All implementations must embed UnimplementedSessionServer for forward compatibility

type SessionUpdate

type SessionUpdate struct {
	Id   uint64            `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Info map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SessionUpdate) Descriptor deprecated

func (*SessionUpdate) Descriptor() ([]byte, []int)

Deprecated: Use SessionUpdate.ProtoReflect.Descriptor instead.

func (*SessionUpdate) GetId

func (x *SessionUpdate) GetId() uint64

func (*SessionUpdate) GetInfo

func (x *SessionUpdate) GetInfo() map[string]string

func (*SessionUpdate) ProtoMessage

func (*SessionUpdate) ProtoMessage()

func (*SessionUpdate) ProtoReflect

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

func (*SessionUpdate) Reset

func (x *SessionUpdate) Reset()

func (*SessionUpdate) String

func (x *SessionUpdate) String() string

type UnimplementedSessionServer

type UnimplementedSessionServer struct {
}

UnimplementedSessionServer must be embedded to have forward compatible implementations.

func (UnimplementedSessionServer) Generate

func (UnimplementedSessionServer) GetSessionInfo

func (UnimplementedSessionServer) UpdateSessionInfo

type UnsafeSessionServer

type UnsafeSessionServer interface {
	// contains filtered or unexported methods
}

UnsafeSessionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SessionServer will result in compilation errors.

Jump to

Keyboard shortcuts

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