protos

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Nano_Call_FullMethodName              = "/protos.Nano/Call"
	Nano_PushToUser_FullMethodName        = "/protos.Nano/PushToUser"
	Nano_SessionBindRemote_FullMethodName = "/protos.Nano/SessionBindRemote"
	Nano_KickUser_FullMethodName          = "/protos.Nano/KickUser"
)

Variables

View Source
var (
	MsgType_name = map[int32]string{
		0: "MsgRequest",
		1: "MsgNotify",
		2: "MsgResponse",
		3: "MsgPush",
	}
	MsgType_value = map[string]int32{
		"MsgRequest":  0,
		"MsgNotify":   1,
		"MsgResponse": 2,
		"MsgPush":     3,
	}
)

Enum value maps for MsgType.

View Source
var (
	RPCType_name = map[int32]string{
		0: "Sys",
		1: "User",
	}
	RPCType_value = map[string]int32{
		"Sys":  0,
		"User": 1,
	}
)

Enum value maps for RPCType.

View Source
var File_docmsg_proto protoreflect.FileDescriptor
View Source
var File_error_proto protoreflect.FileDescriptor
View Source
var File_protodescriptor_proto protoreflect.FileDescriptor
View Source
var File_request_proto protoreflect.FileDescriptor
View Source
var File_response_proto protoreflect.FileDescriptor
View Source
var File_session_proto protoreflect.FileDescriptor
View Source
var Nano_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protos.Nano",
	HandlerType: (*NanoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Call",
			Handler:    _Nano_Call_Handler,
		},
		{
			MethodName: "PushToUser",
			Handler:    _Nano_PushToUser_Handler,
		},
		{
			MethodName: "SessionBindRemote",
			Handler:    _Nano_SessionBindRemote_Handler,
		},
		{
			MethodName: "KickUser",
			Handler:    _Nano_KickUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "nano.proto",
}

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

Functions

func RegisterNanoServer

func RegisterNanoServer(s grpc.ServiceRegistrar, srv NanoServer)

Types

type BindMsg

type BindMsg struct {
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Fid string `protobuf:"bytes,2,opt,name=fid,proto3" json:"fid,omitempty"`
	// contains filtered or unexported fields
}

func (*BindMsg) Descriptor deprecated

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

Deprecated: Use BindMsg.ProtoReflect.Descriptor instead.

func (*BindMsg) GetFid

func (x *BindMsg) GetFid() string

func (*BindMsg) GetUid

func (x *BindMsg) GetUid() string

func (*BindMsg) ProtoMessage

func (*BindMsg) ProtoMessage()

func (*BindMsg) ProtoReflect

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

func (*BindMsg) Reset

func (x *BindMsg) Reset()

func (*BindMsg) String

func (x *BindMsg) String() string

type Doc

type Doc struct {
	Doc string `protobuf:"bytes,1,opt,name=doc,proto3" json:"doc,omitempty"`
	// contains filtered or unexported fields
}

func (*Doc) Descriptor deprecated

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

Deprecated: Use Doc.ProtoReflect.Descriptor instead.

func (*Doc) GetDoc

func (x *Doc) GetDoc() string

func (*Doc) ProtoMessage

func (*Doc) ProtoMessage()

func (*Doc) ProtoReflect

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

func (*Doc) Reset

func (x *Doc) Reset()

func (*Doc) String

func (x *Doc) String() string

type DocMsg

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

func (*DocMsg) Descriptor deprecated

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

Deprecated: Use DocMsg.ProtoReflect.Descriptor instead.

func (*DocMsg) GetGetProtos

func (x *DocMsg) GetGetProtos() bool

func (*DocMsg) ProtoMessage

func (*DocMsg) ProtoMessage()

func (*DocMsg) ProtoReflect

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

func (*DocMsg) Reset

func (x *DocMsg) Reset()

func (*DocMsg) String

func (x *DocMsg) String() string

type Error

