stationpb

package
v0.0.0-...-ae8612d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package stationpb is a generated protocol buffer package.

It is generated from these files:

github.com/molon/gomsg/internal/pb/stationpb/station.proto

It has these top-level messages:

ConnectRequest
ConnectResponse
DisconnectRequest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStationServer

func RegisterStationServer(s *grpc.Server, srv StationServer)

Types

type ConnectRequest

type ConnectRequest struct {
	// boat服务ID
	BoatId string `protobuf:"bytes,1,opt,name=boat_id,json=boatId" json:"boat_id,omitempty"`
	// 会话ID
	Sid string `protobuf:"bytes,2,opt,name=sid" json:"sid,omitempty"`
}

func (*ConnectRequest) Descriptor

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

func (*ConnectRequest) GetBoatId

func (m *ConnectRequest) GetBoatId() string

func (*ConnectRequest) GetSid

func (m *ConnectRequest) GetSid() string

func (*ConnectRequest) ProtoMessage

func (*ConnectRequest) ProtoMessage()

func (*ConnectRequest) Reset

func (m *ConnectRequest) Reset()

func (*ConnectRequest) String

func (m *ConnectRequest) String() string

type ConnectResponse

type ConnectResponse struct {
	// 用户ID
	Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"`
	// 平台名称
	Platform string `protobuf:"bytes,2,opt,name=platform" json:"platform,omitempty"`
}

func (*ConnectResponse) Descriptor

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

func (*ConnectResponse) GetPlatform

func (m *ConnectResponse) GetPlatform() string

func (*ConnectResponse) GetUid

func (m *ConnectResponse) GetUid() string

func (*ConnectResponse) ProtoMessage

func (*ConnectResponse) ProtoMessage()

func (*ConnectResponse) Reset

func (m *ConnectResponse) Reset()

func (*ConnectResponse) String

func (m *ConnectResponse) String() string

type DisconnectRequest

type DisconnectRequest struct {
	// boat服务ID
	BoatId string `protobuf:"bytes,1,opt,name=boat_id,json=boatId" json:"boat_id,omitempty"`
	// 会话ID
	Sid string `protobuf:"bytes,2,opt,name=sid" json:"sid,omitempty"`
	// 用户ID
	Uid string `protobuf:"bytes,3,opt,name=uid" json:"uid,omitempty"`
}

func (*DisconnectRequest) Descriptor

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

func (*DisconnectRequest) GetBoatId

func (m *DisconnectRequest) GetBoatId() string

func (*DisconnectRequest) GetSid

func (m *DisconnectRequest) GetSid() string

func (*DisconnectRequest) GetUid

func (m *DisconnectRequest) GetUid() string

func (*DisconnectRequest) ProtoMessage

func (*DisconnectRequest) ProtoMessage()

func (*DisconnectRequest) Reset

func (m *DisconnectRequest) Reset()

func (*DisconnectRequest) String

func (m *DisconnectRequest) String() string

type StationClient

type StationClient interface {
	// boat服务在新会话进入后应该调用此方法
	// 内部根据鉴权信息得到身份信息且记录连接信息,最终返回身份信息
	Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error)
	// boat服务在新会话断开之后应该调用此方法
	// 内部会删除对应连接信息
	Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
}

func NewStationClient

func NewStationClient(cc *grpc.ClientConn) StationClient

type StationServer

type StationServer interface {
	// boat服务在新会话进入后应该调用此方法
	// 内部根据鉴权信息得到身份信息且记录连接信息,最终返回身份信息
	Connect(context.Context, *ConnectRequest) (*ConnectResponse, error)
	// boat服务在新会话断开之后应该调用此方法
	// 内部会删除对应连接信息
	Disconnect(context.Context, *DisconnectRequest) (*google_protobuf.Empty, error)
}

Jump to

Keyboard shortcuts

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