_go

package module
v0.0.0-...-606cdbc Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_message_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

func RegisterMessagesServer

func RegisterMessagesServer(s grpc.ServiceRegistrar, srv MessagesServer)

Types

type Activity

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

func (*Activity) Descriptor deprecated

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

Deprecated: Use Activity.ProtoReflect.Descriptor instead.

func (*Activity) ProtoMessage

func (*Activity) ProtoMessage()

func (*Activity) ProtoReflect

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

func (*Activity) Reset

func (x *Activity) Reset()

func (*Activity) String

func (x *Activity) String() string

type AuthAck

type AuthAck struct {
	Username     string               `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	SessionToken string               `protobuf:"bytes,2,opt,name=sessionToken,proto3" json:"sessionToken,omitempty"`
	Expiry       *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthAck) Descriptor deprecated

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

Deprecated: Use AuthAck.ProtoReflect.Descriptor instead.

func (*AuthAck) GetExpiry

func (x *AuthAck) GetExpiry() *timestamp.Timestamp

func (*AuthAck) GetSessionToken

func (x *AuthAck) GetSessionToken() string

func (*AuthAck) GetUsername

func (x *AuthAck) GetUsername() string

func (*AuthAck) ProtoMessage

func (*AuthAck) ProtoMessage()

func (*AuthAck) ProtoReflect

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

func (*AuthAck) Reset

func (x *AuthAck) Reset()

func (*AuthAck) String

func (x *AuthAck) String() string

type AuthClient

type AuthClient interface {
	Login(ctx context.Context, in *ClientAuth, opts ...grpc.CallOption) (*AuthAck, error)
}

AuthClient is the client API for Auth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	Login(context.Context, *ClientAuth) (*AuthAck, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type Authenticate

type Authenticate struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	ID    string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*Authenticate) Descriptor deprecated

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

Deprecated: Use Authenticate.ProtoReflect.Descriptor instead.

func (*Authenticate) GetID

func (x *Authenticate) GetID() string

func (*Authenticate) GetToken

func (x *Authenticate) GetToken() string

func (*Authenticate) ProtoMessage

func (*Authenticate) ProtoMessage()

func (*Authenticate) ProtoReflect

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

func (*Authenticate) Reset

func (x *Authenticate) Reset()

func (*Authenticate) String

func (x *Authenticate) String() string

type ClientAuth

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

func (*ClientAuth) Descriptor deprecated

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

Deprecated: Use ClientAuth.ProtoReflect.Descriptor instead.

func (*ClientAuth) GetUsername

func (x *ClientAuth) GetUsername() string

func (*ClientAuth) ProtoMessage

func (*ClientAuth) ProtoMessage()

func (*ClientAuth) ProtoReflect

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

func (*ClientAuth) Reset

func (x *ClientAuth) Reset()

func (*ClientAuth) String

func (x *ClientAuth) String() string

type CreateMessage

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

func (*CreateMessage) Descriptor deprecated

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

Deprecated: Use CreateMessage.ProtoReflect.Descriptor instead.

func (*CreateMessage) GetContent

func (x *CreateMessage) GetContent() string

func (*CreateMessage) ProtoMessage

func (*CreateMessage) ProtoMessage()

func (*CreateMessage) ProtoReflect

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

func (*CreateMessage) Reset

func (x *CreateMessage) Reset()

func (*CreateMessage) String

func (x *CreateMessage) String() string

type CreateUser

type CreateUser struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUser) Descriptor deprecated

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

Deprecated: Use CreateUser.ProtoReflect.Descriptor instead.

func (*CreateUser) GetEmail

func (x *CreateUser) GetEmail() string

func (*CreateUser) GetPassword

func (x *CreateUser) GetPassword() string

func (*CreateUser) GetUsername

func (x *CreateUser) GetUsername() string

func (*CreateUser) ProtoMessage

func (*CreateUser) ProtoMessage()

func (*CreateUser) ProtoReflect

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

func (*CreateUser) Reset

func (x *CreateUser) Reset()

func (*CreateUser) String

func (x *CreateUser) String() string

type Message

type Message struct {
	MessageID string `protobuf:"bytes,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"`
	UserID    string `protobuf:"bytes,2,opt,name=UserID,proto3" json:"UserID,omitempty"`
	// string ChannelID = 3;
	// string ServerID = 4;
	// repeated string Comments = 5;
	// repeated string Reactions = 6;
	SentAt  *timestamp.Timestamp `protobuf:"bytes,7,opt,name=SentAt,proto3" json:"SentAt,omitempty"`
	Content string               `protobuf:"bytes,8,opt,name=Content,proto3" json:"Content,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) GetMessageID

func (x *Message) GetMessageID() string

func (*Message) GetSentAt

func (x *Message) GetSentAt() *timestamp.Timestamp

func (*Message) GetUserID

func (x *Message) GetUserID() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MessageHistory

type MessageHistory struct {
	Messages         []*Message `protobuf:"bytes,1,rep,name=Messages,proto3" json:"Messages,omitempty"`
	NumberOfMessages int64      `protobuf:"varint,2,opt,name=NumberOfMessages,proto3" json:"NumberOfMessages,omitempty"`
	Pages            int32      `protobuf:"varint,3,opt,name=Pages,proto3" json:"Pages,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageHistory) Descriptor deprecated

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

Deprecated: Use MessageHistory.ProtoReflect.Descriptor instead.

func (*MessageHistory) GetMessages

func (x *MessageHistory) GetMessages() []*Message

func (*MessageHistory) GetNumberOfMessages

func (x *MessageHistory) GetNumberOfMessages() int64

func (*MessageHistory) GetPages

func (x *MessageHistory) GetPages() int32

func (*MessageHistory) ProtoMessage

func (*MessageHistory) ProtoMessage()

func (*MessageHistory) ProtoReflect

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

func (*MessageHistory) Reset

func (x *MessageHistory) Reset()

func (*MessageHistory) String

func (x *MessageHistory) String() string

type MessagesClient

type MessagesClient interface {
	HandleMessages(ctx context.Context, opts ...grpc.CallOption) (Messages_HandleMessagesClient, error)
	GetMessageHistory(ctx context.Context, in *RequestMessageHistory, opts ...grpc.CallOption) (*MessageHistory, error)
}

MessagesClient is the client API for Messages service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMessagesClient

func NewMessagesClient(cc grpc.ClientConnInterface) MessagesClient

type MessagesServer

type MessagesServer interface {
	HandleMessages(Messages_HandleMessagesServer) error
	GetMessageHistory(context.Context, *RequestMessageHistory) (*MessageHistory, error)
	// contains filtered or unexported methods
}

MessagesServer is the server API for Messages service. All implementations must embed UnimplementedMessagesServer for forward compatibility

type Messages_HandleMessagesClient

type Messages_HandleMessagesClient interface {
	Send(*CreateMessage) error
	Recv() (*Message, error)
	grpc.ClientStream
}

type Messages_HandleMessagesServer

type Messages_HandleMessagesServer interface {
	Send(*Message) error
	Recv() (*CreateMessage, error)
	grpc.ServerStream
}

type Nil

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

func (*Nil) Descriptor deprecated

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

Deprecated: Use Nil.ProtoReflect.Descriptor instead.

func (*Nil) ProtoMessage

func (*Nil) ProtoMessage()

func (*Nil) ProtoReflect

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

func (*Nil) Reset

func (x *Nil) Reset()

func (*Nil) String

func (x *Nil) String() string

type RequestMessageHistory

type RequestMessageHistory struct {

	// string ChannelID = 1;
	LastMessageTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=LastMessageTime,proto3" json:"LastMessageTime,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestMessageHistory) Descriptor deprecated

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

Deprecated: Use RequestMessageHistory.ProtoReflect.Descriptor instead.

func (*RequestMessageHistory) GetLastMessageTime

func (x *RequestMessageHistory) GetLastMessageTime() *timestamp.Timestamp

func (*RequestMessageHistory) ProtoMessage

func (*RequestMessageHistory) ProtoMessage()

func (*RequestMessageHistory) ProtoReflect

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

func (*RequestMessageHistory) Reset

func (x *RequestMessageHistory) Reset()

func (*RequestMessageHistory) String

func (x *RequestMessageHistory) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) Login

type UnimplementedMessagesServer

type UnimplementedMessagesServer struct {
}

UnimplementedMessagesServer must be embedded to have forward compatible implementations.

func (UnimplementedMessagesServer) GetMessageHistory

func (UnimplementedMessagesServer) HandleMessages

type UnsafeAuthServer

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

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

type UnsafeMessagesServer

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

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

type User

type User struct {

	// Identification
	ID            string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Username      string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Discriminator string `protobuf:"bytes,3,opt,name=discriminator,proto3" json:"discriminator,omitempty"`
	// Social
	Activity *Activity `protobuf:"bytes,4,opt,name=activity,proto3" json:"activity,omitempty"`
	Servers  []string  `protobuf:"bytes,5,rep,name=servers,proto3" json:"servers,omitempty"`
	Friends  []string  `protobuf:"bytes,6,rep,name=friends,proto3" json:"friends,omitempty"`
	// Authentication
	Token    string `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"`
	Email    string `protobuf:"bytes,8,opt,name=email,proto3" json:"email,omitempty"`
	Salt     []byte `protobuf:"bytes,9,opt,name=Salt,proto3" json:"Salt,omitempty"`
	Password []byte `protobuf:"bytes,10,opt,name=Password,proto3" json:"Password,omitempty"`
	// Misc
	Settings *UserSettings `protobuf:"bytes,11,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetActivity

func (x *User) GetActivity() *Activity

func (*User) GetDiscriminator

func (x *User) GetDiscriminator() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFriends

func (x *User) GetFriends() []string

func (*User) GetID

func (x *User) GetID() string

func (*User) GetPassword

func (x *User) GetPassword() []byte

func (*User) GetSalt

func (x *User) GetSalt() []byte

func (*User) GetServers

func (x *User) GetServers() []string

func (*User) GetSettings

func (x *User) GetSettings() *UserSettings

func (*User) GetToken

func (x *User) GetToken() string

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserSettings

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

func (*UserSettings) Descriptor deprecated

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

Deprecated: Use UserSettings.ProtoReflect.Descriptor instead.

func (*UserSettings) ProtoMessage

func (*UserSettings) ProtoMessage()

func (*UserSettings) ProtoReflect

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

func (*UserSettings) Reset

func (x *UserSettings) Reset()

func (*UserSettings) String

func (x *UserSettings) String() string

Jump to

Keyboard shortcuts

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