signalmeow

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: AGPL-3.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const CIPHERTEXT_OFFSET uint = IV_OFFSET + IV_LENGTH
View Source
const CIPHER_KEY_SIZE uint = 32
View Source
const ContactDiscoveryAuthTTL = 23 * time.Hour
View Source
const IV_LENGTH uint = 16
View Source
const MAC_SIZE uint = 32
View Source
const MaxReadStorageRecords = 2500

MaxReadStorageRecords is the maximum number of storage records to fetch at once from https://github.com/signalapp/Signal-Desktop/blob/v6.44.0/ts/services/storageConstants.ts

View Source
const NONCE_LENGTH = 12
View Source
const PREKEY_BATCH_SIZE = 100
View Source
const ProdContactDiscoveryMrenclave = "0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57"
View Source
const ProdContactDiscoveryServer = "cdsi.signal.org"
View Source
const SUPPORTED_VERSION uint8 = 1
View Source
const TAG_LENGTH_BYTES = 16
View Source
const VERSION_LENGTH uint = 1
View Source
const VERSION_OFFSET uint = 0

Variables

View Source
var (
	NoContentError               = RespError{Err: "NoContentError"}
	GroupPatchNotAcceptedError   = RespError{Err: "GroupPatchNotAcceptedError"}
	ConflictError                = RespError{Err: "ConflictError"}
	AuthorizationFailedError     = RespError{Err: "AuthorizationFailedError"}
	NotFoundError                = RespError{Err: "NotFoundError"}
	ContactManifestMismatchError = RespError{Err: "ContactManifestMismatchError"}
	RateLimitError               = RespError{Err: "RateLimitError"}
	DeprecatedVersionError       = RespError{Err: "DeprecatedVersionError"}
	GroupExistsError             = RespError{Err: "GroupExistsError"}
)
View Source
var ErrInvalidDigestForAttachment = errors.New("invalid digest for attachment")
View Source
var ErrInvalidMACForAttachment = errors.New("invalid MAC for attachment")

ErrInvalidMACForAttachment signals that the downloaded attachment has an invalid MAC.

Functions

func AesgcmDecrypt

func AesgcmDecrypt(key, nonce, data, mac []byte) ([]byte, error)

func AesgcmEncrypt

func AesgcmEncrypt(key, nonce, plaintext []byte) ([]byte, error)

func DataMessageForDelete

func DataMessageForDelete(targetMessageTimestamp uint64) *signalpb.Content

func DataMessageForReaction

func DataMessageForReaction(reaction string, targetMessageSender uuid.UUID, targetMessageTimestamp uint64, removing bool) *signalpb.Content

func DecryptDeviceName

func DecryptDeviceName(wrappedData []byte, identityKey *libsignalgo.PrivateKey) (string, error)

func DeliveredReceiptMessageForTimestamps

func DeliveredReceiptMessageForTimestamps(timestamps []uint64) *signalpb.Content

func DownloadAttachment

func DownloadAttachment(ctx context.Context, a *signalpb.AttachmentPointer) ([]byte, error)

func EncryptDeviceName

func EncryptDeviceName(name string, identityKey *libsignalgo.PublicKey) ([]byte, error)

func GenerateInviteLinkPassword added in v0.6.0

func GenerateInviteLinkPassword() types.SerializedInviteLinkPassword

func GenerateKyberPreKeys

func GenerateKyberPreKeys(startKeyID uint32, count uint32, identityKeyPair *libsignalgo.IdentityKeyPair) []*libsignalgo.KyberPreKeyRecord

func GeneratePreKeys

func GeneratePreKeys(startKeyID uint32, count uint32) []*libsignalgo.PreKeyRecord

func GenerateSignedPreKey

func GenerateSignedPreKey(startSignedKeyId uint32, identityKeyPair *libsignalgo.IdentityKeyPair) *libsignalgo.SignedPreKeyRecord

func InviteLinkPasswordFromBytes added in v0.6.0

func InviteLinkPasswordFromBytes(inviteLinkPassword []byte) types.SerializedInviteLinkPassword

func KyberPreKeyToJSON

func KyberPreKeyToJSON(kyberPreKey *libsignalgo.KyberPreKeyRecord) (map[string]interface{}, error)

func PerformProvisioning

func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, deviceName string) chan ProvisioningResponse

func PreKeyToJSON

func PreKeyToJSON(preKey *libsignalgo.PreKeyRecord) (map[string]interface{}, error)

func ReadReceptMessageForTimestamps

