protos

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 5 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",
}
View Source
var MsgType_value = map[string]int32{
	"MsgRequest":  0,
	"MsgNotify":   1,
	"MsgResponse": 2,
	"MsgPush":     3,
}
View Source
var RPCType_name = map[int32]string{
	0: "Sys",
	1: "User",
}
View Source
var RPCType_value = map[string]int32{
	"Sys":  0,
	"User": 1,
}

Functions

func RegisterPitayaServer

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

Types

type BindMsg

type BindMsg struct {
	Uid                  string   `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"`
	Fid                  string   `protobuf:"bytes,2,opt,name=fid" json:"fid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BindMsg) Descriptor

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

func (*BindMsg) GetFid

func (m *BindMsg) GetFid() string

func (*BindMsg) GetUid

func (m *BindMsg) GetUid() string

func (*BindMsg) ProtoMessage

func (*BindMsg) ProtoMessage()

func (*BindMsg) Reset

func (m *BindMsg) Reset()

func (*BindMsg) String

func (m *BindMsg) String() string

func (*BindMsg) XXX_DiscardUnknown

func (m *BindMsg) XXX_DiscardUnknown()

func (*BindMsg) XXX_Marshal

func (m *BindMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BindMsg) XXX_Merge

func (dst *BindMsg) XXX_Merge(src proto.Message)

func (*BindMsg) XXX_Size

func (m *BindMsg) XXX_Size() int

func (*BindMsg) XXX_Unmarshal

func (m *BindMsg) XXX_Unmarshal(b []byte) error

type Doc

type Doc struct {
	Doc                  string   `protobuf:"bytes,1,opt,name=doc" json:"doc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Doc) Descriptor

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

func (*Doc) GetDoc

func (m *Doc) GetDoc() string

func (*Doc) ProtoMessage

func (*Doc) ProtoMessage()

func (*Doc) Reset

func (m *Doc) Reset()

func (*Doc) String

func (m *Doc) String() string

func (*Doc) XXX_DiscardUnknown

func (m *Doc) XXX_DiscardUnknown()

func (*Doc) XXX_Marshal

func (m *Doc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Doc) XXX_Merge

func (dst *Doc) XXX_Merge(src proto.Message)

func (*Doc) XXX_Size

func (m *Doc) XXX_Size() int

func (*Doc) XXX_Unmarshal

func (m *Doc) XXX_Unmarshal(b []byte) error

type DocMsg

type DocMsg struct {
	GetProtos            bool     `protobuf:"varint,1,opt,name=getProtos" json:"getProtos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DocMsg) Descriptor

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

func (*DocMsg) GetGetProtos

func (m *DocMsg) GetGetProtos() bool

func (*DocMsg) ProtoMessage

func (*DocMsg) ProtoMessage()

func (*DocMsg) Reset

func (m *DocMsg) Reset()

func (*DocMsg) String

func (m *DocMsg) String() string

func (*DocMsg) XXX_DiscardUnknown

func (m *DocMsg) XXX_DiscardUnknown()

func (*DocMsg) XXX_Marshal

func (m *DocMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DocMsg) XXX_Merge

func (dst *DocMsg) XXX_Merge(src proto.Message)

func (*DocMsg) XXX_Size

func (m *DocMsg) XXX_Size() int

func (*DocMsg) XXX_Unmarshal

func (m *DocMsg) XXX_Unmarshal(b []byte) error

type Error

type Error struct {
	Code                 string            `protobuf:"bytes,1,opt,name=code" json:"code,omitempty"`
	Msg                  string            `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
	Metadata             map[string]string `` /* 136-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Error) Descriptor

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

func (*Error) GetCode

func (m *Error) GetCode() string

func (*Error) GetMetadata

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

func (*Error) GetMsg

func (m *Error) GetMsg() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (dst *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error

type KickAnswer

type KickAnswer struct {
	Kicked               bool     `protobuf:"varint,1,opt,name=kicked" json:"kicked,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KickAnswer) Descriptor

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

func (*KickAnswer) GetKicked

func (m *KickAnswer) GetKicked() bool

func (*KickAnswer) ProtoMessage

func (*KickAnswer) ProtoMessage()

func (*KickAnswer) Reset

func (m *KickAnswer) Reset()

func (*KickAnswer) String

func (m *KickAnswer) String() string

func (*KickAnswer) XXX_DiscardUnknown

func (m *KickAnswer) XXX_DiscardUnknown()

func (*KickAnswer) XXX_Marshal

func (m *KickAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KickAnswer) XXX_Merge

func (dst *KickAnswer) XXX_Merge(src proto.Message)

func (*KickAnswer) XXX_Size

func (m *KickAnswer) XXX_Size() int

func (*KickAnswer) XXX_Unmarshal

func (m *KickAnswer) XXX_Unmarshal(b []byte) error

type KickMsg

type KickMsg struct {
	UserId               string   `protobuf:"bytes,1,opt,name=userId" json:"userId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KickMsg) Descriptor

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

func (*KickMsg) GetUserId

func (m *KickMsg) GetUserId() string

func (*KickMsg) ProtoMessage

func (*KickMsg) ProtoMessage()

func (*KickMsg) Reset

func (m *KickMsg) Reset()

func (*KickMsg) String

func (m *KickMsg) String() string

func (*KickMsg) XXX_DiscardUnknown

func (m *KickMsg) XXX_DiscardUnknown()

func (*KickMsg) XXX_Marshal

func (m *KickMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KickMsg) XXX_Merge

func (dst *KickMsg) XXX_Merge(src proto.Message)

func (*KickMsg) XXX_Size

func (m *KickMsg) XXX_Size() int

func (*KickMsg) XXX_Unmarshal

func (m *KickMsg) XXX_Unmarshal(b []byte) error

type Msg

type Msg struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Route                string   `protobuf:"bytes,2,opt,name=route" json:"route,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Reply                string   `protobuf:"bytes,4,opt,name=reply" json:"reply,omitempty"`
	Type                 MsgType  `protobuf:"varint,5,opt,name=type,enum=protos.MsgType" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Msg) Descriptor

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

func (*Msg) GetData

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

func (*Msg) GetId

func (m *Msg) GetId() uint64

func (*Msg) GetReply

func (m *Msg) GetReply() string

func (*Msg) GetRoute

func (m *Msg) GetRoute() string

func (*Msg) GetType

func (m *Msg) GetType() MsgType

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) Reset

func (m *Msg) Reset()

func (*Msg) String

func (m *Msg) String() string

func (*Msg) XXX_DiscardUnknown

func (m *Msg) XXX_DiscardUnknown()

func (*Msg) XXX_Marshal

func (m *Msg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Msg) XXX_Merge

func (dst *Msg) XXX_Merge(src proto.Message)

func (*Msg) XXX_Size

func (m *Msg) XXX_Size() int

func (*Msg) XXX_Unmarshal

func (m *Msg) XXX_Unmarshal(b []byte) error

type MsgType

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

func (MsgType) EnumDescriptor

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

func (MsgType) String

func (x MsgType) String() string

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.ClientConn) 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

type ProtoDescriptor struct {
	Desc                 []byte   `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Descriptor proto used to retrieve zipped proto descriptors remotely

func (*ProtoDescriptor) Descriptor

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

func (*ProtoDescriptor) GetDesc

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

func (*ProtoDescriptor) ProtoMessage

func (*ProtoDescriptor) ProtoMessage()

func (*ProtoDescriptor) Reset

func (m *ProtoDescriptor) Reset()

func (*ProtoDescriptor) String

func (m *ProtoDescriptor) String() string

func (*ProtoDescriptor) XXX_DiscardUnknown

func (m *ProtoDescriptor) XXX_DiscardUnknown()

func (*ProtoDescriptor) XXX_Marshal

func (m *ProtoDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProtoDescriptor) XXX_Merge

func (dst *ProtoDescriptor) XXX_Merge(src proto.Message)

func (*ProtoDescriptor) XXX_Size

func (m *ProtoDescriptor) XXX_Size() int

func (*ProtoDescriptor) XXX_Unmarshal

func (m *ProtoDescriptor) XXX_Unmarshal(b []byte) error

type ProtoDescriptors

type ProtoDescriptors struct {
	Desc                 [][]byte `protobuf:"bytes,1,rep,name=desc,proto3" json:"desc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProtoDescriptors) Descriptor

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

func (*ProtoDescriptors) GetDesc

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

func (*ProtoDescriptors) ProtoMessage

func (*ProtoDescriptors) ProtoMessage()

func (*ProtoDescriptors) Reset

func (m *ProtoDescriptors) Reset()

func (*ProtoDescriptors) String

func (m *ProtoDescriptors) String() string

func (*ProtoDescriptors) XXX_DiscardUnknown

func (m *ProtoDescriptors) XXX_DiscardUnknown()

func (*ProtoDescriptors) XXX_Marshal

func (m *ProtoDescriptors) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProtoDescriptors) XXX_Merge

func (dst *ProtoDescriptors) XXX_Merge(src proto.Message)

func (*ProtoDescriptors) XXX_Size

func (m *ProtoDescriptors) XXX_Size() int

func (*ProtoDescriptors) XXX_Unmarshal

func (m *ProtoDescriptors) XXX_Unmarshal(b []byte) error

type ProtoName

type ProtoName struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProtoName) Descriptor

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

func (*ProtoName) GetName

func (m *ProtoName) GetName() string

func (*ProtoName) ProtoMessage

func (*ProtoName) ProtoMessage()

func (*ProtoName) Reset

func (m *ProtoName) Reset()

func (*ProtoName) String

func (m *ProtoName) String() string

func (*ProtoName) XXX_DiscardUnknown

func (m *ProtoName) XXX_DiscardUnknown()

func (*ProtoName) XXX_Marshal

func (m *ProtoName) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProtoName) XXX_Merge

func (dst *ProtoName) XXX_Merge(src proto.Message)

func (*ProtoName) XXX_Size

func (m *ProtoName) XXX_Size() int

func (*ProtoName) XXX_Unmarshal

func (m *ProtoName) XXX_Unmarshal(b []byte) error

type ProtoNames

type ProtoNames struct {
	Name                 []string `protobuf:"bytes,1,rep,name=name" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProtoNames) Descriptor

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

func (*ProtoNames) GetName

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

func (*ProtoNames) ProtoMessage

func (*ProtoNames) ProtoMessage()

func (*ProtoNames) Reset

func (m *ProtoNames) Reset()

func (*ProtoNames) String

func (m *ProtoNames) String() string

func (*ProtoNames) XXX_DiscardUnknown

func (m *ProtoNames) XXX_DiscardUnknown()

func (*ProtoNames) XXX_Marshal

func (m *ProtoNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProtoNames) XXX_Merge

func (dst *ProtoNames) XXX_Merge(src proto.Message)

func (*ProtoNames) XXX_Size

func (m *ProtoNames) XXX_Size() int

func (*ProtoNames) XXX_Unmarshal

func (m *ProtoNames) XXX_Unmarshal(b []byte) error

type Push

type Push struct {
	Route                string   `protobuf:"bytes,1,opt,name=route" json:"route,omitempty"`
	Uid                  string   `protobuf:"bytes,2,opt,name=uid" json:"uid,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Push) Descriptor

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

func (*Push) GetData

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

func (*Push) GetRoute

func (m *Push) GetRoute() string

func (*Push) GetUid

func (m *Push) GetUid() string

func (*Push) ProtoMessage

func (*Push) ProtoMessage()

func (*Push) Reset

func (m *Push) Reset()

func (*Push) String

func (m *Push) String() string

func (*Push) XXX_DiscardUnknown

func (m *Push) XXX_DiscardUnknown()

func (*Push) XXX_Marshal

func (m *Push) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Push) XXX_Merge

func (dst *Push) XXX_Merge(src proto.Message)

func (*Push) XXX_Size

func (m *Push) XXX_Size() int

func (*Push) XXX_Unmarshal

func (m *Push) XXX_Unmarshal(b []byte) error

type RPCType

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

func (RPCType) EnumDescriptor

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

func (RPCType) String

func (x RPCType) String() string

type Request

type Request struct {
	Type                 RPCType  `protobuf:"varint,1,opt,name=type,enum=protos.RPCType" json:"type,omitempty"`
	Session              *Session `protobuf:"bytes,2,opt,name=session" json:"session,omitempty"`
	Msg                  *Msg     `protobuf:"bytes,3,opt,name=msg" json:"msg,omitempty"`
	FrontendID           string   `protobuf:"bytes,4,opt,name=frontendID" json:"frontendID,omitempty"`
	Metadata             []byte   `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Request) Descriptor

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

func (*Request) GetFrontendID

func (m *Request) GetFrontendID() string

func (*Request) GetMetadata

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

func (*Request) GetMsg

func (m *Request) GetMsg() *Msg

func (*Request) GetSession

func (m *Request) GetSession() *Session

func (*Request) GetType

func (m *Request) GetType() RPCType

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (dst *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

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" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetData

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

func (*Response) GetError

func (m *Response) GetError() *Error

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type Session

type Session struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Uid                  string   `protobuf:"bytes,2,opt,name=uid" json:"uid,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Session) Descriptor

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

func (*Session) GetData

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

func (*Session) GetId

func (m *Session) GetId() int64

func (*Session) GetUid

func (m *Session) GetUid() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) Reset

func (m *Session) Reset()

func (*Session) String

func (m *Session) String() string

func (*Session) XXX_DiscardUnknown

func (m *Session) XXX_DiscardUnknown()

func (*Session) XXX_Marshal

func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Session) XXX_Merge

func (dst *Session) XXX_Merge(src proto.Message)

func (*Session) XXX_Size

func (m *Session) XXX_Size() int

func (*Session) XXX_Unmarshal

func (m *Session) XXX_Unmarshal(b []byte) error

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