Documentation
¶
Index ¶
- Constants
- Variables
- func AesgcmDecrypt(key, nonce, data, mac []byte) ([]byte, error)
- func AesgcmEncrypt(key, nonce, plaintext []byte) ([]byte, error)
- func DataMessageForDelete(targetMessageTimestamp uint64) *signalpb.Content
- func DataMessageForReaction(reaction string, targetMessageSender uuid.UUID, targetMessageTimestamp uint64, ...) *signalpb.Content
- func DecryptDeviceName(wrappedData []byte, identityKey *libsignalgo.PrivateKey) (string, error)
- func DeliveredReceiptMessageForTimestamps(timestamps []uint64) *signalpb.Content
- func DownloadAttachment(ctx context.Context, a *signalpb.AttachmentPointer) ([]byte, error)
- func EncryptDeviceName(name string, identityKey *libsignalgo.PublicKey) ([]byte, error)
- func GenerateInviteLinkPassword() types.SerializedInviteLinkPassword
- func GenerateKyberPreKeys(startKeyID uint32, count uint32, identityKeyPair *libsignalgo.IdentityKeyPair) []*libsignalgo.KyberPreKeyRecord
- func GeneratePreKeys(startKeyID uint32, count uint32) []*libsignalgo.PreKeyRecord
- func GenerateSignedPreKey(startSignedKeyId uint32, identityKeyPair *libsignalgo.IdentityKeyPair) *libsignalgo.SignedPreKeyRecord
- func InviteLinkPasswordFromBytes(inviteLinkPassword []byte) types.SerializedInviteLinkPassword
- func KyberPreKeyToJSON(kyberPreKey *libsignalgo.KyberPreKeyRecord) (map[string]interface{}, error)
- func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, deviceName string) chan ProvisioningResponse
- func PreKeyToJSON(preKey *libsignalgo.PreKeyRecord) (map[string]interface{}, error)
- func ReadReceptMessageForTimestamps(timestamps []uint64) *signalpb.Content
- func RegisterPreKeys(ctx context.Context, generatedPreKeys *GeneratedPreKeys, pni bool, ...) error
- func SetLogger(l zerolog.Logger)
- func SignedPreKeyToJSON(signedPreKey *libsignalgo.SignedPreKeyRecord) (map[string]interface{}, error)
- func TypingMessage(isTyping bool) *signalpb.Content
- func UnpadPKCS7(data []byte) ([]byte, error)
- type AccessControl
- type AddMember
- type BannedMember
- type CDSResponseEntry
- type Capabilities
- type Client
- func (cli *Client) CheckAndUploadNewPreKeys(ctx context.Context, pks store.PreKeyStore) error
- func (cli *Client) ClearKeysAndDisconnect(ctx context.Context) error
- func (cli *Client) ConnectAuthedWS(ctx context.Context, requestHandler web.RequestHandlerFunc) (chan web.SignalWebsocketConnectionStatus, error)
- func (cli *Client) ConnectUnauthedWS(ctx context.Context) (chan web.SignalWebsocketConnectionStatus, error)
- func (cli *Client) ContactByACI(ctx context.Context, aci uuid.UUID) (*types.Recipient, error)
- func (cli *Client) ContactByE164(ctx context.Context, e164 string) (*types.Recipient, error)
- func (cli *Client) CreateGroup(ctx context.Context, decryptedGroup *Group, avatarBytes []byte) (*Group, error)
- func (cli *Client) DecryptGroupChange(ctx context.Context, groupContext *signalpb.GroupContextV2) (*GroupChange, error)
- func (cli *Client) DownloadGroupAvatar(ctx context.Context, group GroupAvatarMeta) ([]byte, error)
- func (cli *Client) DownloadUserAvatar(ctx context.Context, avatarPath string, profileKey libsignalgo.ProfileKey) ([]byte, error)
- func (cli *Client) EncryptAndSignGroupChange(ctx context.Context, decryptedGroupChange *GroupChange, ...) (*signalpb.GroupChange, error)
- func (cli *Client) EncryptGroup(ctx context.Context, decryptedGroup *Group, ...) (*signalpb.Group, error)
- func (cli *Client) FetchAndProcessPreKey(ctx context.Context, theirServiceID libsignalgo.ServiceID, ...) error
- func (cli *Client) FetchExpiringProfileKeyCredentialById(ctx context.Context, signalACI uuid.UUID) (*libsignalgo.ExpiringProfileKeyCredential, error)
- func (cli *Client) FetchStorage(ctx context.Context, masterKey []byte, currentVersion uint64, ...) (*StorageUpdate, error)
- func (cli *Client) GenerateAndRegisterPreKeys(ctx context.Context, pks store.PreKeyStore) error
- func (cli *Client) GenerateAndSaveNextKyberPreKeyBatch(ctx context.Context, pks store.PreKeyStore, serverCount int) (bool, error)
- func (cli *Client) GenerateAndSaveNextPreKeyBatch(ctx context.Context, pks store.PreKeyStore, serverCount int) (bool, error)
- func (cli *Client) GetAuthorizationForToday(ctx context.Context, masterKey libsignalgo.GroupMasterKey) (*GroupAuth, error)
- func (cli *Client) GetGroupHistoryPage(ctx context.Context, gid types.GroupIdentifier, fromRevision uint32, ...) ([]*GroupChangeState, error)
- func (cli *Client) GetMyKeyCounts(ctx context.Context, pni bool) (int, int, error)
- func (cli *Client) IsConnected() bool
- func (cli *Client) IsLoggedIn() bool
- func (cli *Client) LastConnectionStatus() SignalConnectionStatus
- func (cli *Client) LookupPhone(ctx context.Context, e164s ...uint64) (ContactDiscoveryResponse, error)
- func (cli *Client) ProfileKeyCredentialRequest(ctx context.Context, signalACI uuid.UUID) ([]byte, error)
- func (cli *Client) ProfileKeyForSignalID(ctx context.Context, signalACI uuid.UUID) (*libsignalgo.ProfileKey, error)
- func (cli *Client) RegisterAllPreKeys(ctx context.Context, pks store.PreKeyStore) error
- func (cli *Client) RetrieveGroupByID(ctx context.Context, gid types.GroupIdentifier, revision uint32) (*Group, error)
- func (cli *Client) RetrieveProfileByID(ctx context.Context, signalID uuid.UUID) (*types.Profile, error)
- func (cli *Client) SendContactSyncRequest(ctx context.Context) error
- func (cli *Client) SendGroupMessage(ctx context.Context, gid types.GroupIdentifier, content *signalpb.Content) (*GroupMessageSendResult, error)
- func (cli *Client) SendGroupUpdate(ctx context.Context, group *Group, groupContext *signalpb.GroupContextV2, ...) (*GroupMessageSendResult, error)
- func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.ServiceID, ...) SendMessageResult
- func (cli *Client) SendStorageMasterKeyRequest(ctx context.Context) error
- func (cli *Client) StartKeyCheckLoop(ctx context.Context)
- func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnectionStatus, error)
- func (cli *Client) StopReceiveLoops() error
- func (cli *Client) StoreContactDetailsAsContact(ctx context.Context, contactDetails *signalpb.ContactDetails, avatar *[]byte) (*types.Recipient, error)
- func (cli *Client) StoreMasterKey(ctx context.Context, groupMasterKey types.SerializedGroupMasterKey) (types.GroupIdentifier, error)
- func (cli *Client) SyncStorage(ctx context.Context)
- func (cli *Client) UpdateActiveCalls(gid types.GroupIdentifier, callID string) (isActive bool)
- func (cli *Client) UpdateDeviceName(ctx context.Context, name string) error
- func (cli *Client) UpdateGroup(ctx context.Context, groupChange *GroupChange, gid types.GroupIdentifier) (uint32, error)
- func (cli *Client) UploadAttachment(ctx context.Context, body []byte) (*signalpb.AttachmentPointer, error)
- func (cli *Client) UploadGroupAvatar(ctx context.Context, avatarBytes []byte, gid types.GroupIdentifier) (*string, error)
- type ConfirmDeviceResponse
- type ContactDiscoveryClient
- type ContactDiscoveryRateLimitError
- type ContactDiscoveryResponse
- type DecryptedStorageRecord
- type DecryptionResult
- type FFILogger
- type FailedSendResult
- type GeneratedPreKeys
- type Group
- type GroupAccessControl
- type GroupAuth
- type GroupAvatarMeta
- type GroupCache
- type GroupChange
- type GroupChangeState
- type GroupCredential
- type GroupCredentials
- type GroupExternalCredential
- type GroupMember
- type GroupMemberRole
- type GroupMessageSendResult
- type MyMessage
- type MyMessages
- type PendingMember
- type ProfileCache
- type ProfileKeyMember
- type ProfileResponse
- type PromotePendingMembers
- type PromotePendingPniAciMember
- type ProvisioningCipher
- type ProvisioningResponse
- type ProvisioningState
- type RequestingMember
- type RespError
- type RoleMember
- type SendMessageResult
- type SignalConnectionEvent
- type SignalConnectionStatus
- type StorageUpdate
- type SuccessfulSendResult
Constants ¶
const CIPHERTEXT_OFFSET uint = IV_OFFSET + IV_LENGTH
const CIPHER_KEY_SIZE uint = 32
const ContactDiscoveryAuthTTL = 23 * time.Hour
const IV_LENGTH uint = 16
const IV_OFFSET uint = VERSION_OFFSET + VERSION_LENGTH
const MAC_SIZE uint = 32
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
const NONCE_LENGTH = 12
const PREKEY_BATCH_SIZE = 100
const ProdContactDiscoveryMrenclave = "0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57"
const ProdContactDiscoveryServer = "cdsi.signal.org"
const SUPPORTED_VERSION uint8 = 1
const TAG_LENGTH_BYTES = 16
const VERSION_LENGTH uint = 1
const VERSION_OFFSET uint = 0
Variables ¶
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"} )
var ErrInvalidDigestForAttachment = errors.New("invalid digest for attachment")
var ErrInvalidMACForAttachment = errors.New("invalid MAC for attachment")
ErrInvalidMACForAttachment signals that the downloaded attachment has an invalid MAC.
Functions ¶
func AesgcmDecrypt ¶
func AesgcmEncrypt ¶
func DataMessageForDelete ¶
func DataMessageForReaction ¶
func DecryptDeviceName ¶
func DecryptDeviceName(wrappedData []byte, identityKey *libsignalgo.PrivateKey) (string, error)
func DownloadAttachment ¶
func EncryptDeviceName ¶
func EncryptDeviceName(name string, identityKey *libsignalgo.PublicKey) ([]byte, error)
func GenerateInviteLinkPassword ¶
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 ¶
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 RegisterPreKeys ¶
func SignedPreKeyToJSON ¶
func SignedPreKeyToJSON(signedPreKey *libsignalgo.SignedPreKeyRecord) (map[string]interface{}, error)
func TypingMessage ¶
func UnpadPKCS7 ¶
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 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
SenderCertificate *libsignalgo.SenderCertificate
GroupCredentials *GroupCredentials
GroupCache *GroupCache
ProfileCache *ProfileCache
GroupCallCache *map[string]bool
LastContactRequestTime time.Time
AuthedWS *web.SignalWebsocket
UnauthedWS *web.SignalWebsocket
WSCancel context.CancelFunc
EventHandler func(events.SignalEvent)
// contains filtered or unexported fields
}
func (*Client) CheckAndUploadNewPreKeys ¶
func (*Client) ClearKeysAndDisconnect ¶
func (*Client) ConnectAuthedWS ¶
func (cli *Client) ConnectAuthedWS(ctx context.Context, requestHandler web.RequestHandlerFunc) (chan web.SignalWebsocketConnectionStatus, error)
func (*Client) ConnectUnauthedWS ¶
func (*Client) ContactByACI ¶
func (*Client) ContactByE164 ¶
func (*Client) CreateGroup ¶
func (*Client) DecryptGroupChange ¶
func (cli *Client) DecryptGroupChange(ctx context.Context, groupContext *signalpb.GroupContextV2) (*GroupChange, error)
func (*Client) DownloadGroupAvatar ¶
func (*Client) DownloadUserAvatar ¶
func (cli *Client) DownloadUserAvatar(ctx context.Context, avatarPath string, profileKey libsignalgo.ProfileKey) ([]byte, error)
func (*Client) EncryptAndSignGroupChange ¶
func (cli *Client) EncryptAndSignGroupChange(ctx context.Context, decryptedGroupChange *GroupChange, gid types.GroupIdentifier) (*signalpb.GroupChange, error)
func (*Client) EncryptGroup ¶
func (cli *Client) EncryptGroup(ctx context.Context, decryptedGroup *Group, groupSecretParams libsignalgo.GroupSecretParams) (*signalpb.Group, error)
func (*Client) FetchAndProcessPreKey ¶
func (*Client) FetchExpiringProfileKeyCredentialById ¶
func (cli *Client) FetchExpiringProfileKeyCredentialById(ctx context.Context, signalACI uuid.UUID) (*libsignalgo.ExpiringProfileKeyCredential, error)
func (*Client) FetchStorage ¶
func (*Client) GenerateAndRegisterPreKeys ¶
func (*Client) GenerateAndSaveNextKyberPreKeyBatch ¶
func (*Client) GenerateAndSaveNextPreKeyBatch ¶
func (*Client) GetAuthorizationForToday ¶
func (cli *Client) GetAuthorizationForToday(ctx context.Context, masterKey libsignalgo.GroupMasterKey) (*GroupAuth, error)
func (*Client) GetGroupHistoryPage ¶
func (cli *Client) GetGroupHistoryPage(ctx context.Context, gid types.GroupIdentifier, fromRevision uint32, includeFirstState bool) ([]*GroupChangeState, error)
func (*Client) GetMyKeyCounts ¶
func (*Client) IsConnected ¶
func (*Client) IsLoggedIn ¶
func (*Client) LastConnectionStatus ¶
func (cli *Client) LastConnectionStatus() SignalConnectionStatus
func (*Client) LookupPhone ¶
func (*Client) ProfileKeyCredentialRequest ¶
func (*Client) ProfileKeyForSignalID ¶
func (cli *Client) ProfileKeyForSignalID(ctx context.Context, signalACI uuid.UUID) (*libsignalgo.ProfileKey, error)
func (*Client) RegisterAllPreKeys ¶
func (*Client) RetrieveGroupByID ¶
func (*Client) RetrieveProfileByID ¶
func (*Client) SendContactSyncRequest ¶
func (*Client) SendGroupMessage ¶
func (cli *Client) SendGroupMessage(ctx context.Context, gid types.GroupIdentifier, content *signalpb.Content) (*GroupMessageSendResult, error)
func (*Client) SendGroupUpdate ¶
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 ¶
func (*Client) StartKeyCheckLoop ¶
func (*Client) StartReceiveLoops ¶
func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnectionStatus, error)
func (*Client) StopReceiveLoops ¶
func (*Client) StoreContactDetailsAsContact ¶
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 ¶
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 (*Client) UpdateGroup ¶
func (cli *Client) UpdateGroup(ctx context.Context, groupChange *GroupChange, gid types.GroupIdentifier) (uint32, error)
func (*Client) UploadAttachment ¶
func (*Client) UploadGroupAvatar ¶
type ConfirmDeviceResponse ¶
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 ¶
func (cdc *ContactDiscoveryClient) SendRequest(ctx context.Context, req *signalpb.CDSClientRequest) error
type ContactDiscoveryRateLimitError ¶
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 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) GetInviteLink ¶
type GroupAccessControl ¶
type GroupAccessControl struct {
Members AccessControl
AddFromInviteLink AccessControl
Attributes AccessControl
}
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 {
SourceACI uuid.UUID
Revision uint32
AddMembers []*AddMember
DeleteMembers []*uuid.UUID
ModifyMemberRoles []*RoleMember
ModifyMemberProfileKeys []*ProfileKeyMember
AddPendingMembers []*PendingMember
DeletePendingMembers []*libsignalgo.ServiceID
PromotePendingMembers []*GroupMember
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 ¶
type GroupChangeState struct {
GroupState *Group
GroupChange *GroupChange
}
type GroupCredential ¶
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 ¶
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 MyMessages ¶
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 PromotePendingMembers ¶
type PromotePendingMembers struct {
ACI uuid.UUID
ProfileKey libsignalgo.ProfileKey
}
type PromotePendingPniAciMember ¶
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 (c *ProvisioningCipher) Decrypt(env *signalpb.ProvisionEnvelope) (*signalpb.ProvisionMessage, error)
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 RequestingMember ¶
type RequestingMember struct {
ACI uuid.UUID
ProfileKey libsignalgo.ProfileKey
Timestamp uint64
}
type RoleMember ¶
type RoleMember struct {
ACI uuid.UUID
Role GroupMemberRole
}
type SendMessageResult ¶
type SendMessageResult struct {
WasSuccessful bool
*SuccessfulSendResult
*FailedSendResult
}
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
}