protos

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

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_pitaya_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

Functions

func RegisterPitayaServer

func RegisterPitayaServer(s *grpc.Server, srv PitayaServer)

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 added in v1.1.2

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

func (*BindMsg) Reset

func (x *BindMsg) Reset()

func (*BindMsg) String

func (x *BindMsg) String() string

type Doc added in v0.7.6

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

func (*Doc) Descriptor deprecated added in v0.7.6

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

Deprecated: Use Doc.ProtoReflect.Descriptor instead.

func (*Doc) GetDoc added in v0.7.6

func (x *Doc) GetDoc() string

func (*Doc) ProtoMessage added in v0.7.6

func (*Doc) ProtoMessage()

func (*Doc) ProtoReflect added in v1.1.2

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

func (*Doc) Reset added in v0.7.6

func (x *Doc) Reset()

func (*Doc) String added in v0.7.6

func (x *Doc) String() string

type DocMsg added in v0.7.6

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

func (*DocMsg) Descriptor deprecated added in v0.7.6

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

Deprecated: Use DocMsg.ProtoReflect.Descriptor instead.

func (*DocMsg) GetGetProtos added in v0.7.6

func (x *DocMsg) GetGetProtos() bool

func (*DocMsg) ProtoMessage added in v0.7.6

func (*DocMsg) ProtoMessage()

func (*DocMsg) ProtoReflect added in v1.1.2

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

func (*DocMsg) Reset added in v0.7.6

func (x *DocMsg) Reset()

func (*DocMsg) String added in v0.7.6

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 `` /* 157-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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

func (MsgType) Descriptor() protoreflect.EnumDescriptor

func (MsgType) Enum added in v1.1.2

func (x MsgType) Enum() *MsgType

func (MsgType) EnumDescriptor deprecated

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

Deprecated: Use MsgType.Descriptor instead.

func (MsgType) Number added in v1.1.2

func (x MsgType) Number() protoreflect.EnumNumber

func (MsgType) String

func (x MsgType) String() string

func (MsgType) Type added in v1.1.2

func (MsgType) Type() protoreflect.EnumType

type PitayaClient

type PitayaClient 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)
}

PitayaClient is the client API for Pitaya service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPitayaClient

func NewPitayaClient(cc grpc.ClientConnInterface) PitayaClient

type PitayaServer

type PitayaServer 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)
}

PitayaServer is the server API for Pitaya service.

type ProtoDescriptor added in v0.7.6

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 added in v0.7.6

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

Deprecated: Use ProtoDescriptor.ProtoReflect.Descriptor instead.

func (*ProtoDescriptor) GetDesc added in v0.7.6

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

func (*ProtoDescriptor) ProtoMessage added in v0.7.6

func (*ProtoDescriptor) ProtoMessage()

func (*ProtoDescriptor) ProtoReflect added in v1.1.2

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

func (*ProtoDescriptor) Reset added in v0.7.6

func (x *ProtoDescriptor) Reset()

func (*ProtoDescriptor) String added in v0.7.6

func (x *ProtoDescriptor) String() string

type ProtoDescriptors added in v0.7.6

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

func (*ProtoDescriptors) Descriptor deprecated added in v0.7.6

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

Deprecated: Use ProtoDescriptors.ProtoReflect.Descriptor instead.

func (*ProtoDescriptors) GetDesc added in v0.7.6

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

func (*ProtoDescriptors) ProtoMessage added in v0.7.6

func (*ProtoDescriptors) ProtoMessage()

func (*ProtoDescriptors) ProtoReflect added in v1.1.2

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

func (*ProtoDescriptors) Reset added in v0.7.6

func (x *ProtoDescriptors) Reset()

func (*ProtoDescriptors) String added in v0.7.6

func (x *ProtoDescriptors) String() string

type ProtoName added in v0.7.6

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

func (*ProtoName) Descriptor deprecated added in v0.7.6

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

Deprecated: Use ProtoName.ProtoReflect.Descriptor instead.

func (*ProtoName) GetName added in v0.7.6

func (x *ProtoName) GetName() string

func (*ProtoName) ProtoMessage added in v0.7.6

func (*ProtoName) ProtoMessage()

func (*ProtoName) ProtoReflect added in v1.1.2

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

func (*ProtoName) Reset added in v0.7.6

func (x *ProtoName) Reset()

func (*ProtoName) String added in v0.7.6

func (x *ProtoName) String() string

type ProtoNames added in v0.7.6

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

func (*ProtoNames) Descriptor deprecated added in v0.7.6

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

Deprecated: Use ProtoNames.ProtoReflect.Descriptor instead.

func (*ProtoNames) GetName added in v0.7.6

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

func (*ProtoNames) ProtoMessage added in v0.7.6

func (*ProtoNames) ProtoMessage()

func (*ProtoNames) ProtoReflect added in v1.1.2

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

func (*ProtoNames) Reset added in v0.7.6

func (x *ProtoNames) Reset()

func (*ProtoNames) String added in v0.7.6

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 added in v1.1.2

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 added in v1.1.2

func (RPCType) Descriptor() protoreflect.EnumDescriptor

func (RPCType) Enum added in v1.1.2

func (x RPCType) Enum() *RPCType

func (RPCType) EnumDescriptor deprecated

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

Deprecated: Use RPCType.Descriptor instead.

func (RPCType) Number added in v1.1.2

func (x RPCType) Number() protoreflect.EnumNumber

func (RPCType) String

func (x RPCType) String() string

func (RPCType) Type added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type UnimplementedPitayaServer added in v1.1.2

type UnimplementedPitayaServer struct {
}

UnimplementedPitayaServer can be embedded to have forward compatible implementations.

func (*UnimplementedPitayaServer) Call added in v1.1.2

func (*UnimplementedPitayaServer) KickUser added in v1.1.2

func (*UnimplementedPitayaServer) PushToUser added in v1.1.2

func (*UnimplementedPitayaServer) SessionBindRemote added in v1.1.2

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

Directories

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

Jump to

Keyboard shortcuts

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