func ReadReceptMessageForTimestamps(timestamps []uint64) *signalpb.Content

func RegisterPreKeys

func RegisterPreKeys(ctx context.Context, generatedPreKeys *GeneratedPreKeys, pni bool, username string, password string) error

func SetLogger

func SetLogger(l zerolog.Logger)

func SignedPreKeyToJSON

func SignedPreKeyToJSON(signedPreKey *libsignalgo.SignedPreKeyRecord) (map[string]interface{}, error)

func TypingMessage

func TypingMessage(isTyping bool) *signalpb.Content

func UnpadPKCS7

func UnpadPKCS7(data []byte) ([]byte, error)

Types

type AccessControl

type AccessControl int32
const (
	AccessControl_UNKNOWN       AccessControl = 0
	AccessControl_ANY           AccessControl = 1
	AccessControl_MEMBER        AccessControl = 2
	AccessControl_ADMINISTRATOR AccessControl = 3
	AccessControl_UNSATISFIABLE AccessControl = 4
)

type AddMember

type AddMember struct {
	GroupMember
	JoinFromInviteLink bool
}

type BannedMember

type BannedMember struct {
	ServiceID libsignalgo.ServiceID
	Timestamp uint64
}

type CDSResponseEntry

type CDSResponseEntry struct {
	ACI uuid.UUID
	PNI uuid.UUID
}

type Capabilities

type Capabilities struct {
	SenderKey         bool `json:"senderKey"`
	AnnouncementGroup bool `json:"announcementGroup"`
	ChangeNumber      bool `json:"changeNumber"`
	Stories           bool `json:"stories"`
	GiftBadges        bool `json:"giftBadges"`
	PaymentActivation bool `json:"paymentActivation"`
	PNI               bool `json:"pni"`
	Gv1Migration      bool `json:"gv1-migration"`
}

type Client

type Client struct {
	Store *store.Device
	Log   zerolog.Logger

	SenderCertificateWithE164 *libsignalgo.SenderCertificate
	SenderCertificateNoE164   *libsignalgo.SenderCertificate
	GroupCredentials          *GroupCredentials
	GroupCache                *GroupCache
	ProfileCache              *ProfileCache
	GroupCallCache            *map[string]bool
	LastContactRequestTime    time.Time
	SyncContactsOnConnect     bool

	AuthedWS   *web.SignalWebsocket
	UnauthedWS *web.SignalWebsocket
	WSCancel   context.CancelFunc

	EventHandler func(events.SignalEvent)
	// contains filtered or unexported fields
}

func (*Client) CheckAndUploadNewPreKeys

func (cli *Client) CheckAndUploadNewPreKeys(ctx context.Context, pks store.PreKeyStore) error

func (*Client) ClearKeysAndDisconnect

func (cli *Client) ClearKeysAndDisconnect(ctx context.Context) error

func (*Client) ConnectAuthedWS

func (cli *Client) ConnectAuthedWS(ctx context.Context, requestHandler web.RequestHandlerFunc) (chan web.SignalWebsocketConnectionStatus, error)

func (*Client) ConnectUnauthedWS

func (cli *Client) ConnectUnauthedWS(ctx context.Context) (chan web.SignalWebsocketConnectionStatus, error)

func (*Client) ContactByACI added in v0.6.0

func (cli *Client) ContactByACI(ctx context.Context, aci uuid.UUID) (*types.Recipient, error)

func (*Client) ContactByE164

func (cli *Client) ContactByE164(ctx context.Context, e164 string) (*types.Recipient, error)

func (*Client) CreateGroup added in v0.6.0

func (cli *Client) CreateGroup(ctx context.Context, decryptedGroup *Group, avatarBytes []byte) (*Group, error)

func (*Client) DecryptGroupChange

func (cli *Client) DecryptGroupChange(ctx context.Context, groupContext *signalpb.GroupContextV2) (*GroupChange, error)

func (*Client) DownloadGroupAvatar

func (cli *Client) DownloadGroupAvatar(ctx context.Context, group GroupAvatarMeta) ([]byte, error)

func (*Client) DownloadUserAvatar

func (cli *Client) DownloadUserAvatar(ctx context.Context, avatarPath string, profileKey libsignalgo.ProfileKey) ([]byte, error)

func (*Client) EncryptAndSignGroupChange added in v0.6.0

func (cli *Client) EncryptAndSignGroupChange(ctx context.Context, decryptedGroupChange *GroupChange, gid types.GroupIdentifier) (*signalpb.GroupChange, error)

