Documentation
¶
Index ¶
- Variables
- func ContactCardToContact(card *proton.Card, contactID string, kr *crypto.KeyRing) (proton.Contact, error)
- func FastGenerateKey(_, _ string, passphrase []byte, _ string, _ int) (string, error)
- type 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) AddUserContact(userID string, contact proton.Contact) (proton.Contact, error)
- func (b *Backend) ChangeAddressAllowSend(userID, addrId string, allowSend bool) error
- func (b *Backend) ChangeAddressDisplayName(userID, addrID, displayName 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) CreateAddressWithSendDisabled(userID, email string, password []byte, withKey bool, ...) (string, error)
- func (b *Backend) CreateAttachment(userID string, messageID string, filename string, mimeType rfc822.MIMEType, ...) (proton.Attachment, error)
- func (b *Backend) CreateCSTicket() string
- 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) DeleteFeatureFlags()
- 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) GenerateContactID(userID 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) GetCSTicket(token string) bool
- func (b *Backend) GetEvent(userID, rawEventID string) (event proton.Event, more bool, err error)
- func (b *Backend) GetFeatureFlags() []proton.FeatureToggle
- 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) GetObservabilityStatistics() ObservabilityStatistics
- 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) GetUserContact(userID, contactID string) (proton.Contact, error)
- func (b *Backend) GetUserContactEmails(userID, email string, page int, pageSize int) (int, []proton.ContactEmail, error)
- func (b *Backend) GetUserContacts(userID string, page int, pageSize int) (int, []proton.Contact, 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) PushFeatureFlag(flagName string)
- func (b *Backend) PushObservabilityMetrics(metrics []proton.ObservabilityMetric)
- 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 (s *Backend) RunQuarkCommand(command string, args ...string) (any, 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) SetMailSettingsDraftMIMEType(userID string, drafttype rfc822.MIMEType) (proton.MailSettings, error)
- func (b *Backend) SetMailSettingsPGPScheme(userID string, scheme proton.EncryptionScheme) (proton.MailSettings, error)
- func (b *Backend) SetMailSettingsSign(userID string, sign proton.SignExternalMessages) (proton.MailSettings, error)
- func (b *Backend) SetMaxUpdatesPerEvent(max int)
- func (b *Backend) SetMessagesForwarded(userID string, forwarded bool, messageIDs ...string) error
- 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) UpdateUserContact(userID, contactID string, cards proton.Cards) (proton.Contact, error)
- func (b *Backend) VerifyAuth(authUID, authAcc string) (string, error)
- type ID
- type ObservabilityStatistics
Constants ¶
This section is empty.
Variables ¶
View Source
var GenerateKey = helper.GenerateKey
Functions ¶
func ContactCardToContact ¶
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func (*Backend) AddAddressCreatedUpdate ¶
func (*Backend) AddLabelCreatedUpdate ¶
func (*Backend) AddMessageCreatedUpdate ¶
func (*Backend) AddUserContact ¶
func (*Backend) ChangeAddressAllowSend ¶
func (*Backend) ChangeAddressDisplayName ¶
func (*Backend) ChangeAddressType ¶
func (b *Backend) ChangeAddressType(userID, addrID string, addrType proton.AddressType) error
func (*Backend) CreateAddress ¶
func (b *Backend) CreateAddress(userID, email string, password []byte, withKey bool, status proton.AddressStatus, addrType proton.AddressType) (string, error)
func (*Backend) CreateAddressAsUpdate ¶
func (b *Backend) CreateAddressAsUpdate(userID, email string, password []byte, withKey bool, status proton.AddressStatus, addrType proton.AddressType) (string, error)
func (*Backend) CreateAddressKey ¶
func (*Backend) CreateAddressWithSendDisabled ¶
func (b *Backend) CreateAddressWithSendDisabled( userID, email string, password []byte, withKey bool, status proton.AddressStatus, addrType proton.AddressType, ) (string, error)
func (*Backend) CreateAttachment ¶
func (*Backend) CreateCSTicket ¶
func (*Backend) CreateDraft ¶
func (b *Backend) CreateDraft(userID, addrID string, draft proton.DraftTemplate, parentID string, action proton.CreateDraftAction) (proton.Message, error)
func (*Backend) CreateLabel ¶
func (*Backend) CreateMessage ¶
func (*Backend) CreateSubscription ¶
TODO: Implement this when we support subscriptions in the test server.
func (*Backend) CreateUser ¶
func (*Backend) CreateUserKey ¶
func (*Backend) DeleteAddress ¶
func (*Backend) DeleteFeatureFlags ¶
func (b *Backend) DeleteFeatureFlags()
func (*Backend) DeleteLabel ¶
func (*Backend) DeleteMessage ¶
func (*Backend) DeleteSession ¶
func (*Backend) DisableAddress ¶
func (*Backend) EnableAddress ¶
func (*Backend) GenerateContactID ¶
func (*Backend) GetAddress ¶
func (*Backend) GetAddresses ¶
func (*Backend) GetCSTicket ¶
func (*Backend) GetFeatureFlags ¶
func (b *Backend) GetFeatureFlags() []proton.FeatureToggle
func (*Backend) GetLatestEventID ¶
func (*Backend) GetMailSettings ¶
func (b *Backend) GetMailSettings(userID string) (proton.MailSettings, error)
func (*Backend) GetMessage ¶
func (*Backend) GetMessageGroupCount ¶
func (b *Backend) GetMessageGroupCount(userID string) ([]proton.MessageGroupCount, error)
func (*Backend) GetMessageIDs ¶
func (*Backend) GetMessages ¶
func (b *Backend) GetMessages(userID string, page, pageSize int, filter proton.MessageFilter) ([]proton.MessageMetadata, error)
func (*Backend) GetObservabilityStatistics ¶
func (b *Backend) GetObservabilityStatistics() ObservabilityStatistics
func (*Backend) GetPublicKeys ¶
func (*Backend) GetSessions ¶
func (b *Backend) GetSessions(userID string) ([]proton.AuthSession, error)
func (*Backend) GetUserContact ¶
func (*Backend) GetUserContactEmails ¶
func (*Backend) GetUserContacts ¶
func (*Backend) GetUserSettings ¶
func (b *Backend) GetUserSettings(userID string) (proton.UserSettings, error)
func (*Backend) LabelMessages ¶
func (*Backend) LabelMessagesNoEvents ¶
func (*Backend) NewAuthInfo ¶
func (*Backend) NewAuthRef ¶
func (*Backend) PushFeatureFlag ¶
func (*Backend) PushObservabilityMetrics ¶
func (b *Backend) PushObservabilityMetrics(metrics []proton.ObservabilityMetric)
func (*Backend) RefreshUser ¶
func (b *Backend) RefreshUser(userID string, refresh proton.RefreshFlag) error
func (*Backend) RemoveAddress ¶
func (*Backend) RemoveAddressKey ¶
func (*Backend) RemoveUser ¶
func (*Backend) RemoveUserKey ¶
func (*Backend) RunQuarkCommand ¶
func (*Backend) SendMessage ¶
func (*Backend) SetAddressOrder ¶
func (*Backend) SetAuthLife ¶
func (*Backend) SetMailSettingsAttachPublicKey ¶
func (*Backend) SetMailSettingsDraftMIMEType ¶
func (*Backend) SetMailSettingsPGPScheme ¶
func (b *Backend) SetMailSettingsPGPScheme(userID string, scheme proton.EncryptionScheme) (proton.MailSettings, error)
func (*Backend) SetMailSettingsSign ¶
func (b *Backend) SetMailSettingsSign(userID string, sign proton.SignExternalMessages) (proton.MailSettings, error)
func (*Backend) SetMaxUpdatesPerEvent ¶
func (*Backend) SetMessagesForwarded ¶
func (*Backend) SetMessagesRead ¶
func (*Backend) SetUserSettingsCrashReports ¶
func (b *Backend) SetUserSettingsCrashReports(userID string, crashReports proton.SettingsBool) (proton.UserSettings, error)
func (*Backend) SetUserSettingsTelemetry ¶
func (b *Backend) SetUserSettingsTelemetry(userID string, telemetry proton.SettingsBool) (proton.UserSettings, error)
func (*Backend) UnlabelMessages ¶
func (*Backend) UpdateDraft ¶
func (*Backend) UpdateLabel ¶
func (*Backend) UpdateUserContact ¶
type ObservabilityStatistics ¶
type ObservabilityStatistics struct {
Metrics []proton.ObservabilityMetric
RequestTime []time.Time
}
func NewObservabilityStatistics ¶
func NewObservabilityStatistics() ObservabilityStatistics
Click to show internal directories.
Click to hide internal directories.