type Error struct {
	Code     string            `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg      string            `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Metadata map[string]string `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() string

func (*Error) GetMetadata

func (x *Error) GetMetadata() map[string]string

func (*Error) GetMsg

func (x *Error) GetMsg() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type KickAnswer

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

func (*KickAnswer) Descriptor deprecated

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

Deprecated: Use KickAnswer.ProtoReflect.Descriptor instead.

func (*KickAnswer) GetKicked

func (x *KickAnswer) GetKicked() bool

func (*KickAnswer) ProtoMessage

func (*KickAnswer) ProtoMessage()

func (*KickAnswer) ProtoReflect

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

func (*KickAnswer) Reset

func (x *KickAnswer) Reset()

func (*KickAnswer) String

func (x *KickAnswer) String() string

type KickMsg

type KickMsg struct {
	UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
	// contains filtered or unexported fields
}

func (*KickMsg) Descriptor deprecated

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

Deprecated: Use KickMsg.ProtoReflect.Descriptor instead.

func (*KickMsg) GetUserId

func (x *KickMsg) GetUserId() string

func (*KickMsg) ProtoMessage

func (*KickMsg) ProtoMessage()

func (*KickMsg) ProtoReflect

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

func (*KickMsg) Reset

func (x *KickMsg) Reset()

func (*KickMsg) String

func (x *KickMsg) String() string

type Msg

type Msg struct {
	Id    uint64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Route string  `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
	Data  []byte  `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Reply string  `protobuf:"bytes,4,opt,name=reply,proto3" json:"reply,omitempty"`
	Type  MsgType `protobuf:"varint,5,opt,name=type,proto3,enum=protos.MsgType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Msg) Descriptor deprecated

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

Deprecated: Use Msg.ProtoReflect.Descriptor instead.

func (*Msg) GetData

func (x *Msg) GetData() []byte

func (*Msg) GetId

func (x *Msg) GetId() uint64

func (*Msg) GetReply

func (x *Msg) GetReply() string

func (*Msg) GetRoute

func (x *Msg) GetRoute() string

func (*Msg) GetType

func (x *Msg) GetType() MsgType

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) ProtoReflect

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

func (*Msg) Reset

func (x *Msg) Reset()

func (*Msg) String

func (x *Msg) String() string

type MsgType

type MsgType int32
const (
	MsgType_MsgRequest  MsgType = 0
	MsgType_MsgNotify   MsgType = 1
	MsgType_MsgResponse MsgType = 2
	MsgType_MsgPush     MsgType = 3
)

func (MsgType) Descriptor

func (MsgType) Descriptor() protoreflect.EnumDescriptor

func (MsgType) Enum

func (x MsgType) Enum() *MsgType

func (MsgType) EnumDescriptor deprecated

