Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterStrikeServer(s grpc.ServiceRegistrar, srv StrikeServer)
- type BeginChatRequest
- func (*BeginChatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BeginChatRequest) GetChat() *Chat
- func (x *BeginChatRequest) GetInitiator() string
- func (x *BeginChatRequest) GetInviteId() string
- func (x *BeginChatRequest) GetTarget() string
- func (*BeginChatRequest) ProtoMessage()
- func (x *BeginChatRequest) ProtoReflect() protoreflect.Message
- func (x *BeginChatRequest) Reset()
- func (x *BeginChatRequest) String() string
- type Chat
- func (*Chat) Descriptor() ([]byte, []int)deprecated
- func (x *Chat) GetCreatedAt() *timestamppb.Timestamp
- func (x *Chat) GetId() string
- func (x *Chat) GetName() string
- func (x *Chat) GetParticipants() []string
- func (x *Chat) GetState() Chat_State
- func (x *Chat) GetUpdatedAt() *timestamppb.Timestamp
- func (*Chat) ProtoMessage()
- func (x *Chat) ProtoReflect() protoreflect.Message
- func (x *Chat) Reset()
- func (x *Chat) String() string
- type Chat_State
- type ConfirmChatRequest
- func (*ConfirmChatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConfirmChatRequest) GetChat() *Chat
- func (x *ConfirmChatRequest) GetConfirmer() string
- func (x *ConfirmChatRequest) GetInitiator() string
- func (x *ConfirmChatRequest) GetInviteId() string
- func (x *ConfirmChatRequest) GetState() bool
- func (*ConfirmChatRequest) ProtoMessage()
- func (x *ConfirmChatRequest) ProtoReflect() protoreflect.Message
- func (x *ConfirmChatRequest) Reset()
- func (x *ConfirmChatRequest) String() string
- type EncryptedEnvelope
- func (*EncryptedEnvelope) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptedEnvelope) GetEncryptedPayload() []byte
- func (x *EncryptedEnvelope) GetNonce() []byte
- func (x *EncryptedEnvelope) GetRecipientPublicKey() []byte
- func (x *EncryptedEnvelope) GetSenderPublicKey() []byte
- func (x *EncryptedEnvelope) GetSentAt() *timestamppb.Timestamp
- func (x *EncryptedEnvelope) GetSignature() []byte
- func (*EncryptedEnvelope) ProtoMessage()
- func (x *EncryptedEnvelope) ProtoReflect() protoreflect.Message
- func (x *EncryptedEnvelope) Reset()
- func (x *EncryptedEnvelope) String() string
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)deprecated
- func (x *Envelope) GetChat() *Chat
- func (x *Envelope) GetFromUser() string
- func (x *Envelope) GetMessage() string
- func (x *Envelope) GetSenderPublicKey() []byte
- func (x *Envelope) GetSentAt() *timestamppb.Timestamp
- func (x *Envelope) GetToUser() string
- func (*Envelope) ProtoMessage()
- func (x *Envelope) ProtoReflect() protoreflect.Message
- func (x *Envelope) Reset()
- func (x *Envelope) String() string
- type InitUser
- func (*InitUser) Descriptor() ([]byte, []int)deprecated
- func (x *InitUser) GetEncryptionPublicKey() []byte
- func (x *InitUser) GetPasswordHash() string
- func (x *InitUser) GetSalt() *Salt
- func (x *InitUser) GetSigningPublicKey() []byte
- func (x *InitUser) GetUserId() string
- func (x *InitUser) GetUsername() string
- func (*InitUser) ProtoMessage()
- func (x *InitUser) ProtoReflect() protoreflect.Message
- func (x *InitUser) Reset()
- func (x *InitUser) String() string
- type KeyExchangeConfirmation
- func (*KeyExchangeConfirmation) Descriptor() ([]byte, []int)deprecated
- func (x *KeyExchangeConfirmation) GetChatId() string
- func (x *KeyExchangeConfirmation) GetConfirmerUserId() string
- func (x *KeyExchangeConfirmation) GetStatus() bool
- func (*KeyExchangeConfirmation) ProtoMessage()
- func (x *KeyExchangeConfirmation) ProtoReflect() protoreflect.Message
- func (x *KeyExchangeConfirmation) Reset()
- func (x *KeyExchangeConfirmation) String() string
- type KeyExchangeRequest
- func (*KeyExchangeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KeyExchangeRequest) GetChatId() string
- func (x *KeyExchangeRequest) GetCurvePublicKey() []byte
- func (x *KeyExchangeRequest) GetNonce() []byte
- func (x *KeyExchangeRequest) GetSenderUserId() string
- func (x *KeyExchangeRequest) GetSignatures() [][]byte
- func (x *KeyExchangeRequest) GetTarget() string
- func (*KeyExchangeRequest) ProtoMessage()
- func (x *KeyExchangeRequest) ProtoReflect() protoreflect.Message
- func (x *KeyExchangeRequest) Reset()
- func (x *KeyExchangeRequest) String() string
- type KeyExchangeResponse
- func (*KeyExchangeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *KeyExchangeResponse) GetChatId() string
- func (x *KeyExchangeResponse) GetCurvePublicKey() []byte
- func (x *KeyExchangeResponse) GetNonce() []byte
- func (x *KeyExchangeResponse) GetResponderUserId() string
- func (x *KeyExchangeResponse) GetSignatures() [][]byte
- func (*KeyExchangeResponse) ProtoMessage()
- func (x *KeyExchangeResponse) ProtoReflect() protoreflect.Message
- func (x *KeyExchangeResponse) Reset()
- func (x *KeyExchangeResponse) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetPasswordHash() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type Salt
- type ServerResponse
- func (*ServerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ServerResponse) GetMessage() string
- func (x *ServerResponse) GetSuccess() bool
- func (*ServerResponse) ProtoMessage()
- func (x *ServerResponse) ProtoReflect() protoreflect.Message
- func (x *ServerResponse) Reset()
- func (x *ServerResponse) String() string
- type StatusUpdate
- func (*StatusUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *StatusUpdate) GetMessage() string
- func (x *StatusUpdate) GetUpdatedAt() *timestamppb.Timestamp
- func (*StatusUpdate) ProtoMessage()
- func (x *StatusUpdate) ProtoReflect() protoreflect.Message
- func (x *StatusUpdate) Reset()
- func (x *StatusUpdate) String() string
- type StreamPayload
- func (*StreamPayload) Descriptor() ([]byte, []int)deprecated
- func (x *StreamPayload) GetChatConfirm() *ConfirmChatRequest
- func (x *StreamPayload) GetChatRequest() *BeginChatRequest
- func (x *StreamPayload) GetEnvelope() *Envelope
- func (x *StreamPayload) GetKeyExchConfirm() *KeyExchangeConfirmation
- func (x *StreamPayload) GetKeyExchRequest() *KeyExchangeRequest
- func (x *StreamPayload) GetKeyExchResponse() *KeyExchangeResponse
- func (m *StreamPayload) GetPayload() isStreamPayload_Payload
- func (x *StreamPayload) GetTarget() string
- func (x *StreamPayload) GetTargetId() string
- func (*StreamPayload) ProtoMessage()
- func (x *StreamPayload) ProtoReflect() protoreflect.Message
- func (x *StreamPayload) Reset()
- func (x *StreamPayload) String() string
- type StreamPayload_ChatConfirm
- type StreamPayload_ChatRequest
- type StreamPayload_Envelope
- type StreamPayload_KeyExchConfirm
- type StreamPayload_KeyExchRequest
- type StreamPayload_KeyExchResponse
- type StrikeClient
- type StrikeServer
- type Strike_PayloadStreamClient
- type Strike_PayloadStreamServer
- type Strike_UserStatusClient
- type Strike_UserStatusServer
- type UnimplementedStrikeServer
- func (UnimplementedStrikeServer) ConfirmChat(context.Context, *ConfirmChatRequest) (*ServerResponse, error)
- func (UnimplementedStrikeServer) Login(context.Context, *LoginRequest) (*ServerResponse, error)
- func (UnimplementedStrikeServer) PayloadStream(*UserInfo, Strike_PayloadStreamServer) error
- func (UnimplementedStrikeServer) SaltMine(context.Context, *UserInfo) (*Salt, error)
- func (UnimplementedStrikeServer) SendPayload(context.Context, *StreamPayload) (*ServerResponse, error)
- func (UnimplementedStrikeServer) Signup(context.Context, *InitUser) (*ServerResponse, error)
- func (UnimplementedStrikeServer) UserStatus(*UserInfo, Strike_UserStatusServer) error
- type UnsafeStrikeServer
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetEncryptionPublicKey() []byte
- func (x *UserInfo) GetSigningPublicKey() []byte
- func (x *UserInfo) GetUserId() string
- func (x *UserInfo) GetUsername() string
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
Constants ¶
const ( Strike_Signup_FullMethodName = "/message.Strike/Signup" Strike_ConfirmChat_FullMethodName = "/message.Strike/ConfirmChat" Strike_Login_FullMethodName = "/message.Strike/Login" Strike_SaltMine_FullMethodName = "/message.Strike/SaltMine" Strike_SendPayload_FullMethodName = "/message.Strike/SendPayload" Strike_UserStatus_FullMethodName = "/message.Strike/UserStatus" Strike_PayloadStream_FullMethodName = "/message.Strike/PayloadStream" )
Variables ¶
var ( Chat_State_name = map[int32]string{ 0: "DEFAULT", 1: "INIT", 2: "KEY_EXCHANGE_PENDING", 3: "ENCRYPTED", } Chat_State_value = map[string]int32{ "DEFAULT": 0, "INIT": 1, "KEY_EXCHANGE_PENDING": 2, "ENCRYPTED": 3, } )
Enum value maps for Chat_State.
var File_message_proto protoreflect.FileDescriptor
var Strike_ServiceDesc = grpc.ServiceDesc{ ServiceName: "message.Strike", HandlerType: (*StrikeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Signup", Handler: _Strike_Signup_Handler, }, { MethodName: "ConfirmChat", Handler: _Strike_ConfirmChat_Handler, }, { MethodName: "Login", Handler: _Strike_Login_Handler, }, { MethodName: "SaltMine", Handler: _Strike_SaltMine_Handler, }, { MethodName: "SendPayload", Handler: _Strike_SendPayload_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "UserStatus", Handler: _Strike_UserStatus_Handler, ServerStreams: true, }, { StreamName: "PayloadStream", Handler: _Strike_PayloadStream_Handler, ServerStreams: true, }, }, Metadata: "message.proto", }
Strike_ServiceDesc is the grpc.ServiceDesc for Strike service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStrikeServer ¶
func RegisterStrikeServer(s grpc.ServiceRegistrar, srv StrikeServer)
Types ¶
type BeginChatRequest ¶
type BeginChatRequest struct { InviteId string `protobuf:"bytes,1,opt,name=invite_id,json=inviteId,proto3" json:"invite_id,omitempty"` //UUID of invite Initiator string `protobuf:"bytes,2,opt,name=initiator,proto3" json:"initiator,omitempty"` // client beginning chat username Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` // target client username Chat *Chat `protobuf:"bytes,4,opt,name=chat,proto3" json:"chat,omitempty"` // contains filtered or unexported fields }
func (*BeginChatRequest) Descriptor
deprecated
func (*BeginChatRequest) Descriptor() ([]byte, []int)
Deprecated: Use BeginChatRequest.ProtoReflect.Descriptor instead.
func (*BeginChatRequest) GetChat ¶
func (x *BeginChatRequest) GetChat() *Chat
func (*BeginChatRequest) GetInitiator ¶
func (x *BeginChatRequest) GetInitiator() string
func (*BeginChatRequest) GetInviteId ¶
func (x *BeginChatRequest) GetInviteId() string
func (*BeginChatRequest) GetTarget ¶
func (x *BeginChatRequest) GetTarget() string
func (*BeginChatRequest) ProtoMessage ¶
func (*BeginChatRequest) ProtoMessage()
func (*BeginChatRequest) ProtoReflect ¶
func (x *BeginChatRequest) ProtoReflect() protoreflect.Message
func (*BeginChatRequest) Reset ¶
func (x *BeginChatRequest) Reset()
func (*BeginChatRequest) String ¶
func (x *BeginChatRequest) String() string
type Chat ¶
type Chat struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` State Chat_State `protobuf:"varint,3,opt,name=state,proto3,enum=message.Chat_State" json:"state,omitempty"` Participants []string `protobuf:"bytes,4,rep,name=participants,proto3" json:"participants,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Chat) Descriptor
deprecated
func (*Chat) GetCreatedAt ¶
func (x *Chat) GetCreatedAt() *timestamppb.Timestamp
func (*Chat) GetParticipants ¶
func (*Chat) GetState ¶
func (x *Chat) GetState() Chat_State
func (*Chat) GetUpdatedAt ¶
func (x *Chat) GetUpdatedAt() *timestamppb.Timestamp
func (*Chat) ProtoMessage ¶
func (*Chat) ProtoMessage()
func (*Chat) ProtoReflect ¶
func (x *Chat) ProtoReflect() protoreflect.Message
type Chat_State ¶
type Chat_State int32
const ( Chat_DEFAULT Chat_State = 0 Chat_INIT Chat_State = 1 Chat_KEY_EXCHANGE_PENDING Chat_State = 2 Chat_ENCRYPTED Chat_State = 3 )
func (Chat_State) Descriptor ¶
func (Chat_State) Descriptor() protoreflect.EnumDescriptor
func (Chat_State) Enum ¶
func (x Chat_State) Enum() *Chat_State
func (Chat_State) EnumDescriptor
deprecated
func (Chat_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Chat_State.Descriptor instead.
func (Chat_State) Number ¶
func (x Chat_State) Number() protoreflect.EnumNumber
func (Chat_State) String ¶
func (x Chat_State) String() string
func (Chat_State) Type ¶
func (Chat_State) Type() protoreflect.EnumType
type ConfirmChatRequest ¶
type ConfirmChatRequest struct { InviteId string `protobuf:"bytes,1,opt,name=invite_id,json=inviteId,proto3" json:"invite_id,omitempty"` //UUID of invite Initiator string `protobuf:"bytes,2,opt,name=initiator,proto3" json:"initiator,omitempty"` Confirmer string `protobuf:"bytes,3,opt,name=confirmer,proto3" json:"confirmer,omitempty"` // target user accepting chat State bool `protobuf:"varint,4,opt,name=state,proto3" json:"state,omitempty"` // yes/no Chat *Chat `protobuf:"bytes,5,opt,name=chat,proto3" json:"chat,omitempty"` // contains filtered or unexported fields }
func (*ConfirmChatRequest) Descriptor
deprecated
func (*ConfirmChatRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConfirmChatRequest.ProtoReflect.Descriptor instead.
func (*ConfirmChatRequest) GetChat ¶
func (x *ConfirmChatRequest) GetChat() *Chat
func (*ConfirmChatRequest) GetConfirmer ¶
func (x *ConfirmChatRequest) GetConfirmer() string
func (*ConfirmChatRequest) GetInitiator ¶
func (x *ConfirmChatRequest) GetInitiator() string
func (*ConfirmChatRequest) GetInviteId ¶
func (x *ConfirmChatRequest) GetInviteId() string
func (*ConfirmChatRequest) GetState ¶
func (x *ConfirmChatRequest) GetState() bool
func (*ConfirmChatRequest) ProtoMessage ¶
func (*ConfirmChatRequest) ProtoMessage()
func (*ConfirmChatRequest) ProtoReflect ¶
func (x *ConfirmChatRequest) ProtoReflect() protoreflect.Message
func (*ConfirmChatRequest) Reset ¶
func (x *ConfirmChatRequest) Reset()
func (*ConfirmChatRequest) String ¶
func (x *ConfirmChatRequest) String() string
type EncryptedEnvelope ¶
type EncryptedEnvelope struct { SenderPublicKey []byte `protobuf:"bytes,1,opt,name=sender_public_key,json=senderPublicKey,proto3" json:"sender_public_key,omitempty"` // public Curve25519 sender RecipientPublicKey []byte `protobuf:"bytes,2,opt,name=recipient_public_key,json=recipientPublicKey,proto3" json:"recipient_public_key,omitempty"` // public Curve25519 recipient Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` // sender ED25519 signature of encrypted_payload Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` // number once - encryption EncryptedPayload []byte `protobuf:"bytes,5,opt,name=encrypted_payload,json=encryptedPayload,proto3" json:"encrypted_payload,omitempty"` // encrypted message content SentAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` // timestamp // contains filtered or unexported fields }
func (*EncryptedEnvelope) Descriptor
deprecated
func (*EncryptedEnvelope) Descriptor() ([]byte, []int)
Deprecated: Use EncryptedEnvelope.ProtoReflect.Descriptor instead.
func (*EncryptedEnvelope) GetEncryptedPayload ¶
func (x *EncryptedEnvelope) GetEncryptedPayload() []byte
func (*EncryptedEnvelope) GetNonce ¶
func (x *EncryptedEnvelope) GetNonce() []byte
func (*EncryptedEnvelope) GetRecipientPublicKey ¶
func (x *EncryptedEnvelope) GetRecipientPublicKey() []byte
func (*EncryptedEnvelope) GetSenderPublicKey ¶
func (x *EncryptedEnvelope) GetSenderPublicKey() []byte
func (*EncryptedEnvelope) GetSentAt ¶
func (x *EncryptedEnvelope) GetSentAt() *timestamppb.Timestamp
func (*EncryptedEnvelope) GetSignature ¶
func (x *EncryptedEnvelope) GetSignature() []byte
func (*EncryptedEnvelope) ProtoMessage ¶
func (*EncryptedEnvelope) ProtoMessage()
func (*EncryptedEnvelope) ProtoReflect ¶
func (x *EncryptedEnvelope) ProtoReflect() protoreflect.Message
func (*EncryptedEnvelope) Reset ¶
func (x *EncryptedEnvelope) Reset()
func (*EncryptedEnvelope) String ¶
func (x *EncryptedEnvelope) String() string
type Envelope ¶
type Envelope struct { SenderPublicKey []byte `protobuf:"bytes,1,opt,name=Sender_public_key,json=SenderPublicKey,proto3" json:"Sender_public_key,omitempty"` SentAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` ToUser string `protobuf:"bytes,3,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` FromUser string `protobuf:"bytes,4,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` Chat *Chat `protobuf:"bytes,5,opt,name=chat,proto3" json:"chat,omitempty"` Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
-----------------------------------Messages---------------------------------------------
func (*Envelope) Descriptor
deprecated
func (*Envelope) GetFromUser ¶
func (*Envelope) GetMessage ¶
func (*Envelope) GetSenderPublicKey ¶
func (*Envelope) GetSentAt ¶
func (x *Envelope) GetSentAt() *timestamppb.Timestamp
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) ProtoReflect ¶
func (x *Envelope) ProtoReflect() protoreflect.Message
type InitUser ¶
type InitUser struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` PasswordHash string `protobuf:"bytes,3,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` Salt *Salt `protobuf:"bytes,4,opt,name=salt,proto3" json:"salt,omitempty"` // byte array - https://protobuf.dev/programming-guides/proto3/#scalar EncryptionPublicKey []byte `protobuf:"bytes,5,opt,name=encryption_public_key,json=encryptionPublicKey,proto3" json:"encryption_public_key,omitempty"` // client Curve25519 public key SigningPublicKey []byte `protobuf:"bytes,6,opt,name=signing_public_key,json=signingPublicKey,proto3" json:"signing_public_key,omitempty"` // client ED25519 signing key // contains filtered or unexported fields }
func (*InitUser) Descriptor
deprecated
func (*InitUser) GetEncryptionPublicKey ¶
func (*InitUser) GetPasswordHash ¶
func (*InitUser) GetSigningPublicKey ¶
func (*InitUser) GetUsername ¶
func (*InitUser) ProtoMessage ¶
func (*InitUser) ProtoMessage()
func (*InitUser) ProtoReflect ¶
func (x *InitUser) ProtoReflect() protoreflect.Message
type KeyExchangeConfirmation ¶
type KeyExchangeConfirmation struct { ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` ConfirmerUserId string `protobuf:"bytes,3,opt,name=confirmer_user_id,json=confirmerUserId,proto3" json:"confirmer_user_id,omitempty"` // contains filtered or unexported fields }
func (*KeyExchangeConfirmation) Descriptor
deprecated
func (*KeyExchangeConfirmation) Descriptor() ([]byte, []int)
Deprecated: Use KeyExchangeConfirmation.ProtoReflect.Descriptor instead.
func (*KeyExchangeConfirmation) GetChatId ¶
func (x *KeyExchangeConfirmation) GetChatId() string
func (*KeyExchangeConfirmation) GetConfirmerUserId ¶
func (x *KeyExchangeConfirmation) GetConfirmerUserId() string
func (*KeyExchangeConfirmation) GetStatus ¶
func (x *KeyExchangeConfirmation) GetStatus() bool
func (*KeyExchangeConfirmation) ProtoMessage ¶
func (*KeyExchangeConfirmation) ProtoMessage()
func (*KeyExchangeConfirmation) ProtoReflect ¶
func (x *KeyExchangeConfirmation) ProtoReflect() protoreflect.Message
func (*KeyExchangeConfirmation) Reset ¶
func (x *KeyExchangeConfirmation) Reset()
func (*KeyExchangeConfirmation) String ¶
func (x *KeyExchangeConfirmation) String() string
type KeyExchangeRequest ¶
type KeyExchangeRequest struct { ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` SenderUserId string `protobuf:"bytes,3,opt,name=sender_user_id,json=senderUserId,proto3" json:"sender_user_id,omitempty"` CurvePublicKey []byte `protobuf:"bytes,4,opt,name=curve_public_key,json=curvePublicKey,proto3" json:"curve_public_key,omitempty"` Nonce []byte `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` Signatures [][]byte `protobuf:"bytes,6,rep,name=signatures,proto3" json:"signatures,omitempty"` // contains filtered or unexported fields }
-----------------------------------Key Exchange--------------------------------------------- TODO: these could proably be a single type
func (*KeyExchangeRequest) Descriptor
deprecated
func (*KeyExchangeRequest) Descriptor() ([]byte, []int)
Deprecated: Use KeyExchangeRequest.ProtoReflect.Descriptor instead.
func (*KeyExchangeRequest) GetChatId ¶
func (x *KeyExchangeRequest) GetChatId() string
func (*KeyExchangeRequest) GetCurvePublicKey ¶
func (x *KeyExchangeRequest) GetCurvePublicKey() []byte
func (*KeyExchangeRequest) GetNonce ¶
func (x *KeyExchangeRequest) GetNonce() []byte
func (*KeyExchangeRequest) GetSenderUserId ¶
func (x *KeyExchangeRequest) GetSenderUserId() string
func (*KeyExchangeRequest) GetSignatures ¶
func (x *KeyExchangeRequest) GetSignatures() [][]byte
func (*KeyExchangeRequest) GetTarget ¶
func (x *KeyExchangeRequest) GetTarget() string
func (*KeyExchangeRequest) ProtoMessage ¶
func (*KeyExchangeRequest) ProtoMessage()
func (*KeyExchangeRequest) ProtoReflect ¶
func (x *KeyExchangeRequest) ProtoReflect() protoreflect.Message
func (*KeyExchangeRequest) Reset ¶
func (x *KeyExchangeRequest) Reset()
func (*KeyExchangeRequest) String ¶
func (x *KeyExchangeRequest) String() string
type KeyExchangeResponse ¶
type KeyExchangeResponse struct { ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` ResponderUserId string `protobuf:"bytes,2,opt,name=responder_user_id,json=responderUserId,proto3" json:"responder_user_id,omitempty"` CurvePublicKey []byte `protobuf:"bytes,3,opt,name=curve_public_key,json=curvePublicKey,proto3" json:"curve_public_key,omitempty"` Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` Signatures [][]byte `protobuf:"bytes,5,rep,name=signatures,proto3" json:"signatures,omitempty"` // contains filtered or unexported fields }
func (*KeyExchangeResponse) Descriptor
deprecated
func (*KeyExchangeResponse) Descriptor() ([]byte, []int)
Deprecated: Use KeyExchangeResponse.ProtoReflect.Descriptor instead.
func (*KeyExchangeResponse) GetChatId ¶
func (x *KeyExchangeResponse) GetChatId() string
func (*KeyExchangeResponse) GetCurvePublicKey ¶
func (x *KeyExchangeResponse) GetCurvePublicKey() []byte
func (*KeyExchangeResponse) GetNonce ¶
func (x *KeyExchangeResponse) GetNonce() []byte
func (*KeyExchangeResponse) GetResponderUserId ¶
func (x *KeyExchangeResponse) GetResponderUserId() string
func (*KeyExchangeResponse) GetSignatures ¶
func (x *KeyExchangeResponse) GetSignatures() [][]byte
func (*KeyExchangeResponse) ProtoMessage ¶
func (*KeyExchangeResponse) ProtoMessage()
func (*KeyExchangeResponse) ProtoReflect ¶
func (x *KeyExchangeResponse) ProtoReflect() protoreflect.Message
func (*KeyExchangeResponse) Reset ¶
func (x *KeyExchangeResponse) Reset()
func (*KeyExchangeResponse) String ¶
func (x *KeyExchangeResponse) String() string
type LoginRequest ¶
type LoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` PasswordHash string `protobuf:"bytes,2,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetPasswordHash ¶
func (x *LoginRequest) GetPasswordHash() string
func (*LoginRequest) GetUsername ¶
func (x *LoginRequest) GetUsername() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type Salt ¶
type Salt struct { Salt []byte `protobuf:"bytes,1,opt,name=salt,proto3" json:"salt,omitempty"` // contains filtered or unexported fields }
TODO: Getting very verbose here, prune
func (*Salt) Descriptor
deprecated
func (*Salt) ProtoMessage ¶
func (*Salt) ProtoMessage()
func (*Salt) ProtoReflect ¶
func (x *Salt) ProtoReflect() protoreflect.Message
type ServerResponse ¶
type ServerResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` //TODO: Have server sign this? // contains filtered or unexported fields }
func (*ServerResponse) Descriptor
deprecated
func (*ServerResponse) Descriptor() ([]byte, []int)
Deprecated: Use ServerResponse.ProtoReflect.Descriptor instead.
func (*ServerResponse) GetMessage ¶
func (x *ServerResponse) GetMessage() string
func (*ServerResponse) GetSuccess ¶
func (x *ServerResponse) GetSuccess() bool
func (*ServerResponse) ProtoMessage ¶
func (*ServerResponse) ProtoMessage()
func (*ServerResponse) ProtoReflect ¶
func (x *ServerResponse) ProtoReflect() protoreflect.Message
func (*ServerResponse) Reset ¶
func (x *ServerResponse) Reset()
func (*ServerResponse) String ¶
func (x *ServerResponse) String() string
type StatusUpdate ¶
type StatusUpdate struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` //"online/offline" UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*StatusUpdate) Descriptor
deprecated
func (*StatusUpdate) Descriptor() ([]byte, []int)
Deprecated: Use StatusUpdate.ProtoReflect.Descriptor instead.
func (*StatusUpdate) GetMessage ¶
func (x *StatusUpdate) GetMessage() string
func (*StatusUpdate) GetUpdatedAt ¶
func (x *StatusUpdate) GetUpdatedAt() *timestamppb.Timestamp
func (*StatusUpdate) ProtoMessage ¶
func (*StatusUpdate) ProtoMessage()
func (*StatusUpdate) ProtoReflect ¶
func (x *StatusUpdate) ProtoReflect() protoreflect.Message
func (*StatusUpdate) Reset ¶
func (x *StatusUpdate) Reset()
func (*StatusUpdate) String ¶
func (x *StatusUpdate) String() string
type StreamPayload ¶
type StreamPayload struct { Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` TargetId string `protobuf:"bytes,2,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` // Types that are assignable to Payload: // // *StreamPayload_ChatRequest // *StreamPayload_ChatConfirm // *StreamPayload_Envelope // *StreamPayload_KeyExchRequest // *StreamPayload_KeyExchResponse // *StreamPayload_KeyExchConfirm Payload isStreamPayload_Payload `protobuf_oneof:"payload"` // contains filtered or unexported fields }
TODO: this is getting messy
func (*StreamPayload) Descriptor
deprecated
func (*StreamPayload) Descriptor() ([]byte, []int)
Deprecated: Use StreamPayload.ProtoReflect.Descriptor instead.
func (*StreamPayload) GetChatConfirm ¶
func (x *StreamPayload) GetChatConfirm() *ConfirmChatRequest
func (*StreamPayload) GetChatRequest ¶
func (x *StreamPayload) GetChatRequest() *BeginChatRequest
func (*StreamPayload) GetEnvelope ¶
func (x *StreamPayload) GetEnvelope() *Envelope
func (*StreamPayload) GetKeyExchConfirm ¶
func (x *StreamPayload) GetKeyExchConfirm() *KeyExchangeConfirmation
func (*StreamPayload) GetKeyExchRequest ¶
func (x *StreamPayload) GetKeyExchRequest() *KeyExchangeRequest
func (*StreamPayload) GetKeyExchResponse ¶
func (x *StreamPayload) GetKeyExchResponse() *KeyExchangeResponse
func (*StreamPayload) GetPayload ¶
func (m *StreamPayload) GetPayload() isStreamPayload_Payload
func (*StreamPayload) GetTarget ¶
func (x *StreamPayload) GetTarget() string
func (*StreamPayload) GetTargetId ¶
func (x *StreamPayload) GetTargetId() string
func (*StreamPayload) ProtoMessage ¶
func (*StreamPayload) ProtoMessage()
func (*StreamPayload) ProtoReflect ¶
func (x *StreamPayload) ProtoReflect() protoreflect.Message
func (*StreamPayload) Reset ¶
func (x *StreamPayload) Reset()
func (*StreamPayload) String ¶
func (x *StreamPayload) String() string
type StreamPayload_ChatConfirm ¶
type StreamPayload_ChatConfirm struct {
ChatConfirm *ConfirmChatRequest `protobuf:"bytes,4,opt,name=chat_confirm,json=chatConfirm,proto3,oneof"`
}
type StreamPayload_ChatRequest ¶
type StreamPayload_ChatRequest struct {
ChatRequest *BeginChatRequest `protobuf:"bytes,3,opt,name=chat_request,json=chatRequest,proto3,oneof"`
}
type StreamPayload_Envelope ¶
type StreamPayload_Envelope struct {
Envelope *Envelope `protobuf:"bytes,5,opt,name=envelope,proto3,oneof"`
}
type StreamPayload_KeyExchConfirm ¶
type StreamPayload_KeyExchConfirm struct {
KeyExchConfirm *KeyExchangeConfirmation `protobuf:"bytes,8,opt,name=key_exch_confirm,json=keyExchConfirm,proto3,oneof"`
}
type StreamPayload_KeyExchRequest ¶
type StreamPayload_KeyExchRequest struct {
KeyExchRequest *KeyExchangeRequest `protobuf:"bytes,6,opt,name=key_exch_request,json=keyExchRequest,proto3,oneof"`
}
type StreamPayload_KeyExchResponse ¶
type StreamPayload_KeyExchResponse struct {
KeyExchResponse *KeyExchangeResponse `protobuf:"bytes,7,opt,name=key_exch_response,json=keyExchResponse,proto3,oneof"`
}
type StrikeClient ¶
type StrikeClient interface { Signup(ctx context.Context, in *InitUser, opts ...grpc.CallOption) (*ServerResponse, error) ConfirmChat(ctx context.Context, in *ConfirmChatRequest, opts ...grpc.CallOption) (*ServerResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*ServerResponse, error) SaltMine(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*Salt, error) SendPayload(ctx context.Context, in *StreamPayload, opts ...grpc.CallOption) (*ServerResponse, error) UserStatus(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (Strike_UserStatusClient, error) PayloadStream(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (Strike_PayloadStreamClient, error) }
StrikeClient is the client API for Strike 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 NewStrikeClient ¶
func NewStrikeClient(cc grpc.ClientConnInterface) StrikeClient
type StrikeServer ¶
type StrikeServer interface { Signup(context.Context, *InitUser) (*ServerResponse, error) ConfirmChat(context.Context, *ConfirmChatRequest) (*ServerResponse, error) Login(context.Context, *LoginRequest) (*ServerResponse, error) SaltMine(context.Context, *UserInfo) (*Salt, error) SendPayload(context.Context, *StreamPayload) (*ServerResponse, error) UserStatus(*UserInfo, Strike_UserStatusServer) error PayloadStream(*UserInfo, Strike_PayloadStreamServer) error // contains filtered or unexported methods }
StrikeServer is the server API for Strike service. All implementations must embed UnimplementedStrikeServer for forward compatibility
type Strike_PayloadStreamClient ¶
type Strike_PayloadStreamClient interface { Recv() (*StreamPayload, error) grpc.ClientStream }
type Strike_PayloadStreamServer ¶
type Strike_PayloadStreamServer interface { Send(*StreamPayload) error grpc.ServerStream }
type Strike_UserStatusClient ¶
type Strike_UserStatusClient interface { Recv() (*StatusUpdate, error) grpc.ClientStream }
type Strike_UserStatusServer ¶
type Strike_UserStatusServer interface { Send(*StatusUpdate) error grpc.ServerStream }
type UnimplementedStrikeServer ¶
type UnimplementedStrikeServer struct { }
UnimplementedStrikeServer must be embedded to have forward compatible implementations.
func (UnimplementedStrikeServer) ConfirmChat ¶
func (UnimplementedStrikeServer) ConfirmChat(context.Context, *ConfirmChatRequest) (*ServerResponse, error)
func (UnimplementedStrikeServer) Login ¶
func (UnimplementedStrikeServer) Login(context.Context, *LoginRequest) (*ServerResponse, error)
func (UnimplementedStrikeServer) PayloadStream ¶
func (UnimplementedStrikeServer) PayloadStream(*UserInfo, Strike_PayloadStreamServer) error
func (UnimplementedStrikeServer) SendPayload ¶
func (UnimplementedStrikeServer) SendPayload(context.Context, *StreamPayload) (*ServerResponse, error)
func (UnimplementedStrikeServer) Signup ¶
func (UnimplementedStrikeServer) Signup(context.Context, *InitUser) (*ServerResponse, error)
func (UnimplementedStrikeServer) UserStatus ¶
func (UnimplementedStrikeServer) UserStatus(*UserInfo, Strike_UserStatusServer) error
type UnsafeStrikeServer ¶
type UnsafeStrikeServer interface {
// contains filtered or unexported methods
}
UnsafeStrikeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StrikeServer will result in compilation errors.
type UserInfo ¶
type UserInfo struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // UUID as String UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` EncryptionPublicKey []byte `protobuf:"bytes,3,opt,name=encryption_public_key,json=encryptionPublicKey,proto3" json:"encryption_public_key,omitempty"` SigningPublicKey []byte `protobuf:"bytes,4,opt,name=signing_public_key,json=signingPublicKey,proto3" json:"signing_public_key,omitempty"` // contains filtered or unexported fields }
TODO: Lots of cleaning
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetEncryptionPublicKey ¶
func (*UserInfo) GetSigningPublicKey ¶
func (*UserInfo) GetUsername ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message