func (*Client) EncryptGroup added in v0.6.0

func (cli *Client) EncryptGroup(ctx context.Context, decryptedGroup *Group, groupSecretParams libsignalgo.GroupSecretParams) (*signalpb.Group, error)

func (*Client) FetchAndProcessPreKey

func (cli *Client) FetchAndProcessPreKey(ctx context.Context, theirServiceID libsignalgo.ServiceID, specificDeviceID int) error

func (*Client) FetchExpiringProfileKeyCredentialById added in v0.6.0

func (cli *Client) FetchExpiringProfileKeyCredentialById(ctx context.Context, signalACI uuid.UUID) (*libsignalgo.ExpiringProfileKeyCredential, error)

func (*Client) FetchStorage

func (cli *Client) FetchStorage(ctx context.Context, masterKey []byte, currentVersion uint64, existingKeys []string) (*StorageUpdate, error)

func (*Client) GenerateAndRegisterPreKeys

func (cli *Client) GenerateAndRegisterPreKeys(ctx context.Context, pks store.PreKeyStore) error

func (*Client) GenerateAndSaveNextKyberPreKeyBatch

func (cli *Client) GenerateAndSaveNextKyberPreKeyBatch(ctx context.Context, pks store.PreKeyStore, serverCount int) (bool, error)

func (*Client) GenerateAndSaveNextPreKeyBatch

func (cli *Client) GenerateAndSaveNextPreKeyBatch(ctx context.Context, pks store.PreKeyStore, serverCount int) (bool, error)

func (*Client) GetAuthorizationForToday

func (cli *Client) GetAuthorizationForToday(ctx context.Context, masterKey libsignalgo.GroupMasterKey) (*GroupAuth, error)

func (*Client) GetGroupHistoryPage added in v0.6.0

func (cli *Client) GetGroupHistoryPage(ctx context.Context, gid types.GroupIdentifier, fromRevision uint32, includeFirstState bool) ([]*GroupChangeState, error)

func (*Client) GetMyKeyCounts

func (cli *Client) GetMyKeyCounts(ctx context.Context, pni bool) (int, int, error)

func (*Client) IsConnected

func (cli *Client) IsConnected() bool

func (*Client) IsLoggedIn

func (cli *Client) IsLoggedIn() bool

func (*Client) LastConnectionStatus added in v0.5.1

func (cli *Client) LastConnectionStatus() SignalConnectionStatus

func (*Client) LookupPhone

func (cli *Client) LookupPhone(ctx context.Context, e164s ...uint64) (ContactDiscoveryResponse, error)

func (*Client) ProfileKeyCredentialRequest

func (cli *Client) ProfileKeyCredentialRequest(ctx context.Context, signalACI uuid.UUID) ([]byte, error)

func (*Client) ProfileKeyForSignalID

func (cli *Client) ProfileKeyForSignalID(ctx context.Context, signalACI uuid.UUID) (*libsignalgo.ProfileKey, error)

func (*Client) RegisterAPNs added in v0.6.3

func (cli *Client) RegisterAPNs(ctx context.Context, token string) error

func (*Client) RegisterAllPreKeys

func (cli *Client) RegisterAllPreKeys(ctx context.Context, pks store.PreKeyStore) error

func (*Client) RegisterCapabilities added in v0.7.1

func (cli *Client) RegisterCapabilities(ctx context.Context) error

func (*Client) RegisterFCM added in v0.6.3

func (cli *Client) RegisterFCM(ctx context.Context, token string) error

func (*Client) RetrieveGroupByID

func (cli *Client) RetrieveGroupByID(ctx context.Context, gid types.GroupIdentifier, revision uint32) (*Group, error)

func (*Client) RetrieveProfileByID

func (cli *Client) RetrieveProfileByID(ctx context.Context, signalID uuid.UUID) (*types.Profile, error)

func (*Client) SendContactSyncRequest

func (cli *Client) SendContactSyncRequest(ctx context.Context) error

func (*Client) SendGroupMessage

func (cli *Client) SendGroupMessage(ctx context.Context, gid types.GroupIdentifier, content *signalpb.Content) (*GroupMessageSendResult, error)

func (*Client) SendGroupUpdate added in v0.6.0

func (cli *Client) SendGroupUpdate(ctx context.Context, group *Group, groupContext *signalpb.GroupContextV2, groupChange *GroupChange) (*GroupMessageSendResult, error)

func (*Client) SendMessage

func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.ServiceID, content *signalpb.Content) SendMessageResult

