Versions in this module Expand all Collapse all v5 v5.0.1 Nov 10, 2022 v5.0.0 Nov 10, 2022 Changes in this version + const UnrecognizedCode + const UnrecognizedMessage + func AsyncRequestRestLike(e2eID int, recipient, request, paramsJSON []byte, cb RestlikeCallback) error + func ConstructIdentity(pubKey []byte, codesetVersion int) ([]byte, error) + func CreateUserFriendlyErrorMessage(errStr string) string + func DecodePrivateURL(url, password string) (string, error) + func DecodePublicURL(url string) (string, error) + func DownloadAndVerifySignedNdfWithUrl(url, cert string) ([]byte, error) + func EnableGrpcLogs(writer LogWriter) + func GenerateChannel(cmixID int, name, description string, privacyLevel int) ([]byte, error) + func GenerateChannelIdentity(cmixID int) ([]byte, error) + func GenerateSecret(numBytes int) []byte + func GetChannelInfo(prettyPrint string) ([]byte, error) + func GetChannelJSON(prettyPrint string) ([]byte, error) + func GetDefaultCMixParams() []byte + func GetDefaultE2EParams() []byte + func GetDefaultE2eFileTransferParams() []byte + func GetDefaultFileTransferParams() []byte + func GetDefaultSingleUseParams() []byte + func GetDependencies() string + func GetFactsFromContact(marshaledContact []byte) ([]byte, error) + func GetGitVersion() string + func GetIDFromContact(marshaledContact []byte) ([]byte, error) + func GetNotificationsReport(notificationCSV string, marshalledServices []byte) ([]byte, error) + func GetPubkeyFromContact(marshaledContact []byte) ([]byte, error) + func GetPublicChannelIdentity(marshaledPublic []byte) ([]byte, error) + func GetPublicChannelIdentityFromPrivate(marshaledPrivate []byte) ([]byte, error) + func GetSavedChannelPrivateKeyUNSAFE(cmixID int, channelIdBase64 string) (string, error) + func GetShareUrlType(url string) (int, error) + func GetVersion() string + func ImportPrivateIdentity(password string, data []byte) ([]byte, error) + func IsNicknameValid(nick string) error + func IsRegisteredWithUD(e2eId int) (bool, error) + func LoadReceptionIdentity(key string, cmixId int) ([]byte, error) + func LogLevel(level int) error + func LookupUD(e2eID int, udContact []byte, cb UdLookupCallback, lookupId []byte, ...) ([]byte, error) + func MultiLookupUD(e2eID int, udContact []byte, cb UdMultiLookupCallback, lookupIds []byte, ...) error + func NewCmix(ndfJSON, storageDir string, password []byte, registrationCode string) error + func NewCmixFromBackup(ndfJSON, storageDir, backupPassphrase string, ...) ([]byte, error) + func NewEventModel(em EventModel) channels.EventModel + func RegisterForNotifications(e2eId int, token string) error + func RegisterLogWriter(writer LogWriter) + func RequestRestLike(e2eID int, recipient, request, paramsJSON []byte) ([]byte, error) + func RestlikeRequest(cmixId, connectionID int, request, e2eParamsJSON []byte) ([]byte, error) + func RestlikeRequestAuth(cmixId, authConnectionID int, request, e2eParamsJSON []byte) ([]byte, error) + func SearchUD(e2eID int, udContact []byte, cb UdSearchCallback, ...) ([]byte, error) + func SetDashboardURL(newURL string) + func SetFactsOnContact(marshaledContact []byte, factListJSON []byte) ([]byte, error) + func SetOffset(offset int64) + func SetTimeSource(timeNow netTime.TimeSource) + func StoreReceptionIdentity(key string, identity []byte, cmixId int) error + func TransmitSingleUse(e2eID int, recipient []byte, tag string, payload, paramsJSON []byte, ...) ([]byte, error) + func UnregisterForNotifications(e2eId int) error + func UpdateCommonErrors(jsonFile string) error + type AuthCallbacks interface + Confirm func(contact, receptionId []byte, ephemeralId, roundId int64) + Request func(contact, receptionId []byte, ephemeralId, roundId int64) + Reset func(contact, receptionId []byte, ephemeralId, roundId int64) + type AuthenticatedConnection struct + func (_ *AuthenticatedConnection) IsAuthenticated() bool + type Backup struct + func InitializeBackup(e2eID, udID int, backupPassPhrase string, cb UpdateBackupFunc) (*Backup, error) + func ResumeBackup(e2eID, udID int, cb UpdateBackupFunc) (*Backup, error) + func (b *Backup) AddJson(json string) + func (b *Backup) IsBackupRunning() bool + func (b *Backup) StopBackup() error + type BackupReport struct + Params string + RestoredContacts []*id.ID + type ChannelDbCipher struct + func GetChannelDbCipherTrackerFromID(id int) (*ChannelDbCipher, error) + func NewChannelsDatabaseCipher(cmixID int, password []byte, plaintTextBlockSize int) (*ChannelDbCipher, error) + func (c *ChannelDbCipher) Decrypt(ciphertext []byte) ([]byte, error) + func (c *ChannelDbCipher) Encrypt(plaintext []byte) ([]byte, error) + func (c *ChannelDbCipher) GetID() int + type ChannelGeneration struct + Channel string + PrivateKey string + type ChannelInfo struct + ChannelID string + Description string + Name string + type ChannelMessageReceptionCallback interface + Callback func(receivedChannelMessageReport []byte, err error) int + type ChannelSendReport struct + EphId int64 + MessageId []byte + type ChannelsManager struct + func LoadChannelsManager(cmixID int, storageTag string, eventBuilder EventModelBuilder) (*ChannelsManager, error) + func LoadChannelsManagerGoEventModel(cmixID int, storageTag string, goEventBuilder channels.EventModelBuilder) (*ChannelsManager, error) + func NewChannelsManager(cmixID int, privateIdentity []byte, eventBuilder EventModelBuilder) (*ChannelsManager, error) + func NewChannelsManagerGoEventModel(cmixID int, privateIdentity []byte, goEventBuilder channels.EventModelBuilder) (*ChannelsManager, error) + func (cm *ChannelsManager) DeleteNickname(ch []byte) error + func (cm *ChannelsManager) ExportPrivateIdentity(password string) ([]byte, error) + func (cm *ChannelsManager) GetChannels() ([]byte, error) + func (cm *ChannelsManager) GetID() int + func (cm *ChannelsManager) GetIdentity() ([]byte, error) + func (cm *ChannelsManager) GetNickname(ch []byte) (string, error) + func (cm *ChannelsManager) GetShareURL(cmixID int, host string, maxUses int, marshalledChanId []byte) ([]byte, error) + func (cm *ChannelsManager) GetStorageTag() string + func (cm *ChannelsManager) JoinChannel(channelPretty string) ([]byte, error) + func (cm *ChannelsManager) LeaveChannel(marshalledChanId []byte) error + func (cm *ChannelsManager) RegisterReceiveHandler(messageType int, listenerCb ChannelMessageReceptionCallback) error + func (cm *ChannelsManager) ReplayChannel(marshalledChanId []byte) error + func (cm *ChannelsManager) SendAdminGeneric(adminPrivateKey, marshalledChanId []byte, messageType int, message []byte, ...) ([]byte, error) + func (cm *ChannelsManager) SendGeneric(marshalledChanId []byte, messageType int, message []byte, leaseTimeMS int64, ...) ([]byte, error) + func (cm *ChannelsManager) SendMessage(marshalledChanId []byte, message string, leaseTimeMS int64, ...) ([]byte, error) + func (cm *ChannelsManager) SendReaction(marshalledChanId []byte, reaction string, messageToReactTo []byte, ...) ([]byte, error) + func (cm *ChannelsManager) SendReply(marshalledChanId []byte, message string, messageToReactTo []byte, ...) ([]byte, error) + func (cm *ChannelsManager) SetNickname(newNick string, ch []byte) error + type ClientError interface + Report func(source, message, trace string) + type Cmix struct + func LoadCmix(storageDir string, password []byte, cmixParamsJSON []byte) (*Cmix, error) + func (c *Cmix) AddHealthCallback(nhc NetworkHealthCallback) int64 + func (c *Cmix) ChangeNumberOfNodeRegistrations(toRun, timeoutMS int) error + func (c *Cmix) Connect(e2eId int, recipientContact, e2eParamsJSON []byte) (*Connection, error) + func (c *Cmix) ConnectWithAuthentication(e2eId int, recipientContact, e2eParamsJSON []byte) (*AuthenticatedConnection, error) + func (c *Cmix) GetID() int + func (c *Cmix) GetNodeRegistrationStatus() ([]byte, error) + func (c *Cmix) GetReceptionRegistrationValidationSignature() []byte + func (c *Cmix) GetRunningProcesses() ([]byte, error) + func (c *Cmix) HasRunningProcessies() bool + func (c *Cmix) IsHealthy() bool + func (c *Cmix) IsReady(percentReady float64) ([]byte, error) + func (c *Cmix) MakeLegacyReceptionIdentity() ([]byte, error) + func (c *Cmix) MakeReceptionIdentity() ([]byte, error) + func (c *Cmix) NetworkFollowerStatus() int + func (c *Cmix) PauseNodeRegistrations(timeoutMS int) error + func (c *Cmix) ReadyToSend() bool + func (c *Cmix) RegisterClientErrorCallback(clientError ClientError) + func (c *Cmix) RemoveHealthCallback(funcID int64) + func (c *Cmix) StartNetworkFollower(timeoutMS int) error + func (c *Cmix) StopNetworkFollower() error + func (c *Cmix) TrackServices(cb TrackServicesCallback) + func (c *Cmix) TrackServicesWithIdentity(e2eId int, cb TrackServicesCallback) error + func (c *Cmix) WaitForNetwork(timeoutMS int) bool + func (c *Cmix) WaitForRoundResult(roundList []byte, mdc MessageDeliveryCallback, timeoutMS int) error + type Connection struct + func (c *Connection) Close() error + func (c *Connection) GetId() int + func (c *Connection) GetPartner() []byte + func (c *Connection) RegisterListener(messageType int, newListener Listener) error + func (c *Connection) SendE2E(mt int, payload []byte) ([]byte, error) + type DummyTraffic struct + func NewDummyTrafficManager(cmixId, maxNumMessages, avgSendDeltaMS, randomRangeMS int) (*DummyTraffic, error) + func (dt *DummyTraffic) GetStatus() bool + func (dt *DummyTraffic) SetStatus(status bool) error + type E2ESendReport struct + KeyResidue []byte + MessageID []byte + RoundURL string + Timestamp int64 + type E2e struct + func Login(cmixId int, callbacks AuthCallbacks, identity, e2eParamsJSON []byte) (*E2e, error) + func LoginEphemeral(cmixId int, callbacks AuthCallbacks, identity, e2eParamsJSON []byte) (*E2e, error) + func (e *E2e) AddPartnerCallback(partnerID []byte, cb AuthCallbacks) error + func (e *E2e) AddService(tag string, processor Processor) error + func (e *E2e) CallAllReceivedRequests() + func (e *E2e) Confirm(partnerContact []byte) (int64, error) + func (e *E2e) DeleteAllRequests() error + func (e *E2e) DeleteContact(partnerID []byte) error + func (e *E2e) DeletePartnerCallback(partnerID []byte) error + func (e *E2e) DeleteReceiveRequests() error + func (e *E2e) DeleteRequest(partnerID []byte) error + func (e *E2e) DeleteSentRequests() error + func (e *E2e) FirstPartitionSize() int + func (e *E2e) GetAllPartnerIDs() ([]byte, error) + func (e *E2e) GetContact() []byte + func (e *E2e) GetHistoricalDHPrivkey() ([]byte, error) + func (e *E2e) GetHistoricalDHPubkey() ([]byte, error) + func (e *E2e) GetID() int + func (e *E2e) GetReceivedRequest(partnerID []byte) ([]byte, error) + func (e *E2e) GetReceptionID() []byte + func (e *E2e) GetUdAddressFromNdf() string + func (e *E2e) GetUdCertFromNdf() []byte + func (e *E2e) GetUdContactFromNdf() ([]byte, error) + func (e *E2e) HasAuthenticatedChannel(partnerId []byte) (bool, error) + func (e *E2e) PartitionSize(payloadIndex int) int + func (e *E2e) PayloadSize() int + func (e *E2e) RegisterListener(senderID []byte, messageType int, newListener Listener) error + func (e *E2e) RemoveService(tag string) error + func (e *E2e) ReplayConfirm(partnerID []byte) (int64, error) + func (e *E2e) Request(partnerContact, factsListJson []byte) (int64, error) + func (e *E2e) Reset(partnerContact []byte) (int64, error) + func (e *E2e) SecondPartitionSize() int + func (e *E2e) SendE2E(messageType int, recipientId, payload, e2eParamsJSON []byte) ([]byte, error) + func (e *E2e) VerifyOwnership(receivedContact, verifiedContact []byte, e2eId int) (bool, error) + type EventModel interface + JoinChannel func(channel string) + LeaveChannel func(channelID []byte) + ReceiveMessage func(channelID, messageID []byte, nickname, text string, pubKey []byte, codeset int, ...) int64 + ReceiveReaction func(channelID, messageID, reactionTo []byte, nickname, reaction string, ...) int64 + ReceiveReply func(channelID, messageID, reactionTo []byte, nickname, text string, pubKey []byte, ...) int64 + UpdateSentStatus func(uuid int64, messageID []byte, timestamp, roundID, status int64) + type EventModelBuilder interface + Build func(path string) EventModel + type EventReport struct + Category string + Details string + EventType string + Priority int + type FilePartTracker struct + func (fpt FilePartTracker) GetNumParts() int + func (fpt FilePartTracker) GetPartStatus(partNum int) int + type FileSend struct + Contents []byte + Name string + Preview []byte + Type string + type FileTransfer struct + func InitFileTransfer(e2eID int, receiveFileCallback ReceiveFileCallback, ...) (*FileTransfer, error) + func (f *FileTransfer) CloseSend(tidBytes []byte) error + func (f *FileTransfer) MaxFileNameLen() int + func (f *FileTransfer) MaxFileSize() int + func (f *FileTransfer) MaxFileTypeLen() int + func (f *FileTransfer) MaxPreviewSize() int + func (f *FileTransfer) Receive(tidBytes []byte) ([]byte, error) + func (f *FileTransfer) RegisterReceivedProgressCallback(tidBytes []byte, callback FileTransferReceiveProgressCallback, period int) error + func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte, callback FileTransferSentProgressCallback, period int) error + func (f *FileTransfer) Send(payload, recipientID []byte, retry float32, ...) ([]byte, error) + type FileTransferReceiveProgressCallback interface + Callback func(payload []byte, t *FilePartTracker, err error) + type FileTransferSentProgressCallback interface + Callback func(payload []byte, t *FilePartTracker, err error) + type Group struct + func DeserializeGroup(serializedGroupData []byte) (*Group, error) + func (g *Group) GetCreatedMS() int64 + func (g *Group) GetCreatedNano() int64 + func (g *Group) GetID() []byte + func (g *Group) GetInitMessage() []byte + func (g *Group) GetMembership() ([]byte, error) + func (g *Group) GetName() []byte + func (g *Group) Serialize() []byte + type GroupChat struct + func NewGroupChat(e2eID int, requestFunc GroupRequest, processor GroupChatProcessor) (*GroupChat, error) + func (g *GroupChat) GetGroup(groupId []byte) (*Group, error) + func (g *GroupChat) GetGroups() ([]byte, error) + func (g *GroupChat) JoinGroup(serializedGroupData []byte) error + func (g *GroupChat) LeaveGroup(groupId []byte) error + func (g *GroupChat) MakeGroup(membershipBytes, message, name []byte) ([]byte, error) + func (g *GroupChat) NumGroups() int + func (g *GroupChat) ResendRequest(groupId []byte) ([]byte, error) + func (g *GroupChat) Send(groupId, message []byte, tag string) ([]byte, error) + type GroupChatMessage struct + GroupId []byte + MessageId []byte + Payload []byte + SenderId []byte + Timestamp int64 + type GroupChatProcessor interface + Process func(decryptedMessage, msg, receptionId []byte, ephemeralId, roundId int64, ...) + type GroupReport struct + Id []byte + RoundURL string + Status int + type GroupRequest interface + Callback func(g *Group) + type GroupSendReport struct + MessageID []byte + RoundURL string + Timestamp int64 + type IsReadyInfo struct + HowClose float64 + IsReady bool + type Listener interface + Hear func(item []byte) + Name func() string + type LogWriter interface + Log func(string) + type Message struct + Encrypted bool + EphemeralID int64 + ID []byte + MessageType int + Payload []byte + RecipientID []byte + RoundId int + RoundURL string + Sender []byte + Timestamp int64 + type MessageDeliveryCallback interface + EventCallback func(delivered, timedOut bool, roundResults []byte) + type NetworkHealthCallback interface + Callback func(bool) + type NodeRegistrationReport struct + NumberOfNodes int + NumberOfNodesRegistered int + type NotificationReport struct + ForMe bool + Source []byte + Type string + type NotificationReports []NotificationReport + type Processor interface + Process func(message []byte, receptionId []byte, ephemeralId int64, roundId int64) + type Progress struct + Completed bool + Total int + TransferID *ftCrypto.TransferID + Transmitted int + type ReceiveFileCallback interface + Callback func(payload []byte) + type ReceivedChannelMessageReport struct + ChannelId []byte + Codeset int + Content []byte + Lease int64 + MessageId []byte + MessageType int + Nickname string + PubKey []byte + Timestamp int64 + type ReceivedFile struct + Name string + Preview []byte + SenderID *id.ID + Size int + TransferID *ftCrypto.TransferID + Type string + type ReceptionIdentity struct + DHKeyPrivate []byte + E2eGrp []byte + ID []byte + RSAPrivatePem []byte + Salt []byte + type ReporterFunc interface + Report func(payload []byte, err error) + type RestlikeCallback interface + Callback func([]byte, error) + type RestlikeMessage struct + Content []byte + Error string + Headers []byte + Method int + URI string + Version uint32 + type RoundsList struct + Rounds []uint64 + func (rl RoundsList) Marshal() ([]byte, error) + type ShareURL struct + Password string + URL string + type SingleUseCallback interface + Callback func(callbackReport []byte, err error) + type SingleUseCallbackReport struct + EphID int64 + Partner *id.ID + Payload []byte + ReceptionID *id.ID + RoundURL string + type SingleUseResponse interface + Callback func(responseReport []byte, err error) + type SingleUseResponseReport struct + EphID int64 + Err error + Payload []byte + ReceptionID *id.ID + RoundURL string + type SingleUseSendReport struct + EphID int64 + ReceptionID *id.ID + RoundURL string + type Stopper interface + Stop func() + func Listen(e2eID int, tag string, cb SingleUseCallback) (Stopper, error) + type TrackServicesCallback interface + Callback func(marshalData []byte, err error) + type UdLookupCallback interface + Callback func(contactBytes []byte, err error) + type UdMultiLookupCallback interface + Callback func(contactListJSON []byte, failedIDs []byte, err error) + type UdNetworkStatus interface + UdNetworkStatus func() int + type UdSearchCallback interface + Callback func(contactListJSON []byte, err error) + type UpdateBackupFunc interface + UpdateBackup func(encryptedBackup []byte) + type UserDiscovery struct + func NewOrLoadUd(e2eID int, follower UdNetworkStatus, username string, ...) (*UserDiscovery, error) + func NewUdManagerFromBackup(e2eID int, follower UdNetworkStatus, cert, contactFile []byte, address string) (*UserDiscovery, error) + func (ud *UserDiscovery) ConfirmFact(confirmationID, code string) error + func (ud *UserDiscovery) GetContact() ([]byte, error) + func (ud *UserDiscovery) GetFacts() []byte + func (ud *UserDiscovery) GetID() int + func (ud *UserDiscovery) PermanentDeleteAccount(factJson []byte) error + func (ud *UserDiscovery) RemoveFact(factJson []byte) error + func (ud *UserDiscovery) SendRegisterFact(factJson []byte) (string, error) Other modules containing this package gitlab.com/elixxir/client/v4