Documentation ¶
Index ¶
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- func RegisterMessagesServer(s grpc.ServiceRegistrar, srv MessagesServer)
- type Activity
- type AuthAck
- func (*AuthAck) Descriptor() ([]byte, []int)deprecated
- func (x *AuthAck) GetExpiry() *timestamp.Timestamp
- func (x *AuthAck) GetSessionToken() string
- func (x *AuthAck) GetUsername() string
- func (*AuthAck) ProtoMessage()
- func (x *AuthAck) ProtoReflect() protoreflect.Message
- func (x *AuthAck) Reset()
- func (x *AuthAck) String() string
- type AuthClient
- type AuthServer
- type Authenticate
- func (*Authenticate) Descriptor() ([]byte, []int)deprecated
- func (x *Authenticate) GetID() string
- func (x *Authenticate) GetToken() string
- func (*Authenticate) ProtoMessage()
- func (x *Authenticate) ProtoReflect() protoreflect.Message
- func (x *Authenticate) Reset()
- func (x *Authenticate) String() string
- type ClientAuth
- type CreateMessage
- type CreateUser
- func (*CreateUser) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUser) GetEmail() string
- func (x *CreateUser) GetPassword() string
- func (x *CreateUser) GetUsername() string
- func (*CreateUser) ProtoMessage()
- func (x *CreateUser) ProtoReflect() protoreflect.Message
- func (x *CreateUser) Reset()
- func (x *CreateUser) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetContent() string
- func (x *Message) GetMessageID() string
- func (x *Message) GetSentAt() *timestamp.Timestamp
- func (x *Message) GetUserID() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessageHistory
- func (*MessageHistory) Descriptor() ([]byte, []int)deprecated
- func (x *MessageHistory) GetMessages() []*Message
- func (x *MessageHistory) GetNumberOfMessages() int64
- func (x *MessageHistory) GetPages() int32
- func (*MessageHistory) ProtoMessage()
- func (x *MessageHistory) ProtoReflect() protoreflect.Message
- func (x *MessageHistory) Reset()
- func (x *MessageHistory) String() string
- type MessagesClient
- type MessagesServer
- type Messages_HandleMessagesClient
- type Messages_HandleMessagesServer
- type Nil
- type RequestMessageHistory
- func (*RequestMessageHistory) Descriptor() ([]byte, []int)deprecated
- func (x *RequestMessageHistory) GetLastMessageTime() *timestamp.Timestamp
- func (*RequestMessageHistory) ProtoMessage()
- func (x *RequestMessageHistory) ProtoReflect() protoreflect.Message
- func (x *RequestMessageHistory) Reset()
- func (x *RequestMessageHistory) String() string
- type UnimplementedAuthServer
- type UnimplementedMessagesServer
- type UnsafeAuthServer
- type UnsafeMessagesServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetActivity() *Activity
- func (x *User) GetDiscriminator() string
- func (x *User) GetEmail() string
- func (x *User) GetFriends() []string
- func (x *User) GetID() string
- func (x *User) GetPassword() []byte
- func (x *User) GetSalt() []byte
- func (x *User) GetServers() []string
- func (x *User) GetSettings() *UserSettings
- func (x *User) GetToken() string
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserSettings
Constants ¶
This section is empty.
Variables ¶
var File_auth_proto protoreflect.FileDescriptor
var File_message_proto protoreflect.FileDescriptor
var File_user_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) ProtoMessage ¶
func (*Activity) ProtoMessage()
func (*Activity) ProtoReflect ¶
func (x *Activity) ProtoReflect() protoreflect.Message
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) GetSessionToken ¶
func (*AuthAck) GetUsername ¶
func (*AuthAck) ProtoMessage ¶
func (*AuthAck) ProtoMessage()
func (*AuthAck) ProtoReflect ¶
func (x *AuthAck) ProtoReflect() protoreflect.Message
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.go.dev/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) GetContent ¶
func (*Message) GetMessageID ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
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.go.dev/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) ProtoMessage ¶
func (*Nil) ProtoMessage()
func (*Nil) ProtoReflect ¶
func (x *Nil) ProtoReflect() protoreflect.Message
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 ¶
func (UnimplementedAuthServer) Login(context.Context, *ClientAuth) (*AuthAck, error)
type UnimplementedMessagesServer ¶
type UnimplementedMessagesServer struct { }
UnimplementedMessagesServer must be embedded to have forward compatible implementations.
func (UnimplementedMessagesServer) GetMessageHistory ¶
func (UnimplementedMessagesServer) GetMessageHistory(context.Context, *RequestMessageHistory) (*MessageHistory, error)
func (UnimplementedMessagesServer) HandleMessages ¶
func (UnimplementedMessagesServer) HandleMessages(Messages_HandleMessagesServer) error
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) GetActivity ¶
func (*User) GetDiscriminator ¶
func (*User) GetFriends ¶
func (*User) GetPassword ¶
func (*User) GetServers ¶
func (*User) GetSettings ¶
func (x *User) GetSettings() *UserSettings
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
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