func (*Client) SendStorageMasterKeyRequest added in v0.6.0

func (cli *Client) SendStorageMasterKeyRequest(ctx context.Context) error

func (*Client) StartKeyCheckLoop

func (cli *Client) StartKeyCheckLoop(ctx context.Context)

func (*Client) StartReceiveLoops

func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnectionStatus, error)

func (*Client) StopReceiveLoops

func (cli *Client) StopReceiveLoops() error

func (*Client) StoreContactDetailsAsContact

func (cli *Client) StoreContactDetailsAsContact(ctx context.Context, contactDetails *signalpb.ContactDetails, avatar *[]byte) (*types.Recipient, error)

func (*Client) StoreMasterKey

func (cli *Client) StoreMasterKey(ctx context.Context, groupMasterKey types.SerializedGroupMasterKey) (types.GroupIdentifier, error)

We should store the group master key in the group store as soon as we see it, then use the group identifier to refer to groups. As a convenience, we return the group identifier, which is derived from the group master key.

func (*Client) SyncStorage added in v0.6.0

func (cli *Client) SyncStorage(ctx context.Context)

func (*Client) UpdateActiveCalls

func (cli *Client) UpdateActiveCalls(gid types.GroupIdentifier, callID string) (isActive bool)

We need to track active calls so we don't send too many IncomingSignalMessageCalls Of course for group calls Signal doesn't tell us *anything* so we're mostly just inferring So we just jam a new call ID in, and return true if we *think* this is a new incoming call

func (*Client) UpdateDeviceName

func (cli *Client) UpdateDeviceName(ctx context.Context, name string) error

func (*Client) UpdateGroup added in v0.6.0

func (cli *Client) UpdateGroup(ctx context.Context, groupChange *GroupChange, gid types.GroupIdentifier) (uint32, error)

func (*Client) UploadAttachment

func (cli *Client) UploadAttachment(ctx context.Context, body []byte) (*signalpb.AttachmentPointer, error)

func (*Client) UploadGroupAvatar added in v0.6.0

func (cli *Client) UploadGroupAvatar(ctx context.Context, avatarBytes []byte, gid types.GroupIdentifier) (*string, error)

type ConfirmDeviceResponse

type ConfirmDeviceResponse struct {
	ACI      uuid.UUID `json:"uuid"`
	PNI      uuid.UUID `json:"pni,omitempty"`
	DeviceID int       `json:"deviceId"`
}

type ContactDiscoveryClient

type ContactDiscoveryClient struct {
	CDS *libsignalgo.SGXClientState
	WS  *websocket.Conn

	Token    []byte
	Response ContactDiscoveryResponse
	// contains filtered or unexported fields
}

func (*ContactDiscoveryClient) Handshake

func (cdc *ContactDiscoveryClient) Handshake(ctx context.Context) error

func (*ContactDiscoveryClient) ReadResponse

func (cdc *ContactDiscoveryClient) ReadResponse(ctx context.Context) error

func (*ContactDiscoveryClient) SendRequest

type ContactDiscoveryRateLimitError

type ContactDiscoveryRateLimitError struct {
	RetryAfter time.Duration
}

func (ContactDiscoveryRateLimitError) Error

func (cdrle ContactDiscoveryRateLimitError) Error() string

type ContactDiscoveryResponse

type ContactDiscoveryResponse map[uint64]CDSResponseEntry

type DecryptedStorageRecord

type DecryptedStorageRecord struct {
	ItemType      signalpb.ManifestRecord_Identifier_Type
	StorageID     string
	StorageRecord *signalpb.StorageRecord
}

type DecryptionResult

type DecryptionResult struct {
	SenderAddress *libsignalgo.Address
	Content       *signalpb.Content
	ContentHint   signalpb.UnidentifiedSenderMessage_Message_ContentHint
	SealedSender  bool
	Err           error
}

type FFILogger

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

func (FFILogger) Flush

func (FFILogger) Flush()

func (FFILogger) Log

func (l FFILogger) Log(target string, level libsignalgo.LogLevel, file string, line uint, message string)

type FailedSendResult

type FailedSendResult struct {
	Recipient libsignalgo.ServiceID
	Error     error
}

type GeneratedPreKeys

type GeneratedPreKeys struct {
	PreKeys      []*libsignalgo.PreKeyRecord
	KyberPreKeys []*libsignalgo.KyberPreKeyRecord
	IdentityKey  []uint8
}

type Group

