types

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: ISC Imports: 8 Imported by: 14

README

Bison Relay clientrpc types

This package defines the types used within the clientrpc protocol for Bison Relay client automation.

The majority of the code in this package is automatically generated, based on the definitions on the clientrpc.proto file.

End-users are usually interested in the definitions for the client side of the services defined in the proto file. Following are links for documentation about the currently available service clients:

  • VersionServiceClient: Provides functions to fetch metadata about the clientrpc server (i.e. the underlying brclient).
  • ChatServiceClient: Provides functions to interact with the chat services of the clientrpc server.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessageMode_name = map[int32]string{
		0: "MESSAGE_MODE_NORMAL",
		1: "MESSAGE_MODE_ME",
	}
	MessageMode_value = map[string]int32{
		"MESSAGE_MODE_NORMAL": 0,
		"MESSAGE_MODE_ME":     1,
	}
)

Enum value maps for MessageMode.

View Source
var File_clientrpc_proto protoreflect.FileDescriptor

Functions

func DebugSequenceID

func DebugSequenceID(seq uint64) string

DebugSequenceID returns a debug string for a given sequence ID.

func HelpForMessage

func HelpForMessage(name string) string

HelpForMessage returns the top-level help defined for the given proto message.

func HelpForMessageField

func HelpForMessageField(message, field string) string

HelpForMessageField returns the help message defined for the specified message field.

Types

type AckRequest

type AckRequest struct {

	// sequence_id is the ID up to which messages have been processed.
	SequenceId uint64 `protobuf:"varint,1,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
	// contains filtered or unexported fields
}

AckRequest is a request to ack that a type of message up to a sequence ID has been processed.

func (*AckRequest) Descriptor deprecated

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

Deprecated: Use AckRequest.ProtoReflect.Descriptor instead.

func (*AckRequest) GetSequenceId

func (x *AckRequest) GetSequenceId() uint64

func (*AckRequest) ProtoMessage

func (*AckRequest) ProtoMessage()

func (*AckRequest) ProtoReflect

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

func (*AckRequest) Reset

func (x *AckRequest) Reset()

func (*AckRequest) String

func (x *AckRequest) String() string

type AckResponse

type AckResponse struct {
	// contains filtered or unexported fields
}

AckResponse is the response to an ack request.

func (*AckResponse) Descriptor deprecated

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

Deprecated: Use AckResponse.ProtoReflect.Descriptor instead.

func (*AckResponse) ProtoMessage

func (*AckResponse) ProtoMessage()

func (*AckResponse) ProtoReflect

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

func (*AckResponse) Reset

func (x *AckResponse) Reset()

func (*AckResponse) String

func (x *AckResponse) String() string

type ChatServiceClient

type ChatServiceClient interface {
	// PM sends a private message to a user of the client.
	PM(ctx context.Context, in *PMRequest, out *PMResponse) error
	// PMStream returns a stream that gets PMs received by the client.
	PMStream(ctx context.Context, in *PMStreamRequest) (ChatService_PMStreamClient, error)
	// AckReceivedPM acks to the server that PMs up to a sequence ID have been
	// processed.
	AckReceivedPM(ctx context.Context, in *AckRequest, out *AckResponse) error
	// GCM sends a message in a GC.
	GCM(ctx context.Context, in *GCMRequest, out *GCMResponse) error
	// GCMStream returns a stream that gets GC messages received by the client.
	GCMStream(ctx context.Context, in *GCMStreamRequest) (ChatService_GCMStreamClient, error)
	// AckReceivedGCM acks to the server that GCMs up to a sequence ID have been
	// processed.
	AckReceivedGCM(ctx context.Context, in *AckRequest, out *AckResponse) error
}

ChatServiceClient is the client API for ChatService service.

func NewChatServiceClient

func NewChatServiceClient(c ClientConn) ChatServiceClient

type ChatServiceServer

type ChatServiceServer interface {
	// PM sends a private message to a user of the client.
	PM(context.Context, *PMRequest, *PMResponse) error
	// PMStream returns a stream that gets PMs received by the client.
	PMStream(context.Context, *PMStreamRequest, ChatService_PMStreamServer) error
	// AckReceivedPM acks to the server that PMs up to a sequence ID have been
	// processed.
	AckReceivedPM(context.Context, *AckRequest, *AckResponse) error
	// GCM sends a message in a GC.
	GCM(context.Context, *GCMRequest, *GCMResponse) error
	// GCMStream returns a stream that gets GC messages received by the client.
	GCMStream(context.Context, *GCMStreamRequest, ChatService_GCMStreamServer) error
	// AckReceivedGCM acks to the server that GCMs up to a sequence ID have been
	// processed.
	AckReceivedGCM(context.Context, *AckRequest, *AckResponse) error
}

ChatServiceServer is the server API for ChatService service.

type ChatService_GCMStreamClient

type ChatService_GCMStreamClient interface {
	Recv(*GCReceivedMsg) error
}

type ChatService_GCMStreamServer

type ChatService_GCMStreamServer interface {
	Send(m *GCReceivedMsg) error
}

type ChatService_PMStreamClient

type ChatService_PMStreamClient interface {
	Recv(*ReceivedPM) error
}

type ChatService_PMStreamServer

type ChatService_PMStreamServer interface {
	Send(m *ReceivedPM) error
}

type ClientConn

type ClientConn interface {
	Request(ctx context.Context, method string, request, response proto.Message) error
	Stream(ctx context.Context, method string, request proto.Message) (ClientStream, error)
}

ClientConn abstracts the necessary functions from an underlying transport of messages.

type ClientStream

type ClientStream interface {
	Recv(proto.Message) error
}

ClientStream abstracts the necessary functions of a client-side stream.

type GCMRequest

type GCMRequest struct {

	// gc is either an hex-encoded GCID or a GC alias.
	Gc string `protobuf:"bytes,1,opt,name=gc,proto3" json:"gc,omitempty"`
	// msg is the text payload of the message.
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

GCMRequest is a request to send a GC message.

func (*GCMRequest) Descriptor deprecated

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

Deprecated: Use GCMRequest.ProtoReflect.Descriptor instead.

func (*GCMRequest) GetGc

func (x *GCMRequest) GetGc() string

func (*GCMRequest) GetMsg

func (x *GCMRequest) GetMsg() string

func (*GCMRequest) ProtoMessage

func (*GCMRequest) ProtoMessage()

func (*GCMRequest) ProtoReflect

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

func (*GCMRequest) Reset

func (x *GCMRequest) Reset()

func (*GCMRequest) String

func (x *GCMRequest) String() string

type GCMResponse

type GCMResponse struct {
	// contains filtered or unexported fields
}

GCMResponse is the response to sending a GC message.

func (*GCMResponse) Descriptor deprecated

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

Deprecated: Use GCMResponse.ProtoReflect.Descriptor instead.

func (*GCMResponse) ProtoMessage

func (*GCMResponse) ProtoMessage()

func (*GCMResponse) ProtoReflect

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

func (*GCMResponse) Reset

func (x *GCMResponse) Reset()

func (*GCMResponse) String

func (x *GCMResponse) String() string

type GCMStreamRequest

type GCMStreamRequest struct {

	// unacked_from specifies to the server the sequence_id of the last processed
	// GCM. GCMs received by the server that have a higher sequence_id will be
	// streamed back to the client.
	UnackedFrom uint64 `protobuf:"varint,1,opt,name=unacked_from,json=unackedFrom,proto3" json:"unacked_from,omitempty"`
	// contains filtered or unexported fields
}

GCMStreamRequest is a request to a stream of received GC messages.

func (*GCMStreamRequest) Descriptor deprecated

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

Deprecated: Use GCMStreamRequest.ProtoReflect.Descriptor instead.

func (*GCMStreamRequest) GetUnackedFrom

func (x *GCMStreamRequest) GetUnackedFrom() uint64

func (*GCMStreamRequest) ProtoMessage

func (*GCMStreamRequest) ProtoMessage()

func (*GCMStreamRequest) ProtoReflect

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

func (*GCMStreamRequest) Reset

func (x *GCMStreamRequest) Reset()

func (*GCMStreamRequest) String

func (x *GCMStreamRequest) String() string

type GCReceivedMsg

type GCReceivedMsg struct {

	// uid is the source user ID.
	Uid []byte `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// nick is the source user nick/alias.
	Nick string `protobuf:"bytes,2,opt,name=nick,proto3" json:"nick,omitempty"`
	// gc_alias is the local alias of the GC where the message was sent.
	GcAlias string `protobuf:"bytes,3,opt,name=gc_alias,json=gcAlias,proto3" json:"gc_alias,omitempty"`
	// msg is the received message.
	Msg *RMGroupMessage `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"`
	// timestamp_ms is the server timestamp of the message with millisecond precision.
	TimestampMs int64 `protobuf:"varint,5,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
	// sequence_id is an opaque sequential ID.
	SequenceId uint64 `protobuf:"varint,6,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
	// contains filtered or unexported fields
}