func (MsgType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MsgType.Descriptor instead.

func (MsgType) Number

func (x MsgType) Number() protoreflect.EnumNumber

func (MsgType) String

func (x MsgType) String() string

func (MsgType) Type

func (MsgType) Type() protoreflect.EnumType

type NanoClient

type NanoClient interface {
	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	PushToUser(ctx context.Context, in *Push, opts ...grpc.CallOption) (*Response, error)
	SessionBindRemote(ctx context.Context, in *BindMsg, opts ...grpc.CallOption) (*Response, error)
	KickUser(ctx context.Context, in *KickMsg, opts ...grpc.CallOption) (*KickAnswer, error)
}

NanoClient is the client API for Nano 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 NewNanoClient

func NewNanoClient(cc grpc.ClientConnInterface) NanoClient

type NanoServer

type NanoServer interface {
	Call(context.Context, *Request) (*Response, error)
	PushToUser(context.Context, *Push) (*Response, error)
	SessionBindRemote(context.Context, *BindMsg) (*Response, error)
	KickUser(context.Context, *KickMsg) (*KickAnswer, error)
	// contains filtered or unexported methods
}

NanoServer is the server API for Nano service. All implementations must embed UnimplementedNanoServer for forward compatibility.

type ProtoDescriptor

type ProtoDescriptor struct {
	Desc []byte `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

Descriptor proto used to retrieve zipped proto descriptors remotely

func (*ProtoDescriptor) Descriptor deprecated

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

Deprecated: Use ProtoDescriptor.ProtoReflect.Descriptor instead.

func (*ProtoDescriptor) GetDesc

func (x *ProtoDescriptor) GetDesc() []byte

func (*ProtoDescriptor) ProtoMessage

func (*ProtoDescriptor) ProtoMessage()

func (*ProtoDescriptor) ProtoReflect

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

func (*ProtoDescriptor) Reset

func (x *ProtoDescriptor) Reset()

func (*ProtoDescriptor) String

func (x *ProtoDescriptor) String() string

type ProtoDescriptors

type ProtoDescriptors struct {
	Desc [][]byte `protobuf:"bytes,1,rep,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

func (*ProtoDescriptors) Descriptor deprecated

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

Deprecated: Use ProtoDescriptors.ProtoReflect.Descriptor instead.

func (*ProtoDescriptors) GetDesc

func (x *ProtoDescriptors) GetDesc() [][]byte

func (*ProtoDescriptors) ProtoMessage

func (*ProtoDescriptors) ProtoMessage()

func (*ProtoDescriptors) ProtoReflect

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

func (*ProtoDescriptors) Reset

func (x *ProtoDescriptors) Reset()

func (*ProtoDescriptors) String

func (x *ProtoDescriptors) String() string

type ProtoName

type ProtoName struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*ProtoName) Descriptor deprecated

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

Deprecated: Use ProtoName.ProtoReflect.Descriptor instead.

func (*ProtoName) GetName

func (x *ProtoName) GetName() string

func (*ProtoName) ProtoMessage

func (*ProtoName) ProtoMessage()

func (*ProtoName) ProtoReflect

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

func (*ProtoName) Reset

func (x *ProtoName) Reset()

func (*ProtoName) String

func (x *ProtoName) String() string

type ProtoNames

type ProtoNames struct {
	Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*ProtoNames) Descriptor deprecated

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

Deprecated: Use ProtoNames.ProtoReflect.Descriptor instead.

func (*ProtoNames) GetName

func (x *ProtoNames) GetName() []string

func (*ProtoNames) ProtoMessage

func (*ProtoNames) ProtoMessage()

func (*ProtoNames) ProtoReflect

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

func (*ProtoNames) Reset

func (x *ProtoNames) Reset()

func (*ProtoNames) String

func (x *ProtoNames) String() string

type Push

type Push struct {
	Route string `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"`
	Uid   string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Data  []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Push) Descriptor deprecated

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

Deprecated: Use Push.ProtoReflect.Descriptor instead.

func (*Push) GetData

func (x *Push) GetData() []byte

func (*Push) GetRoute

func (x *Push) GetRoute() string

func (*Push) GetUid

func (x *Push) GetUid() string

func (*Push) ProtoMessage

func (*Push) ProtoMessage()

func (*Push) ProtoReflect

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

func (*Push) Reset

func (x *Push) Reset()

func (*Push) String

func (x *Push) String() string

type RPCType

type RPCType int32
const (
	RPCType_Sys  RPCType = 0
	RPCType_User RPCType = 1
)

func (RPCType) Descriptor

func (RPCType) Descriptor() protoreflect.EnumDescriptor

func (RPCType) Enum

func (x RPCType) Enum() *RPCType

func (RPCType) EnumDescriptor deprecated

func (RPCType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RPCType.Descriptor instead.

func (RPCType) Number

func (x RPCType) Number() protoreflect.EnumNumber

func (RPCType) String

func (x RPCType) String() string

func (RPCType) Type

func (RPCType) Type() protoreflect.EnumType

type Request

type Request struct {
	Type       RPCType  `protobuf:"varint,1,opt,name=type,proto3,enum=protos.RPCType" json:"type,omitempty"`
	Session    *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
	Msg        *Msg     `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	FrontendID string   `protobuf:"bytes,4,opt,name=frontendID,proto3" json:"frontendID,omitempty"`
	Metadata   []byte   `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetFrontendID

func (x *Request) GetFrontendID() string

func (*Request) GetMetadata

func (x *Request) GetMetadata() []byte

func (*Request) GetMsg

func (x *Request) GetMsg() *Msg

func (*Request) GetSession

func (x *Request) GetSession() *Session

func (*Request) GetType

func (x *Request) GetType() RPCType

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Data  []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetData

func (x *Response) GetData() []byte

func (*Response) GetError

func (x *Response) GetError() *Error

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Session

type Session struct {
	Id   int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Uid  string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetData

func (x *Session) GetData() []byte

func (*Session) GetId

func (x *Session) GetId() int64

func (*Session) GetUid

func (x *Session) GetUid() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type UnimplementedNanoServer

type UnimplementedNanoServer struct{}

UnimplementedNanoServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedNanoServer) Call

func (UnimplementedNanoServer) KickUser

func (UnimplementedNanoServer) PushToUser

func (UnimplementedNanoServer) SessionBindRemote

func (UnimplementedNanoServer) SessionBindRemote(context.Context, *BindMsg) (*Response, error)

type UnsafeNanoServer

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

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

Directories

Path Synopsis
Package mock_protos is a generated GoMock package.
Package mock_protos is a generated GoMock package.

Jump to

Keyboard shortcuts

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