type Group struct {
	GroupIdentifier types.GroupIdentifier // This is what we should use to identify a group outside this file

	Title                        string
	AvatarPath                   string
	Members                      []*GroupMember
	Description                  string
	AnnouncementsOnly            bool
	Revision                     uint32
	DisappearingMessagesDuration uint32
	AccessControl                *GroupAccessControl
	PendingMembers               []*PendingMember
	RequestingMembers            []*RequestingMember
	BannedMembers                []*BannedMember
	InviteLinkPassword           *types.SerializedInviteLinkPassword
	// contains filtered or unexported fields
}

func (*Group) GetAvatarPath

func (group *Group) GetAvatarPath() *string
func (group *Group) GetInviteLink() (string, error)

type GroupAccessControl added in v0.5.1

type GroupAccessControl struct {
	Members           AccessControl
	AddFromInviteLink AccessControl
	Attributes        AccessControl
}

type GroupAuth

type GroupAuth struct {
	Username string
	Password string
}

type GroupAvatarMeta

type GroupAvatarMeta interface {
	GetAvatarPath() *string
	// contains filtered or unexported methods
}

type GroupCache

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

type GroupChange

type GroupChange struct {
	SourceServiceID                    libsignalgo.ServiceID
	Revision                           uint32
	AddMembers                         []*AddMember
	DeleteMembers                      []*uuid.UUID
	ModifyMemberRoles                  []*RoleMember
	ModifyMemberProfileKeys            []*ProfileKeyMember
	AddPendingMembers                  []*PendingMember
	DeletePendingMembers               []*libsignalgo.ServiceID
	PromotePendingMembers              []*PromotePendingMember
	ModifyTitle                        *string
	ModifyAvatar                       *string
	ModifyDisappearingMessagesDuration *uint32
	ModifyAttributesAccess             *AccessControl
	ModifyMemberAccess                 *AccessControl
	ModifyAddFromInviteLinkAccess      *AccessControl
	AddRequestingMembers               []*RequestingMember
	DeleteRequestingMembers            []*uuid.UUID
	PromoteRequestingMembers           []*RoleMember
	ModifyDescription                  *string
	ModifyAnnouncementsOnly            *bool
	AddBannedMembers                   []*BannedMember
	DeleteBannedMembers                []*libsignalgo.ServiceID
	PromotePendingPniAciMembers        []*PromotePendingPniAciMember
	ModifyInviteLinkPassword           *types.SerializedInviteLinkPassword
	// contains filtered or unexported fields
}

func (*GroupChange) GetAvatarPath

func (groupChange *GroupChange) GetAvatarPath() *string

type GroupChangeState added in v0.6.0

type GroupChangeState struct {
	GroupState  *Group
	GroupChange *GroupChange
}

type GroupCredential

type GroupCredential struct {
	Credential     []byte
	RedemptionTime int64
}

type GroupCredentials

type GroupCredentials struct {
	Credentials []GroupCredential `json:"credentials"`
	PNI         uuid.UUID         `json:"pni"`
}

type GroupExternalCredential

type GroupExternalCredential struct {
	Token []byte `json:"token"`
}

type GroupMember

type GroupMember struct {
	ACI              uuid.UUID
	Role             GroupMemberRole
	ProfileKey       libsignalgo.ProfileKey
	JoinedAtRevision uint32
}

func (*GroupMember) UserServiceID added in v0.6.0

func (gm *GroupMember) UserServiceID() libsignalgo.ServiceID

type GroupMemberRole

type GroupMemberRole int32
const (
	// Note: right now we assume these match the equivalent values in the protobuf (signalpb.Member_Role)
	GroupMember_UNKNOWN       GroupMemberRole = 0
	GroupMember_DEFAULT       GroupMemberRole = 1
	GroupMember_ADMINISTRATOR GroupMemberRole = 2
)

type GroupMessageSendResult

type GroupMessageSendResult struct {
	SuccessfullySentTo []SuccessfulSendResult
	FailedToSendTo     []FailedSendResult
}

type MyMessage

type MyMessage struct {
	Type                      int    `json:"type"`
	DestinationDeviceID       int    `json:"destinationDeviceId"`
	DestinationRegistrationID int    `json:"destinationRegistrationId"`
	Content                   string `json:"content"`
}

type MyMessages

type MyMessages struct {
	Timestamp uint64      `json:"timestamp"`
	Online    bool        `json:"online"`
	Urgent    bool        `json:"urgent"`
	Messages  []MyMessage `json:"messages"`
}

type PendingMember