GCReceivedMsg is a GC message received from a remote user.

func (*GCReceivedMsg) Descriptor deprecated

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

Deprecated: Use GCReceivedMsg.ProtoReflect.Descriptor instead.

func (*GCReceivedMsg) GetGcAlias

func (x *GCReceivedMsg) GetGcAlias() string

func (*GCReceivedMsg) GetMsg

func (x *GCReceivedMsg) GetMsg() *RMGroupMessage

func (*GCReceivedMsg) GetNick

func (x *GCReceivedMsg) GetNick() string

func (*GCReceivedMsg) GetSequenceId

func (x *GCReceivedMsg) GetSequenceId() uint64

func (*GCReceivedMsg) GetTimestampMs

func (x *GCReceivedMsg) GetTimestampMs() int64

func (*GCReceivedMsg) GetUid

func (x *GCReceivedMsg) GetUid() []byte

func (*GCReceivedMsg) ProtoMessage

func (*GCReceivedMsg) ProtoMessage()

func (*GCReceivedMsg) ProtoReflect

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

func (*GCReceivedMsg) Reset

func (x *GCReceivedMsg) Reset()

func (*GCReceivedMsg) String

func (x *GCReceivedMsg) String() string

type KeepaliveEvent

type KeepaliveEvent struct {

	// timestamp is the unix timestamp on the server, with second precision.
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

KeepaliveEvent is a single keepalive event.

func (*KeepaliveEvent) Descriptor deprecated

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

Deprecated: Use KeepaliveEvent.ProtoReflect.Descriptor instead.

func (*KeepaliveEvent) GetTimestamp

func (x *KeepaliveEvent) GetTimestamp() int64

func (*KeepaliveEvent) ProtoMessage

func (*KeepaliveEvent) ProtoMessage()

func (*KeepaliveEvent) ProtoReflect

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

func (*KeepaliveEvent) Reset

func (x *KeepaliveEvent) Reset()

func (*KeepaliveEvent) String

func (x *KeepaliveEvent) String() string

type KeepaliveStreamRequest

type KeepaliveStreamRequest struct {

	// interval is how often to send the keepalive (in milliseconds).
	//
	// A minimum of 1 second is imposed, regardless of the value passed as
	// interval.
	Interval int64 `protobuf:"varint,1,opt,name=interval,proto3" json:"interval,omitempty"`
	// contains filtered or unexported fields
}

KeepaliveStreamRequest is the request for a new keepalive stream.

func (*KeepaliveStreamRequest) Descriptor deprecated

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

Deprecated: Use KeepaliveStreamRequest.ProtoReflect.Descriptor instead.

func (*KeepaliveStreamRequest) GetInterval

func (x *KeepaliveStreamRequest) GetInterval() int64

func (*KeepaliveStreamRequest) ProtoMessage

func (*KeepaliveStreamRequest) ProtoMessage()

func (*KeepaliveStreamRequest) ProtoReflect

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

func (*KeepaliveStreamRequest) Reset

func (x *KeepaliveStreamRequest) Reset()

func (*KeepaliveStreamRequest) String

func (x *KeepaliveStreamRequest) String() string

type MessageMode

type MessageMode int32
const (
	// MESSAGE_MODE_NORMAL is the standard mode for messages.
	MessageMode_MESSAGE_MODE_NORMAL MessageMode = 0
	// MESSAGE_MODE_ME are messages sent in the passive voice (i.e. with /me).
	MessageMode_MESSAGE_MODE_ME MessageMode = 1
)

func (MessageMode) Descriptor

func (MessageMode) Enum

func (x MessageMode) Enum() *MessageMode

func (MessageMode) EnumDescriptor deprecated

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

Deprecated: Use MessageMode.Descriptor instead.

func (MessageMode) Number

func (x MessageMode) Number() protoreflect.EnumNumber

func (MessageMode) String

func (x MessageMode) String() string

func (MessageMode) Type

type MethodDefn

type MethodDefn struct {
	NewRequest   func() proto.Message
	NewResponse  func() proto.Message
	RequestDefn  func() protoreflect.MessageDescriptor
	ResponseDefn func() protoreflect.MessageDescriptor

	ServerHandler       func(x interface{}, ctx context.Context, request, response proto.Message) error
	ServerStreamHandler func(x interface{}, ctx context.Context, request proto.Message, stream ServerStream) error
	ClientHandler       func(conn ClientConn, ctx context.Context, request, response proto.Message) error
	ClientStreamHandler func(conn ClientConn, ctx context.Context, request proto.Message) (ClientStream, error)

	Help        string
	IsStreaming bool
}

MethodDefn tracks information about an RPC method.

type PMRequest

type PMRequest struct {

	// user is either the nick, alias or an hex-encoded user ID of the destination.
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// msg is the message to be sent.
	Msg *RMPrivateMessage `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

PMRequest is a request to send a new private message.

func (*PMRequest) Descriptor deprecated

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

Deprecated: Use PMRequest.ProtoReflect.Descriptor instead.

func (*PMRequest) GetMsg

func (x *PMRequest) GetMsg() *RMPrivateMessage

func (*PMRequest) GetUser

func (x *PMRequest) GetUser() string

func (*PMRequest) ProtoMessage

func (*PMRequest) ProtoMessage()

func (*PMRequest) ProtoReflect

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

func (*PMRequest) Reset

func (x *PMRequest) Reset()

func (*PMRequest) String

func (x *PMRequest) String() string

type PMResponse

type PMResponse struct {
	// contains filtered or unexported fields
}

PMResponse is the response of the client for a new message.

func (*PMResponse) Descriptor deprecated

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

Deprecated: Use PMResponse.ProtoReflect.Descriptor instead.

func (*PMResponse) ProtoMessage

func (*PMResponse) ProtoMessage()

func (*PMResponse) ProtoReflect

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

func (*PMResponse) Reset

func (x *PMResponse) Reset()

func (*PMResponse) String

func (x *PMResponse) String() string

type PMStreamRequest

type PMStreamRequest struct {

	// unacked_from specifies to the server the sequence_id of the last processed
	// PM. PMs received by the server that have a higher sequence_id will be
	// streamed back to the client.
	UnackedFrom uint64 `protobuf:"varint,1,opt,name=unacked_from,json=unackedFrom,proto3" json:"unacked_from,omitempty"`
	// contains filtered or unexported fields
}

PMStreamRequest is the request for a new private message reception stream.

func (*PMStreamRequest) Descriptor deprecated

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

Deprecated: Use PMStreamRequest.ProtoReflect.Descriptor instead.

func (*PMStreamRequest) GetUnackedFrom

func (x *PMStreamRequest) GetUnackedFrom() uint64

func (*PMStreamRequest) ProtoMessage

func (*PMStreamRequest) ProtoMessage()

func (*PMStreamRequest) ProtoReflect

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

func (*PMStreamRequest) Reset

func (x *PMStreamRequest) Reset()

func (*PMStreamRequest) String

func (x *PMStreamRequest) String() string

type PaymentsServiceClient

type PaymentsServiceClient interface {
	// TipUser attempts to send a tip to a user. The user must be or come online
	// for this to complete.
	TipUser(ctx context.Context, in *TipUserRequest, out *TipUserResponse) error
}

PaymentsServiceClient is the client API for PaymentsService service.

func NewPaymentsServiceClient

func NewPaymentsServiceClient(c ClientConn) PaymentsServiceClient

type PaymentsServiceServer

type PaymentsServiceServer interface {
	// TipUser attempts to send a tip to a user. The user must be or come online
	// for this to complete.
	TipUser(context.Context, *TipUserRequest, *TipUserResponse) error
}

PaymentsServiceServer is the server API for PaymentsService service.

type PostMetadata

type PostMetadata struct {

	// version defines the available fields within attributes.
	Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// attributes defines the available post attributes.
	Attributes map[string]string `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

PostMetadata is the network-level post data.

func (*PostMetadata) Descriptor deprecated

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

Deprecated: Use PostMetadata.ProtoReflect.Descriptor instead.

func (*PostMetadata) GetAttributes

func (x *PostMetadata) GetAttributes() map[string]string

func (*PostMetadata) GetVersion

func (x *PostMetadata) GetVersion() uint64

func (*PostMetadata) ProtoMessage

func (*PostMetadata) ProtoMessage()

func (*PostMetadata) ProtoReflect

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

func (*PostMetadata) Reset

func (x *PostMetadata) Reset()

func (*PostMetadata) String

func (x *PostMetadata) String() string

type PostMetadataStatus

type PostMetadataStatus struct {

	// version defines the available fields within attributes.
	Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// from is the UID of the original status creator.
	From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	// link is the ID of the post.
	Link string `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"`
	// attributes is the list of post update attributes.
	Attributes map[string]string `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

PostMetadataStatus is the network-level post status update data.

func (*PostMetadataStatus) Descriptor deprecated

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

Deprecated: Use PostMetadataStatus.ProtoReflect.Descriptor instead.

func (*PostMetadataStatus) GetAttributes

func (x *PostMetadataStatus) GetAttributes() map[string]string

func (*PostMetadataStatus) GetFrom

func (x *PostMetadataStatus) GetFrom() string
func (x *PostMetadataStatus) GetLink() string

func (*PostMetadataStatus) GetVersion

func (x *PostMetadataStatus) GetVersion() uint64

func (*PostMetadataStatus) ProtoMessage

func (*PostMetadataStatus) ProtoMessage()

func (*PostMetadataStatus) ProtoReflect

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

func (*PostMetadataStatus) Reset

func (x *PostMetadataStatus) Reset()

func (*PostMetadataStatus) String

func (x *PostMetadataStatus) String() string

type PostSummary

type PostSummary struct {

	// id is the post ID (hash of the post metadata).
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// from is the id of the relayer of the post (who the local client received
	// the post from).
	From []byte `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	// author_id is the id of the author of the post.
	AuthorId []byte `protobuf:"bytes,3,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"`
	// author_nick is the reported nick of the author of the post.
	AuthorNick string `protobuf:"bytes,4,opt,name=author_nick,json=authorNick,proto3" json:"author_nick,omitempty"`
	// date is the unix timestamp of the post.
	Date int64 `protobuf:"varint,5,opt,name=date,proto3" json:"date,omitempty"`
	// last_status_ts is the timestamp of the last recorded status update of the
	// post.
	LastStatusTs int64 `protobuf:"varint,6,opt,name=last_status_ts,json=lastStatusTs,proto3" json:"last_status_ts,omitempty"`
	// title is either the included or suggested title of the post.
	Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"`
	// contains filtered or unexported fields
}

PostSummary is the summary information about a post.

func (*PostSummary) Descriptor deprecated

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

Deprecated: Use PostSummary.ProtoReflect.Descriptor instead.

func (*PostSummary) GetAuthorId

func (x *PostSummary) GetAuthorId() []byte

func (*PostSummary) GetAuthorNick

func (x *PostSummary) GetAuthorNick() string

func (*PostSummary) GetDate

func (x *PostSummary) GetDate() int64

func (*PostSummary) GetFrom

func (x *PostSummary) GetFrom() []byte

func (*PostSummary) GetId

func (x *PostSummary) GetId() []byte

func (*PostSummary) GetLastStatusTs

func (x *PostSummary) GetLastStatusTs() int64

func (*PostSummary) GetTitle

func (x *PostSummary) GetTitle() string

func (*PostSummary) ProtoMessage

func (*PostSummary) ProtoMessage()

func (*PostSummary) ProtoReflect

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

func (*PostSummary) Reset

func (x *PostSummary) Reset()

func (*PostSummary) String

func (x *PostSummary) String() string

type PostsServiceClient

type PostsServiceClient interface {
	// SubscribeToPosts makes the local client subscribe to a remote user's posts.
	SubscribeToPosts(ctx context.Context, in *SubscribeToPostsRequest, out *SubscribeToPostsResponse) error
	// UnsubscribeToPosts makes the local client unsubscribe from a remote user's posts.
	UnsubscribeToPosts(ctx context.Context, in *UnsubscribeToPostsRequest, out *UnsubscribeToPostsResponse) error
	// PostsStream creates a stream that receives updates about posts received
	// from remote users the local client is subscribed to.
	PostsStream(ctx context.Context, in *PostsStreamRequest) (PostsService_PostsStreamClient, error)
	// AckReceivedPost acknowledges posts received up to a given sequence_id have
	// been processed.
	AckReceivedPost(ctx context.Context, in *AckRequest, out *AckResponse) error
	// PostsStatusStream creates a stream that receives updates about post status
	// events (comments, replies, etc).
	PostsStatusStream(ctx context.Context, in *PostsStatusStreamRequest) (PostsService_PostsStatusStreamClient, error)
	// AckReceivedPostStatus acknowledges post status received up to a given
	// sequence_id have been processed.
	AckReceivedPostStatus(ctx context.Context, in *AckRequest, out *AckResponse) error
}

PostsServiceClient is the client API for PostsService service.

func NewPostsServiceClient

func NewPostsServiceClient(c ClientConn) PostsServiceClient

type PostsServiceServer

type PostsServiceServer interface {
	// SubscribeToPosts makes the local client subscribe to a remote user's posts.
	SubscribeToPosts(context.Context, *SubscribeToPostsRequest, *SubscribeToPostsResponse) error
	// UnsubscribeToPosts makes the local client unsubscribe from a remote user's posts.
	UnsubscribeToPosts(context.Context, *UnsubscribeToPostsRequest, *UnsubscribeToPostsResponse) error
	// PostsStream creates a stream that receives updates about posts received
	// from remote users the local client is subscribed to.
	PostsStream(context.Context, *PostsStreamRequest, PostsService_PostsStreamServer) error
	// AckReceivedPost acknowledges posts received up to a given sequence_id have
	// been processed.
	AckReceivedPost(context.Context, *AckRequest, *AckResponse) error
	// PostsStatusStream creates a stream that receives updates about post status
	// events (comments, replies, etc).
	PostsStatusStream(context.Context, *PostsStatusStreamRequest, PostsService_PostsStatusStreamServer) error
	// AckReceivedPostStatus acknowledges post status received up to a given
	// sequence_id have been processed.
	AckReceivedPostStatus(context.Context, *AckRequest, *AckResponse) error
}

PostsServiceServer is the server API for PostsService service.

type PostsService_PostsStatusStreamClient

type PostsService_PostsStatusStreamClient interface {
	Recv(*ReceivedPostStatus) error
}

type PostsService_PostsStatusStreamServer

type PostsService_PostsStatusStreamServer interface {
	Send(m *ReceivedPostStatus) error
}

type PostsService_PostsStreamClient

type PostsService_PostsStreamClient interface {
	Recv(*ReceivedPost) error
}

type PostsService_PostsStreamServer

type PostsService_PostsStreamServer interface {
	Send(m *ReceivedPost) error
}

type PostsStatusStreamRequest

type PostsStatusStreamRequest struct {

	// unacked_from specifies to the server the sequence_id of the last processed
	// Post Status. Post Status received by the server that have a higher
	// sequence_id will be streamed back to the client.
	UnackedFrom uint64 `protobuf:"varint,1,opt,name=unacked_from,json=unackedFrom,proto3" json:"unacked_from,omitempty"`
	// contains filtered or unexported fields
}

PostsStatusStreamRequest is a request to establish a stream that receives post status updates received by the local client.

func (*PostsStatusStreamRequest) Descriptor deprecated

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

Deprecated: Use PostsStatusStreamRequest.ProtoReflect.Descriptor instead.

func (*PostsStatusStreamRequest) GetUnackedFrom

func (x *PostsStatusStreamRequest) GetUnackedFrom() uint64

func (*PostsStatusStreamRequest) ProtoMessage

func (*PostsStatusStreamRequest) ProtoMessage()

func (*PostsStatusStreamRequest) ProtoReflect

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

func (*PostsStatusStreamRequest) Reset

func (x *PostsStatusStreamRequest) Reset()

func (*PostsStatusStreamRequest) String

func (x *PostsStatusStreamRequest) String() string

type PostsStreamRequest

type PostsStreamRequest struct {

	// unacked_from specifies to the server the sequence_id of the last processed
	// post. Posts received by the server that have a higher sequence_id will be
	// streamed back to the client.
	UnackedFrom uint64 `protobuf:"varint,1,opt,name=unacked_from,json=unackedFrom,proto3" json:"unacked_from,omitempty"`
	// contains filtered or unexported fields
}

PostsStreamRequest is the request to establish a stream of received post events.

func (*PostsStreamRequest) Descriptor deprecated

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

Deprecated: Use PostsStreamRequest.ProtoReflect.Descriptor instead.

func (*PostsStreamRequest) GetUnackedFrom

func (x *PostsStreamRequest) GetUnackedFrom() uint64

func (*PostsStreamRequest) ProtoMessage

func (*PostsStreamRequest) ProtoMessage()

func (*PostsStreamRequest) ProtoReflect

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

func (*PostsStreamRequest) Reset

func (x *PostsStreamRequest) Reset()

func (*PostsStreamRequest) String

func (x *PostsStreamRequest) String() string

type RMGroupMessage

type RMGroupMessage struct {

	// id is the group chat id where the message was sent.
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// generation is the internal generation of the group chat metadata when the
	// sender sent this message.
	Generation uint64 `protobuf:"varint,2,opt,name=generation,proto3" json:"generation,omitempty"`
	// message is the textual content.
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// mode is the mode of the message.
	Mode MessageMode `protobuf:"varint,4,opt,name=mode,proto3,enum=MessageMode" json:"mode,omitempty"`
	// contains filtered or unexported fields
}

RMGroupMessage is the network-level routed group message.

func (*RMGroupMessage) Descriptor deprecated

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

Deprecated: Use RMGroupMessage.ProtoReflect.Descriptor instead.

func (*RMGroupMessage) GetGeneration

func (x *RMGroupMessage) GetGeneration() uint64

func (*RMGroupMessage) GetId

func (x *RMGroupMessage) GetId() []byte

func (*RMGroupMessage) GetMessage

func (x *RMGroupMessage) GetMessage() string

func (*RMGroupMessage) GetMode

func (x *RMGroupMessage) GetMode() MessageMode

func (*RMGroupMessage) ProtoMessage

func (*RMGroupMessage) ProtoMessage()

func (*RMGroupMessage) ProtoReflect

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

func (*RMGroupMessage) Reset

func (x *RMGroupMessage) Reset()

func (*RMGroupMessage) String

func (x *RMGroupMessage) String() string

type RMPrivateMessage

type RMPrivateMessage struct {

	// message is the private message payload.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// mode is the message mode.
	Mode MessageMode `protobuf:"varint,2,opt,name=mode,proto3,enum=MessageMode" json:"mode,omitempty"`
	// contains filtered or unexported fields
}

RMPrivateMessage is the network-level routed private message.

func (*RMPrivateMessage) Descriptor deprecated

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

Deprecated: Use RMPrivateMessage.ProtoReflect.Descriptor instead.

func (*RMPrivateMessage) GetMessage

func (x *RMPrivateMessage) GetMessage() string

func (*RMPrivateMessage) GetMode

func (x *RMPrivateMessage) GetMode() MessageMode

func (*RMPrivateMessage) ProtoMessage

func (*RMPrivateMessage) ProtoMessage()

func (*RMPrivateMessage) ProtoReflect

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

func (*RMPrivateMessage) Reset

func (x *RMPrivateMessage) Reset()

func (*RMPrivateMessage) String

func (x *RMPrivateMessage) String() string

type ReceivedPM

type ReceivedPM struct {

	// uid is the source user ID in raw format.
	Uid []byte `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// nick is the source's nick or alias.
	Nick string `protobuf:"bytes,2,opt,name=nick,proto3" json:"nick,omitempty"`
	// msg is the received message payload.
	Msg *RMPrivateMessage `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	// timestamp_ms is the timestamp from unix epoch with millisecond precision.
	TimestampMs int64 `protobuf:"varint,4,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
	// sequence_id is an opaque sequential ID.
	SequenceId uint64 `protobuf:"varint,5,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
	// contains filtered or unexported fields
}

ReceivedPM is a private message received by the client.

func (*ReceivedPM) Descriptor deprecated

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

Deprecated: Use ReceivedPM.ProtoReflect.Descriptor instead.

func (*ReceivedPM) GetMsg

func (x *ReceivedPM) GetMsg() *RMPrivateMessage

func (*ReceivedPM) GetNick

func (x *ReceivedPM) GetNick() string

func (*ReceivedPM) GetSequenceId

func (x *ReceivedPM) GetSequenceId() uint64

func (*ReceivedPM) GetTimestampMs

func (x *ReceivedPM) GetTimestampMs() int64

func (*ReceivedPM) GetUid

func (x *ReceivedPM) GetUid() []byte

func (*ReceivedPM) ProtoMessage

func (*ReceivedPM) ProtoMessage()

func (*ReceivedPM) ProtoReflect

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

func (*ReceivedPM) Reset

func (x *ReceivedPM) Reset()

func (*ReceivedPM) String

func (x *ReceivedPM) String() string

type ReceivedPost

type ReceivedPost struct {

	// sequence_id is an opaque sequential ID.
	SequenceId uint64 `protobuf:"varint,1,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
	// relayer_id is the id of the user we received the post from (may not be the
	// same as the author).
	RelayerId []byte `protobuf:"bytes,2,opt,name=relayer_id,json=relayerId,proto3" json:"relayer_id,omitempty"`
	// summary is the summary information about the post.
	Summary *PostSummary `protobuf:"bytes,3,opt,name=summary,proto3" json:"summary,omitempty"`
	// post is the full post data.
	Post *PostMetadata `protobuf:"bytes,4,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

ReceivedPost is a post received by the local client.

func (*ReceivedPost) Descriptor deprecated

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

Deprecated: Use ReceivedPost.ProtoReflect.Descriptor instead.

func (*ReceivedPost) GetPost

func (x *ReceivedPost) GetPost() *PostMetadata

func (*ReceivedPost) GetRelayerId

func (x *ReceivedPost) GetRelayerId() []byte

func (*ReceivedPost) GetSequenceId

func (x *ReceivedPost) GetSequenceId() uint64

func (*ReceivedPost) GetSummary

func (x *ReceivedPost) GetSummary() *PostSummary

func (*ReceivedPost) ProtoMessage

func (*ReceivedPost) ProtoMessage()

func (*ReceivedPost) ProtoReflect

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

func (*ReceivedPost) Reset

func (x *ReceivedPost) Reset()

func (*ReceivedPost) String

func (x *ReceivedPost) String() string

type ReceivedPostStatus

type ReceivedPostStatus struct {

	// sequence_id is an opaque sequential ID.
	SequenceId uint64 `protobuf:"varint,1,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
	// relayer_id is the id of the sender of the client that sent the update.
	RelayerId []byte `protobuf:"bytes,2,opt,name=relayer_id,json=relayerId,proto3" json:"relayer_id,omitempty"`
	// post_id is the id of the corresponding post.
	PostId []byte `protobuf:"bytes,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// status_from is the original author of the status.
	StatusFrom []byte `protobuf:"bytes,4,opt,name=status_from,json=statusFrom,proto3" json:"status_from,omitempty"`
	// status is the full status data.
	Status *PostMetadataStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

ReceivedPostStatus is a post status update received by the local client.

func (*ReceivedPostStatus) Descriptor deprecated

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

Deprecated: Use ReceivedPostStatus.ProtoReflect.Descriptor instead.

func (*ReceivedPostStatus) GetPostId

func (x *ReceivedPostStatus) GetPostId() []byte

func (*ReceivedPostStatus) GetRelayerId

func (x *ReceivedPostStatus) GetRelayerId() []byte

func (*ReceivedPostStatus) GetSequenceId

func (x *ReceivedPostStatus) GetSequenceId() uint64

func (*ReceivedPostStatus) GetStatus

func (x *ReceivedPostStatus) GetStatus() *PostMetadataStatus

func (*ReceivedPostStatus) GetStatusFrom

func (x *ReceivedPostStatus) GetStatusFrom() []byte

func (*ReceivedPostStatus) ProtoMessage

func (*ReceivedPostStatus) ProtoMessage()

func (*ReceivedPostStatus) ProtoReflect

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

func (*ReceivedPostStatus) Reset

func (x *ReceivedPostStatus) Reset()

func (*ReceivedPostStatus) String

func (x *ReceivedPostStatus) String() string

type ServerStream

type ServerStream interface {
	Send(proto.Message) error
}

ServerStream abstracts the necessary functions of a server-side stream.

type ServersMap

type ServersMap struct {
	// contains filtered or unexported fields
}

ServersMap is a concurent-safe map for services.

func (*ServersMap) Bind

func (sm *ServersMap) Bind(name string, defn ServiceDefn, impl interface{})

Bind the service server to the specified name.

func (*ServersMap) SvcForMethod

func (sm *ServersMap) SvcForMethod(method string) (*ServiceDefn, interface{}, *MethodDefn, error)

SvcForMethod return the service and method name given a Service.Method name.

type ServiceDefn

type ServiceDefn struct {
	Name    string
	Methods map[string]MethodDefn
}

ServiceDefn tracks information about a service.

func ChatServiceDefn

func ChatServiceDefn() ServiceDefn

func PaymentsServiceDefn

func PaymentsServiceDefn() ServiceDefn

func PostsServiceDefn

func PostsServiceDefn() ServiceDefn

func Services

func Services() []ServiceDefn

Services returns the full list of service definitions defined in this package.

func VersionServiceDefn

func VersionServiceDefn() ServiceDefn

type SubscribeToPostsRequest

type SubscribeToPostsRequest struct {

	// user is the nick or hex-encoded ID of the user to subscribe to.
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

SubscribeToPostsRequest is a request to subscribe to a remote user's posts.

func (*SubscribeToPostsRequest) Descriptor deprecated

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

Deprecated: Use SubscribeToPostsRequest.ProtoReflect.Descriptor instead.

func (*SubscribeToPostsRequest) GetUser

func (x *SubscribeToPostsRequest) GetUser() string

func (*SubscribeToPostsRequest) ProtoMessage

func (*SubscribeToPostsRequest) ProtoMessage()

func (*SubscribeToPostsRequest) ProtoReflect

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

func (*SubscribeToPostsRequest) Reset

func (x *SubscribeToPostsRequest) Reset()

func (*SubscribeToPostsRequest) String

func (x *SubscribeToPostsRequest) String() string

type SubscribeToPostsResponse

type SubscribeToPostsResponse struct {
	// contains filtered or unexported fields
}

SubscribeToPostsResponse is the response to subscribing to a remote user's posts.

func (*SubscribeToPostsResponse) Descriptor deprecated

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

Deprecated: Use SubscribeToPostsResponse.ProtoReflect.Descriptor instead.

func (*SubscribeToPostsResponse) ProtoMessage

func (*SubscribeToPostsResponse) ProtoMessage()

func (*SubscribeToPostsResponse) ProtoReflect

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

func (*SubscribeToPostsResponse) Reset

func (x *SubscribeToPostsResponse) Reset()

func (*SubscribeToPostsResponse) String

func (x *SubscribeToPostsResponse) String() string

type TipUserRequest

type TipUserRequest struct {

	// user is the remote user nick or hex-encoded ID.
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// dcr_amount is the DCR amount to send as tip.
	DcrAmount float64 `protobuf:"fixed64,2,opt,name=dcr_amount,json=dcrAmount,proto3" json:"dcr_amount,omitempty"`
	// contains filtered or unexported fields
}

TipUserRequest is a request to tip a remote user.

func (*TipUserRequest) Descriptor deprecated

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

Deprecated: Use TipUserRequest.ProtoReflect.Descriptor instead.

func (*TipUserRequest) GetDcrAmount

func (x *TipUserRequest) GetDcrAmount() float64

func (*TipUserRequest) GetUser

func (x *TipUserRequest) GetUser() string

func (*TipUserRequest) ProtoMessage

func (*TipUserRequest) ProtoMessage()

func (*TipUserRequest) ProtoReflect

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

func (*TipUserRequest) Reset

func (x *TipUserRequest) Reset()

func (*TipUserRequest) String

func (x *TipUserRequest) String() string

type TipUserResponse

type TipUserResponse struct {
	// contains filtered or unexported fields
}

TipUserResponse is the response to a tip user request.

func (*TipUserResponse) Descriptor deprecated

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

Deprecated: Use TipUserResponse.ProtoReflect.Descriptor instead.

func (*TipUserResponse) ProtoMessage

func (*TipUserResponse) ProtoMessage()

func (*TipUserResponse) ProtoReflect

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

func (*TipUserResponse) Reset

func (x *TipUserResponse) Reset()

func (*TipUserResponse) String

func (x *TipUserResponse) String() string

type UnsubscribeToPostsRequest

type UnsubscribeToPostsRequest struct {

	// user is the nick or hex-encoded ID of the user to unsubscribe from.
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

UnsubscribeToPostsRequest is a request to unsubscribe from a remote user's posts.

func (*UnsubscribeToPostsRequest) Descriptor deprecated

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

Deprecated: Use UnsubscribeToPostsRequest.ProtoReflect.Descriptor instead.

func (*UnsubscribeToPostsRequest) GetUser

func (x *UnsubscribeToPostsRequest) GetUser() string

func (*UnsubscribeToPostsRequest) ProtoMessage

func (*UnsubscribeToPostsRequest) ProtoMessage()

func (*UnsubscribeToPostsRequest) ProtoReflect

func (*UnsubscribeToPostsRequest) Reset

func (x *UnsubscribeToPostsRequest) Reset()

func (*UnsubscribeToPostsRequest) String

func (x *UnsubscribeToPostsRequest) String() string

type UnsubscribeToPostsResponse

type UnsubscribeToPostsResponse struct {
	// contains filtered or unexported fields
}

UnsubscribeToPostsResponse is the response to an unsubscribe request.

func (*UnsubscribeToPostsResponse) Descriptor deprecated

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

Deprecated: Use UnsubscribeToPostsResponse.ProtoReflect.Descriptor instead.

func (*UnsubscribeToPostsResponse) ProtoMessage

func (*UnsubscribeToPostsResponse) ProtoMessage()

func (*UnsubscribeToPostsResponse) ProtoReflect

func (*UnsubscribeToPostsResponse) Reset

func (x *UnsubscribeToPostsResponse) Reset()

func (*UnsubscribeToPostsResponse) String

func (x *UnsubscribeToPostsResponse) String() string

type VersionRequest

type VersionRequest struct {
	// contains filtered or unexported fields
}

func (*VersionRequest) Descriptor deprecated

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

Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.

func (*VersionRequest) ProtoMessage

func (*VersionRequest) ProtoMessage()

func (*VersionRequest) ProtoReflect

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

func (*VersionRequest) Reset

func (x *VersionRequest) Reset()

func (*VersionRequest) String

func (x *VersionRequest) String() string

type VersionResponse

type VersionResponse struct {

	// app_version is the version of the application.
	AppVersion string `protobuf:"bytes,1,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
	// go_runtime is the Go version the server was compiled with.
	GoRuntime string `protobuf:"bytes,2,opt,name=go_runtime,json=goRuntime,proto3" json:"go_runtime,omitempty"`
	// app_name is the name of the underlying app running the server.
	AppName string `protobuf:"bytes,3,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"`
	// contains filtered or unexported fields
}

VersionResponse is the information about the running RPC server.

func (*VersionResponse) Descriptor deprecated

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

Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.

func (*VersionResponse) GetAppName

func (x *VersionResponse) GetAppName() string

func (*VersionResponse) GetAppVersion

func (x *VersionResponse) GetAppVersion() string

func (*VersionResponse) GetGoRuntime

func (x *VersionResponse) GetGoRuntime() string

func (*VersionResponse) ProtoMessage

func (*VersionResponse) ProtoMessage()

func (*VersionResponse) ProtoReflect

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

func (*VersionResponse) Reset

func (x *VersionResponse) Reset()

func (*VersionResponse) String

func (x *VersionResponse) String() string

type VersionServiceClient

type VersionServiceClient interface {
	// Version returns version information about the server.
	Version(ctx context.Context, in *VersionRequest, out *VersionResponse) error
	// KeepaliveStream returns a stream where the server continuously writes
	// keepalive events.
	//
	// The stream only terminates if the client requests it or the connection to
	// the server is closed.
	KeepaliveStream(ctx context.Context, in *KeepaliveStreamRequest) (VersionService_KeepaliveStreamClient, error)
}

VersionServiceClient is the client API for VersionService service.

func NewVersionServiceClient

func NewVersionServiceClient(c ClientConn) VersionServiceClient

type VersionServiceServer

type VersionServiceServer interface {
	// Version returns version information about the server.
	Version(context.Context, *VersionRequest, *VersionResponse) error
	// KeepaliveStream returns a stream where the server continuously writes
	// keepalive events.
	//
	// The stream only terminates if the client requests it or the connection to
	// the server is closed.
	KeepaliveStream(context.Context, *KeepaliveStreamRequest, VersionService_KeepaliveStreamServer) error
}

VersionServiceServer is the server API for VersionService service.

type VersionService_KeepaliveStreamClient

type VersionService_KeepaliveStreamClient interface {
	Recv(*KeepaliveEvent) error
}

type VersionService_KeepaliveStreamServer

type VersionService_KeepaliveStreamServer interface {
	Send(m *KeepaliveEvent) error
}

Jump to

Keyboard shortcuts

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