Versions in this module Expand all Collapse all v1 v1.0.0 Sep 7, 2023 Changes in this version + var GenerateKey = helper.GenerateKey + func FastGenerateKey(_, _ string, passphrase []byte, _ string, _ int) (string, error) + type Backend struct + func New(authLife time.Duration, domain string, enableDedup bool) *Backend + func (b *Backend) AddAddressCreatedUpdate(userID, addrID string) error + func (b *Backend) AddLabelCreatedUpdate(userID, labelID string) error + func (b *Backend) AddMessageCreatedUpdate(userID, messageID string) error + func (b *Backend) ChangeAddressType(userID, addrId string, addrType proton.AddressType) error + func (b *Backend) CountMessages(userID string) (int, error) + func (b *Backend) CreateAddress(userID, email string, password []byte, withKey bool, ...) (string, error) + func (b *Backend) CreateAddressAsUpdate(userID, email string, password []byte, withKey bool, ...) (string, error) + func (b *Backend) CreateAddressKey(userID, addrID string, password []byte) error + func (b *Backend) CreateAttachment(userID string, messageID string, filename string, mimeType rfc822.MIMEType, ...) (proton.Attachment, error) + func (b *Backend) CreateDraft(userID, addrID string, draft proton.DraftTemplate, parentID string) (proton.Message, error) + func (b *Backend) CreateLabel(userID, labelName, parentID string, labelType proton.LabelType) (proton.Label, error) + func (b *Backend) CreateMessage(userID, addrID string, subject string, sender *mail.Address, ...) (string, error) + func (b *Backend) CreateSubscription(userID, planID string) error + func (b *Backend) CreateUser(username string, password []byte) (string, error) + func (b *Backend) CreateUserKey(userID string, password []byte) error + func (b *Backend) DeleteAddress(userID, addrID string) error + func (b *Backend) DeleteLabel(userID, labelID string) error + func (b *Backend) DeleteMessage(userID, messageID string) error + func (b *Backend) DeleteSession(userID, authUID string) error + func (b *Backend) DisableAddress(userID, addrID string) error + func (b *Backend) EnableAddress(userID, addrID string) error + func (b *Backend) Encrypt(userID, addrID, decBody string) (string, error) + func (b *Backend) GetAddress(userID, addrID string) (proton.Address, error) + func (b *Backend) GetAddressID(email string) (string, error) + func (b *Backend) GetAddresses(userID string) ([]proton.Address, error) + func (b *Backend) GetAttachment(attachID string) ([]byte, error) + func (b *Backend) GetEvent(userID, rawEventID string) (event proton.Event, more bool, err error) + func (b *Backend) GetKeySalts(userID string) ([]proton.Salt, error) + func (b *Backend) GetLabel(userID, labelID string) (proton.Label, error) + func (b *Backend) GetLabels(userID string, types ...proton.LabelType) ([]proton.Label, error) + func (b *Backend) GetLatestEventID(userID string) (string, error) + func (b *Backend) GetMailSettings(userID string) (proton.MailSettings, error) + func (b *Backend) GetMessage(userID, messageID string) (proton.Message, error) + func (b *Backend) GetMessageGroupCount(userID string) ([]proton.MessageGroupCount, error) + func (b *Backend) GetMessageIDs(userID string, afterID string, limit int) ([]string, error) + func (b *Backend) GetMessages(userID string, page, pageSize int, filter proton.MessageFilter) ([]proton.MessageMetadata, error) + func (b *Backend) GetPublicKeys(email string) ([]proton.PublicKey, error) + func (b *Backend) GetSessions(userID string) ([]proton.AuthSession, error) + func (b *Backend) GetUser(userID string) (proton.User, error) + func (b *Backend) GetUserSettings(userID string) (proton.UserSettings, error) + func (b *Backend) HasLabel(userID, labelName string) (string, bool, error) + func (b *Backend) LabelMessages(userID, labelID string, messageIDs ...string) error + func (b *Backend) LabelMessagesNoEvents(userID, labelID string, messageIDs ...string) error + func (b *Backend) NewAuth(username string, ephemeral, proof []byte, session string) (proton.Auth, error) + func (b *Backend) NewAuthInfo(username string) (proton.AuthInfo, error) + func (b *Backend) NewAuthRef(authUID, authRef string) (proton.Auth, error) + func (b *Backend) RefreshUser(userID string, refresh proton.RefreshFlag) error + func (b *Backend) RemoveAddress(userID, addrID string) error + func (b *Backend) RemoveAddressKey(userID, addrID, keyID string) error + func (b *Backend) RemoveUser(userID string) error + func (b *Backend) RemoveUserKey(userID, keyID string) error + func (b *Backend) SendMessage(userID, messageID string, packages []*proton.MessagePackage) (proton.Message, error) + func (b *Backend) SetAddressOrder(userID string, addrIDs []string) error + func (b *Backend) SetAuthLife(authLife time.Duration) + func (b *Backend) SetMailSettingsAttachPublicKey(userID string, attach bool) (proton.MailSettings, error) + func (b *Backend) SetMaxUpdatesPerEvent(max int) + func (b *Backend) SetMessagesRead(userID string, read bool, messageIDs ...string) error + func (b *Backend) SetUserSettingsCrashReports(userID string, crashReports proton.SettingsBool) (proton.UserSettings, error) + func (b *Backend) SetUserSettingsTelemetry(userID string, telemetry proton.SettingsBool) (proton.UserSettings, error) + func (b *Backend) UnlabelMessages(userID, labelID string, messageIDs ...string) error + func (b *Backend) UpdateDraft(userID, draftID string, changes proton.DraftTemplate) (proton.Message, error) + func (b *Backend) UpdateLabel(userID, labelID, name, parentID string) (proton.Label, error) + func (b *Backend) VerifyAuth(authUID, authAcc string) (string, error) + func (s *Backend) RunQuarkCommand(command string, args ...string) (any, error) + type ID uint64 + func (v *ID) FromString(s string) error + func (v ID) Bytes() []byte + func (v ID) String() string