type PendingMember struct {
	ServiceID     libsignalgo.ServiceID
	Role          GroupMemberRole
	AddedByUserID uuid.UUID
	Timestamp     uint64
}

type ProfileCache

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

type ProfileKeyMember

type ProfileKeyMember struct {
	ACI        uuid.UUID
	ProfileKey libsignalgo.ProfileKey
}

type ProfileResponse

type ProfileResponse struct {
	UUID uuid.UUID `json:"uuid"`

	Name       []byte `json:"name"`
	About      []byte `json:"about"`
	AboutEmoji []byte `json:"aboutEmoji"`
	Avatar     string `json:"avatar"`

	Capabilities Capabilities `json:"capabilities"`

	Credential         []byte `json:"credential"`
	IdentityKey        []byte `json:"identityKey"`
	UnidentifiedAccess []byte `json:"unidentifiedAccess"`

	UnrestrictedUnidentifiedAccess bool `json:"UnrestrictedUnidentifiedAccess"`
}

type PromotePendingMember added in v0.7.0

type PromotePendingMember struct {
	ACI        uuid.UUID
	ProfileKey libsignalgo.ProfileKey
}

type PromotePendingPniAciMember added in v0.6.0

type PromotePendingPniAciMember struct {
	ACI        uuid.UUID
	ProfileKey libsignalgo.ProfileKey
	PNI        uuid.UUID
}

type ProvisioningCipher

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

func NewProvisioningCipher

func NewProvisioningCipher() *ProvisioningCipher

func (*ProvisioningCipher) Decrypt

func (*ProvisioningCipher) GetPublicKey

func (c *ProvisioningCipher) GetPublicKey() *libsignalgo.PublicKey

type ProvisioningResponse

type ProvisioningResponse struct {
	State            ProvisioningState
	ProvisioningURL  string
	ProvisioningData *store.DeviceData
	Err              error
}

Enum for the provisioningUrl, ProvisioningMessage, and error

type ProvisioningState

type ProvisioningState int
const (
	StateProvisioningError ProvisioningState = iota
	StateProvisioningURLReceived
	StateProvisioningDataReceived
	StateProvisioningPreKeysRegistered
)

func (ProvisioningState) String

func (s ProvisioningState) String() string

type ReqRegisterAPNs added in v0.6.3

type ReqRegisterAPNs struct {
	APNRegistrationID  string `json:"apnRegistrationId,omitempty"`
	VoIPRegistrationID string `json:"voipRegistrationId,omitempty"`
}

type ReqRegisterFCM added in v0.6.3

type ReqRegisterFCM struct {
	GCMRegistrationID string `json:"gcmRegistrationId,omitempty"`
	WebSocketChannel  bool   `json:"webSocketChannel"`
}

type RequestingMember

type RequestingMember struct {
	ACI        uuid.UUID
	ProfileKey libsignalgo.ProfileKey
	Timestamp  uint64
}

type RespError added in v0.6.0

type RespError struct {
	Err string
}

func (RespError) Error added in v0.6.0

func (e RespError) Error() string

type RoleMember

type RoleMember struct {
	ACI  uuid.UUID
	Role GroupMemberRole
}

type SendMessageResult

type SendMessageResult struct {
	WasSuccessful bool
	SuccessfulSendResult
	FailedSendResult
}

type SendResult added in v0.6.2

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

type SignalConnectionEvent

type SignalConnectionEvent int
const (
	SignalConnectionEventNone SignalConnectionEvent = iota
	SignalConnectionEventConnected
	SignalConnectionEventDisconnected
	SignalConnectionEventLoggedOut
	SignalConnectionEventError
	SignalConnectionCleanShutdown
)

func (SignalConnectionEvent) String

func (s SignalConnectionEvent) String() string

Implement the fmt.Stringer interface

type SignalConnectionStatus

type SignalConnectionStatus struct {
	Event SignalConnectionEvent
	Err   error
}

type StorageUpdate

type StorageUpdate struct {
	Version        uint64
	NewRecords     []*DecryptedStorageRecord
	RemovedRecords []string
	MissingRecords []string
}

type SuccessfulSendResult

type SuccessfulSendResult struct {
	Recipient              libsignalgo.ServiceID
	RecipientE164          *string
	Unidentified           bool
	DestinationIdentityKey *libsignalgo.IdentityKey
}

Directories

Path Synopsis
Package wspb provides helpers for reading and writing protobuf messages.
Package wspb provides helpers for reading and writing protobuf messages.

Jump to

Keyboard shortcuts

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