Versions in this module Expand all Collapse all v0 v0.4.5 Sep 13, 2023 v0.4.4 Sep 13, 2023 v0.4.3 Sep 13, 2023 v0.4.2 Sep 13, 2023 v0.4.1 Sep 13, 2023 Changes in this version + const AllDraftsLabel + const AllMailLabel + const AllScheduledLabel + const AllSentLabel + const ArchiveLabel + const DefaultAppVersion + const DefaultHostURL + const DraftsLabel + const FieldPMEncrypt + const FieldPMMIMEType + const FieldPMScheme + const FieldPMSign + const InboxLabel + const OutboxLabel + const SentLabel + const SpamLabel + const StarredLabel + const TrashLabel + var CharsetReader func(charset string, input io.Reader) (io.Reader, error) + var ErrBadHeader = errors.New("bad header") + var ErrImportEncrypt = errors.New("failed to encrypt message") + var ErrImportSizeExceeded = errors.New("message exceeds maximum import size of 30MB") + var ErrInvalidProof = errors.New("unexpected server proof") + var ErrJobCancelled = errors.New("job cancelled by surrounding context") + var ErrNoSuchLabel = errors.New("no such label") + var ErrUndoTokenExpired = errors.New("undo token expired") + func BuildRFC822(kr *crypto.KeyRing, msg Message, attData map[string][]byte) ([]byte, error) + func ChunkSized(vals []T, maxLen, maxSize int, getSize func(T) int) [][]T + func ClientIDFromContext(ctx context.Context) (uint64, bool) + func DecodeKeyPacket(packet string) []byte + func EncryptRFC822(kr *crypto.KeyRing, literal []byte) ([]byte, error) + func InsecureTransport() *http.Transport + func NewDropConn(c net.Conn, l *Listener) net.Conn + func NewHangConn(c net.Conn, l *Listener) net.Conn + func Unlock(user User, addresses []Address, saltedKeyPass []byte, ...) (*crypto.KeyRing, map[string]*crypto.KeyRing, error) + func WithClient(parent context.Context, clientID uint64) context.Context + type APIBool int + const APIFalse + const APITrue + type APIError struct + Code Code + Details any + Message string + Status int + func (err APIError) DetailsToString() string + func (err APIError) Error() string + type Address struct + DisplayName string + Email string + ID string + Keys Keys + Order int + Receive Bool + Send Bool + Status AddressStatus + Type AddressType + type AddressEvent struct + Address Address + type AddressStatus int + const AddressStatusDeleting + const AddressStatusDisabled + const AddressStatusEnabled + type AddressType int + const AddressTypeAlias + const AddressTypeCustom + const AddressTypeExternal + const AddressTypeOriginal + const AddressTypePremium + type Attachment struct + Disposition Disposition + Headers Headers + ID string + KeyPackets string + MIMEType rfc822.MIMEType + Name string + Signature string + Size int64 + type AttachmentAllocator interface + NewBuffer func() *bytes.Buffer + type Auth struct + AccessToken string + PasswordMode PasswordMode + RefreshToken string + Scope string + ServerProof string + TwoFA TwoFAInfo + UID string + UserID string + type Auth2FAReq struct + FIDO2 FIDO2Req + TwoFactorCode string + type AuthHandler func(Auth) + type AuthInfo struct + Modulus string + SRPSession string + Salt string + ServerEphemeral string + TwoFA TwoFAInfo + Version int + type AuthInfoReq struct + Username string + type AuthModulus struct + Modulus string + ModulusID string + type AuthRefreshReq struct + GrantType string + RedirectURI string + RefreshToken string + ResponseType string + State string + UID string + type AuthReq struct + ClientEphemeral string + ClientProof string + SRPSession string + Username string + type AuthSession struct + ClientID string + CreateTime int64 + LocalizedClientName string + MemberID string + Revocable Bool + UID string + type AuthVerifier struct + ModulusID string + Salt string + Verifier string + Version int + type Block struct + BareURL string + EncSignature string + Hash string + Index int + SignatureEmail string + Token string + type BlockToken struct + Index int + Token string + type BlockUploadInfo struct + EncSignature string + Hash string + Index int + Size int64 + type BlockUploadLink struct + BareURL string + Token string + type BlockUploadReq struct + AddressID string + BlockList []BlockUploadInfo + LinkID string + RevisionID string + ShareID string + type Bool bool + func (b *Bool) UnmarshalJSON(data []byte) error + func (b Bool) FormatURL() string + func (b Bool) MarshalJSON() ([]byte, error) + func (b Bool) String() string + type Calendar struct + Color string + Description string + Display Bool + Flags CalendarFlag + ID string + Name string + Type CalendarType + type CalendarAttendee struct + ID string + Permissions CalendarPermissions + Status CalendarAttendeeStatus + Token string + type CalendarAttendeeStatus int + const CalendarAttendeeStatusMaybe + const CalendarAttendeeStatusNo + const CalendarAttendeeStatusPending + const CalendarAttendeeStatusYes + type CalendarEvent struct + Attendees []CalendarAttendee + AttendeesEvents []CalendarEventPart + Author string + CalendarEvents []CalendarEventPart + CalendarID string + CalendarKeyPacket string + CreateTime int64 + EndTime int64 + EndTimezone string + FullDay Bool + ID string + LastEditTime int64 + Permissions CalendarPermissions + PersonalEvents []CalendarEventPart + SharedEventID string + SharedEvents []CalendarEventPart + SharedKeyPacket string + StartTime int64 + StartTimezone string + UID string + type CalendarEventPart struct + Author string + Data string + MemberID string + Signature string + Type CalendarEventType + func (part CalendarEventPart) Decode(calKR *crypto.KeyRing, addrKR *crypto.KeyRing, kp []byte) error + type CalendarEventType int + const CalendarEventTypeClear + const CalendarEventTypeEncrypted + const CalendarEventTypeSigned + type CalendarFlag int64 + const CalendarFlagActive + const CalendarFlagIncompleteSetup + const CalendarFlagLostAccess + const CalendarFlagResetNeeded + const CalendarFlagUpdatePassphrase + type CalendarKey struct + CalendarID string + Flags CalendarKeyFlag + ID string + PassphraseID string + PrivateKey string + func (key CalendarKey) Unlock(passphrase []byte) (*crypto.Key, error) + type CalendarKeyFlag int64 + const CalendarKeyFlagActive + const CalendarKeyFlagPrimary + type CalendarKeys []CalendarKey + func (keys CalendarKeys) Unlock(passphrase []byte) (*crypto.KeyRing, error) + type CalendarMember struct + CalendarID string + Color string + Display Bool + Email string + ID string + Permissions CalendarPermissions + type CalendarPassphrase struct + Flags CalendarPassphraseFlag + ID string + MemberPassphrases []MemberPassphrase + func (passphrase CalendarPassphrase) Decrypt(memberID string, addrKR *crypto.KeyRing) ([]byte, error) + type CalendarPassphraseFlag int64 + type CalendarPermissions int + type CalendarType int + const CalendarTypeNormal + const CalendarTypeSubscribed + type Card struct + Data string + Signature string + Type CardType + func NewCard(kr *crypto.KeyRing, cardType CardType) (*Card, error) + func (c *Card) ChangeType(kr *crypto.KeyRing, cardType CardType) error + func (c *Card) DeleteGroup(kr *crypto.KeyRing, groupKey, groupValue string) error + func (c *Card) Set(kr *crypto.KeyRing, key, value string) error + func (c Card) Get(kr *crypto.KeyRing, key string) ([]*vcard.Field, error) + func (c Card) GetGroup(kr *crypto.KeyRing, groupKey, groupValue string) (CardGroup, error) + type CardGroup struct + func (g *CardGroup) Add(key, value string, params vcard.Params) error + func (g *CardGroup) Remove(key, value string) error + func (g *CardGroup) RemoveAll(key string) error + func (g *CardGroup) Set(key, value string, params vcard.Params) error + func (g CardGroup) Get(key string) ([]string, error) + type CardType int + const CardTypeClear + const CardTypeEncrypted + const CardTypeSigned + type Cards []*Card + func (c *Cards) Get(cardType CardType) (*Card, bool) + func (c *Cards) Merge(kr *crypto.KeyRing) (vcard.Card, error) + type Client struct + func (c *Client) AddAuthHandler(handler AuthHandler) + func (c *Client) AddDeauthHandler(handler Handler) + func (c *Client) AddPostRequestHook(hook resty.ResponseMiddleware) + func (c *Client) AddPreRequestHook(hook resty.RequestMiddleware) + func (c *Client) Auth2FA(ctx context.Context, req Auth2FAReq) error + func (c *Client) AuthDelete(ctx context.Context) error + func (c *Client) AuthRevoke(ctx context.Context, authUID string) error + func (c *Client) AuthRevokeAll(ctx context.Context) error + func (c *Client) AuthSessions(ctx context.Context) ([]AuthSession, error) + func (c *Client) Close() + func (c *Client) CountCalendarEvents(ctx context.Context, calendarID string) (int, error) + func (c *Client) CountContactEmails(ctx context.Context, email string) (int, error) + func (c *Client) CountContacts(ctx context.Context) (int, error) + func (c *Client) CountMessages(ctx context.Context) (int, error) + func (c *Client) CreateAddressKey(ctx context.Context, req CreateAddressKeyReq) (Key, error) + func (c *Client) CreateContacts(ctx context.Context, req CreateContactsReq) ([]CreateContactsRes, error) + func (c *Client) CreateDraft(ctx context.Context, addrKR *crypto.KeyRing, req CreateDraftReq) (Message, error) + func (c *Client) CreateFile(ctx context.Context, shareID string, req CreateFileReq) (CreateFileRes, error) + func (c *Client) CreateFolder(ctx context.Context, shareID string, req CreateFolderReq) (CreateFolderRes, error) + func (c *Client) CreateLabel(ctx context.Context, req CreateLabelReq) (Label, error) + func (c *Client) CreateLegacyAddressKey(ctx context.Context, req CreateAddressKeyReq) (Key, error) + func (c *Client) DeleteAddress(ctx context.Context, addressID string) error + func (c *Client) DeleteAddressKey(ctx context.Context, keyID string, keyList KeyList) error + func (c *Client) DeleteChildren(ctx context.Context, shareID, linkID string, childIDs ...string) error + func (c *Client) DeleteContacts(ctx context.Context, req DeleteContactsReq) error + func (c *Client) DeleteLabel(ctx context.Context, labelID string) error + func (c *Client) DeleteMessage(ctx context.Context, messageIDs ...string) error + func (c *Client) DeleteUser(ctx context.Context, password []byte, req DeleteUserReq) error + func (c *Client) DisableAddress(ctx context.Context, addressID string) error + func (c *Client) EnableAddress(ctx context.Context, addressID string) error + func (c *Client) GetAddress(ctx context.Context, addressID string) (Address, error) + func (c *Client) GetAddresses(ctx context.Context) ([]Address, error) + func (c *Client) GetAllCalendarEvents(ctx context.Context, calendarID string, filter url.Values) ([]CalendarEvent, error) + func (c *Client) GetAllContactEmails(ctx context.Context, email string) ([]ContactEmail, error) + func (c *Client) GetAllContacts(ctx context.Context) ([]Contact, error) + func (c *Client) GetAllMessageIDs(ctx context.Context, afterID string) ([]string, error) + func (c *Client) GetAttachment(ctx context.Context, attachmentID string) ([]byte, error) + func (c *Client) GetAttachmentInto(ctx context.Context, attachmentID string, reader io.ReaderFrom) error + func (c *Client) GetBlock(ctx context.Context, bareURL, token string) (io.ReadCloser, error) + func (c *Client) GetCalendar(ctx context.Context, calendarID string) (Calendar, error) + func (c *Client) GetCalendarEvent(ctx context.Context, calendarID, eventID string) (CalendarEvent, error) + func (c *Client) GetCalendarEvents(ctx context.Context, calendarID string, page, pageSize int, filter url.Values) ([]CalendarEvent, error) + func (c *Client) GetCalendarKeys(ctx context.Context, calendarID string) (CalendarKeys, error) + func (c *Client) GetCalendarMembers(ctx context.Context, calendarID string) ([]CalendarMember, error) + func (c *Client) GetCalendarPassphrase(ctx context.Context, calendarID string) (CalendarPassphrase, error) + func (c *Client) GetCalendars(ctx context.Context) ([]Calendar, error) + func (c *Client) GetContact(ctx context.Context, contactID string) (Contact, error) + func (c *Client) GetContactEmails(ctx context.Context, email string, page, pageSize int) ([]ContactEmail, error) + func (c *Client) GetContacts(ctx context.Context, page, pageSize int) ([]Contact, error) + func (c *Client) GetEvent(ctx context.Context, eventID string) ([]Event, bool, error) + func (c *Client) GetFullMessage(ctx context.Context, messageID string, scheduler Scheduler, ...) (FullMessage, error) + func (c *Client) GetGroupedMessageCount(ctx context.Context) ([]MessageGroupCount, error) + func (c *Client) GetLabel(ctx context.Context, labelID string, labelTypes ...LabelType) (Label, error) + func (c *Client) GetLabels(ctx context.Context, labelTypes ...LabelType) ([]Label, error) + func (c *Client) GetLatestEventID(ctx context.Context) (string, error) + func (c *Client) GetLatestShareEventID(ctx context.Context, shareID string) (string, error) + func (c *Client) GetLatestVolumeEventID(ctx context.Context, volumeID string) (string, error) + func (c *Client) GetLink(ctx context.Context, shareID, linkID string) (Link, error) + func (c *Client) GetMailSettings(ctx context.Context) (MailSettings, error) + func (c *Client) GetMessage(ctx context.Context, messageID string) (Message, error) + func (c *Client) GetMessageIDs(ctx context.Context, afterID string, limit int) ([]string, error) + func (c *Client) GetMessageMetadata(ctx context.Context, filter MessageFilter) ([]MessageMetadata, error) + func (c *Client) GetMessageMetadataPage(ctx context.Context, page, pageSize int, filter MessageFilter) ([]MessageMetadata, error) + func (c *Client) GetPublicKeys(ctx context.Context, address string) (PublicKeys, RecipientType, error) + func (c *Client) GetRevision(ctx context.Context, shareID, linkID, revisionID string, ...) (Revision, error) + func (c *Client) GetSalts(ctx context.Context) (Salts, error) + func (c *Client) GetShare(ctx context.Context, shareID string) (Share, error) + func (c *Client) GetShareEvent(ctx context.Context, shareID, eventID string) (DriveEvent, error) + func (c *Client) GetUser(ctx context.Context) (User, error) + func (c *Client) GetUserSettings(ctx context.Context) (UserSettings, error) + func (c *Client) GetVolume(ctx context.Context, volumeID string) (Volume, error) + func (c *Client) GetVolumeEvent(ctx context.Context, volumeID, eventID string) (DriveEvent, error) + func (c *Client) ImportMessages(ctx context.Context, addrKR *crypto.KeyRing, workers, buffer int, ...) (stream.Stream[ImportRes], error) + func (c *Client) LabelMessages(ctx context.Context, messageIDs []string, labelID string) error + func (c *Client) ListChildren(ctx context.Context, shareID, linkID string, showAll bool) ([]Link, error) + func (c *Client) ListRevisions(ctx context.Context, shareID, linkID string) ([]RevisionMetadata, error) + func (c *Client) ListShares(ctx context.Context, all bool) ([]ShareMetadata, error) + func (c *Client) ListVolumes(ctx context.Context) ([]Volume, error) + func (c *Client) MakeAddressKeyPrimary(ctx context.Context, keyID string, keyList KeyList) error + func (c *Client) MarkMessagesRead(ctx context.Context, messageIDs ...string) error + func (c *Client) MarkMessagesUnread(ctx context.Context, messageIDs ...string) error + func (c *Client) NewEventStream(ctx context.Context, period, jitter time.Duration, lastEventID string) <-chan Event + func (c *Client) OrderAddresses(ctx context.Context, req OrderAddressesReq) error + func (c *Client) RemoveExpirationTime(ctx context.Context, messageID string) error + func (c *Client) RequestBlockUpload(ctx context.Context, req BlockUploadReq) ([]BlockUploadLink, error) + func (c *Client) SendDataEvent(ctx context.Context, req SendStatsReq) error + func (c *Client) SendDataEventMultiple(ctx context.Context, req SendStatsMultiReq) error + func (c *Client) SendDraft(ctx context.Context, draftID string, req SendDraftReq) (Message, error) + func (c *Client) SetAttachPublicKey(ctx context.Context, req SetAttachPublicKeyReq) (MailSettings, error) + func (c *Client) SetDefaultPGPScheme(ctx context.Context, req SetDefaultPGPSchemeReq) (MailSettings, error) + func (c *Client) SetDisplayName(ctx context.Context, req SetDisplayNameReq) (MailSettings, error) + func (c *Client) SetDraftMIMEType(ctx context.Context, req SetDraftMIMETypeReq) (MailSettings, error) + func (c *Client) SetSignExternalMessages(ctx context.Context, req SetSignExternalMessagesReq) (MailSettings, error) + func (c *Client) SetSignature(ctx context.Context, req SetSignatureReq) (MailSettings, error) + func (c *Client) SetUserSettingsCrashReports(ctx context.Context, req SetCrashReportReq) (UserSettings, error) + func (c *Client) SetUserSettingsTelemetry(ctx context.Context, req SetTelemetryReq) (UserSettings, error) + func (c *Client) TrashChildren(ctx context.Context, shareID, linkID string, childIDs ...string) error + func (c *Client) UndoActions(ctx context.Context, tokens ...UndoToken) ([]UndoRes, error) + func (c *Client) UnlabelMessages(ctx context.Context, messageIDs []string, labelID string) error + func (c *Client) UpdateContact(ctx context.Context, contactID string, req UpdateContactReq) (Contact, error) + func (c *Client) UpdateDraft(ctx context.Context, draftID string, addrKR *crypto.KeyRing, ...) (Message, error) + func (c *Client) UpdateLabel(ctx context.Context, labelID string, req UpdateLabelReq) (Label, error) + func (c *Client) UpdateRevision(ctx context.Context, shareID, linkID, revisionID string, req UpdateRevisionReq) error + func (c *Client) UploadAttachment(ctx context.Context, addrKR *crypto.KeyRing, req CreateAttachmentReq) (Attachment, error) + func (c *Client) UploadBlock(ctx context.Context, bareURL, token string, block io.Reader) error + type ClientType int + const ClientTypeCalendar + const ClientTypeDrive + const ClientTypeEmail + const ClientTypeVPN + type Code int + const AppVersionBadCode + const AppVersionMissingCode + const AuthRefreshTokenInvalid + const HumanVerificationRequired + const InvalidValue + const MultiCode + const PaidPlanRequired + const PasswordWrong + const SuccessCode + const UsernameInvalid + type Contact struct + func (c *Contact) GetSettings(kr *crypto.KeyRing, email string) (ContactSettings, error) + type ContactCards struct + Cards Cards + type ContactEmail struct + ContactID string + Email string + ID string + LabelIDs []string + Name string + Type []string + type ContactMetadata struct + ContactEmails []ContactEmail + CreateTime int64 + ID string + LabelIDs []string + ModifyTime int64 + Name string + Size int64 + UID string + type ContactSettings struct + Encrypt *bool + Keys []*crypto.Key + MIMEType *rfc822.MIMEType + Scheme *EncryptionScheme + Sign *bool + type CreateAddressKeyReq struct + AddressID string + Primary Bool + PrivateKey string + Signature string + SignedKeyList KeyList + Token string + type CreateAttachmentReq struct + Body []byte + ContentID string + Disposition Disposition + Filename string + MIMEType rfc822.MIMEType + MessageID string + type CreateContactsReq struct + Contacts []ContactCards + Labels int + Overwrite int + type CreateContactsRes struct + Index int + Response struct{ ... } + type CreateDraftAction int + const AutoResponseAction + const ForwardAction + const ReadReceiptAction + const ReplyAction + const ReplyAllAction + type CreateDraftReq struct + Action CreateDraftAction + AttachmentKeyPackets []string + Message DraftTemplate + ParentID string + type CreateFileReq struct + ContentKeyPacket string + ContentKeyPacketSignature string + Hash string + MIMEType string + Name string + NodeKey string + NodePassphrase string + NodePassphraseSignature string + ParentLinkID string + SignatureAddress string + type CreateFileRes struct + ID string + RevisionID string + type CreateFolderReq struct + Hash string + Name string + NodeHashKey string + NodeKey string + NodePassphrase string + NodePassphraseSignature string + ParentLinkID string + SignatureAddress string + type CreateFolderRes struct + ID string + type CreateLabelReq struct + Color string + Name string + ParentID string + Type LabelType + type CreateUserReq struct + Auth AuthVerifier + Domain string + Type UserType + Username string + type DefaultAttachmentAllocator struct + func NewDefaultAttachmentAllocator() *DefaultAttachmentAllocator + func (DefaultAttachmentAllocator) NewBuffer() *bytes.Buffer + type DeleteContactsReq struct + IDs []string + type DeleteUserReq struct + Email string + Feedback string + Reason string + type Disposition string + const AttachmentDisposition + const InlineDisposition + type DraftTemplate struct + BCCList []*mail.Address + Body string + CCList []*mail.Address + ExternalID string + MIMEType rfc822.MIMEType + Sender *mail.Address + Subject string + ToList []*mail.Address + Unread Bool + type DriveEvent struct + EventID string + Events []LinkEvent + Refresh Bool + type EncryptionScheme int + const ClearMIMEScheme + const ClearScheme + const EncryptedOutsideScheme + const InternalScheme + const PGPInlineScheme + const PGPMIMEScheme + type Event struct + Addresses []AddressEvent + EventID string + Labels []LabelEvent + MailSettings *MailSettings + Messages []MessageEvent + Refresh RefreshFlag + UsedSpace *int + User *User + UserSettings *UserSettings + func (event Event) String() string + type EventAction int + const EventCreate + const EventDelete + const EventUpdate + const EventUpdateFlags + type EventItem struct + Action EventAction + ID string + type FIDO2Info struct + AuthenticationOptions any + RegisteredKeys []RegisteredKey + type FIDO2Req struct + AuthenticationOptions any + AuthenticatorData string + ClientData string + CredentialID string + Signature string + type FileProperties struct + ActiveRevision RevisionMetadata + ContentKeyPacket string + ContentKeyPacketSignature string + type FolderProperties struct + NodeHashKey string + type FullMessage struct + AttData [][]byte + type Future struct + func NewFuture(panicHandler async.PanicHandler, fn func() (T, error)) *Future[T] + func (job *Future[T]) Get() (T, error) + func (job *Future[T]) Then(fn func(T, error)) + type Group struct + func NewGroup(panicHandler async.PanicHandler) *Group[T] + func (group *Group[T]) Add(fn func() (T, error)) + func (group *Group[T]) ForEach(fn func(T) error) error + func (group *Group[T]) Result() ([]T, error) + type Handler func() + type Headers map[string][]string + func (h *Headers) UnmarshalJSON(b []byte) error + type ImportMetadata struct + AddressID string + Flags MessageFlag + LabelIDs []string + Unread Bool + type ImportReq struct + Message []byte + Metadata ImportMetadata + type ImportRes struct + MessageID string + type Key struct + Active Bool + Flags KeyState + ID string + Primary Bool + PrivateKey []byte + Signature string + Token string + func (key *Key) UnmarshalJSON(data []byte) error + func (key Key) MarshalJSON() ([]byte, error) + func (key Key) Unlock(passphrase []byte, userKR *crypto.KeyRing) (*crypto.Key, error) + type KeyList struct + Data string + Signature string + func NewKeyList(signer *crypto.KeyRing, entries []KeyListEntry) (KeyList, error) + type KeyListEntry struct + Fingerprint string + Flags KeyState + Primary Bool + SHA256Fingerprints []string + type KeyState int + const KeyStateActive + const KeyStateTrusted + type Keys []Key + func (keys Keys) ByID(keyID string) Key + func (keys Keys) Primary() Key + func (keys Keys) TryUnlock(passphrase []byte, userKR *crypto.KeyRing) *crypto.KeyRing + func (keys Keys) Unlock(passphrase []byte, userKR *crypto.KeyRing) (*crypto.KeyRing, error) + type Label struct + Color string + ID string + Name string + ParentID string + Path []string + Type LabelType + func (label *Label) UnmarshalJSON(data []byte) error + func (label Label) MarshalJSON() ([]byte, error) + type LabelEvent struct + Label Label + type LabelMessageRes struct + ID string + Response APIError + type LabelMessagesReq struct + IDs []string + LabelID string + type LabelMessagesRes struct + Responses []LabelMessageRes + UndoToken UndoToken + type LabelType int + const LabelTypeContactGroup + const LabelTypeFolder + const LabelTypeLabel + const LabelTypeSystem + type Link struct + CreateTime int64 + ExpirationTime int64 + FileProperties *FileProperties + FolderProperties *FolderProperties + Hash string + LinkID string + MIMEType string + ModifyTime int64 + Name string + NodeKey string + NodePassphrase string + NodePassphraseSignature string + ParentLinkID string + Size int64 + State LinkState + Type LinkType + func (l Link) GetHashKey(nodeKR *crypto.KeyRing) ([]byte, error) + func (l Link) GetKeyRing(parentNodeKR, addrKR *crypto.KeyRing) (*crypto.KeyRing, error) + func (l Link) GetName(parentNodeKR, addrKR *crypto.KeyRing) (string, error) + func (l Link) GetSessionKey(nodeKR *crypto.KeyRing) (*crypto.SessionKey, error) + type LinkEvent struct + CreateTime int + Data any + EventID string + EventType LinkEventType + Link Link + type LinkEventType int + const LinkEventCreate + const LinkEventDelete + const LinkEventUpdate + const LinkEventUpdateMetadata + type LinkState int + const LinkStateActive + const LinkStateDeleted + const LinkStateDraft + const LinkStateRestoring + const LinkStateTrashed + type LinkType int + const LinkTypeFile + const LinkTypeFolder + type LinkWalkFunc func([]string, Link, *crypto.KeyRing) error + type Listener struct + func NewListener(l net.Listener, newConn func(net.Conn, *Listener) net.Conn) *Listener + func (l *Listener) Accept() (net.Conn, error) + func (l *Listener) Close() error + func (l *Listener) Done() <-chan struct{} + func (l *Listener) DropAll() + func (l *Listener) SetCanRead(canRead bool) + func (l *Listener) SetCanWrite(canWrite bool) + type MailSettings struct + AttachPublicKey Bool + DisplayName string + DraftMIMEType rfc822.MIMEType + PGPScheme EncryptionScheme + Sign SignExternalMessages + Signature string + type MakeAddressKeyPrimaryReq struct + SignedKeyList KeyList + type Manager struct + func New(opts ...Option) *Manager + func (m *Manager) AddErrorHandler(code Code, handler Handler) + func (m *Manager) AddPostRequestHook(hook resty.ResponseMiddleware) + func (m *Manager) AddPreRequestHook(hook resty.RequestMiddleware) + func (m *Manager) AddStatusObserver(observer StatusObserver) + func (m *Manager) AuthInfo(ctx context.Context, req AuthInfoReq) (AuthInfo, error) + func (m *Manager) AuthModulus(ctx context.Context) (AuthModulus, error) + func (m *Manager) Close() + func (m *Manager) CreateUser(ctx context.Context, req CreateUserReq) (User, error) + func (m *Manager) DownloadAndVerify(ctx context.Context, kr *crypto.KeyRing, url, sig string) ([]byte, error) + func (m *Manager) GetCaptcha(ctx context.Context, token string) ([]byte, error) + func (m *Manager) GetDomains(ctx context.Context) ([]string, error) + func (m *Manager) GetUsernameAvailable(ctx context.Context, username string) error + func (m *Manager) NewClient(uid, acc, ref string) *Client + func (m *Manager) NewClientWithLogin(ctx context.Context, username string, password []byte) (*Client, Auth, error) + func (m *Manager) NewClientWithRefresh(ctx context.Context, uid, ref string) (*Client, Auth, error) + func (m *Manager) Ping(ctx context.Context) error + func (m *Manager) Quark(ctx context.Context, command string, args ...string) error + func (m *Manager) QuarkRes(ctx context.Context, command string, args ...string) ([]byte, error) + func (m *Manager) ReportBug(ctx context.Context, req ReportBugReq, atts ...ReportBugAttachment) error + func (m *Manager) SendVerificationCode(ctx context.Context, req SendVerificationCodeReq) error + type MemberPassphrase struct + MemberID string + Passphrase string + Signature string + type Message struct + Attachments []Attachment + Body string + Header string + MIMEType rfc822.MIMEType + ParsedHeaders Headers + func (m Message) Decrypt(kr *crypto.KeyRing) ([]byte, error) + func (m Message) DecryptInto(kr *crypto.KeyRing, buffer io.ReaderFrom) error + type MessageActionReq struct + IDs []string + type MessageEvent struct + Message MessageMetadata + type MessageExpireActionReq struct + ExpirationTime *int64 + IDs []string + type MessageFilter struct + AddressID string + Desc Bool + EndID string + ExternalID string + ID []string + LabelID string + Subject string + type MessageFlag int64 + const MessageFlagAlias + const MessageFlagAuto + const MessageFlagAutoReplied + const MessageFlagDKIMFail + const MessageFlagDMARCFail + const MessageFlagDMARCPass + const MessageFlagE2E + const MessageFlagForwarded + const MessageFlagHamManual + const MessageFlagImported + const MessageFlagInternal + const MessageFlagNotified + const MessageFlagOpened + const MessageFlagPhishingAuto + const MessageFlagPhishingManual + const MessageFlagPublicKey + const MessageFlagReceipt + const MessageFlagReceiptRequest + const MessageFlagReceiptSent + const MessageFlagReceived + const MessageFlagReplied + const MessageFlagRepliedAll + const MessageFlagSPFFail + const MessageFlagScheduledSend + const MessageFlagSent + const MessageFlagSign + const MessageFlagSpamAuto + const MessageFlagSpamManual + const MessageFlagTouched + const MessageFlagUnsubscribed + func (f MessageFlag) Add(flag MessageFlag) MessageFlag + func (f MessageFlag) Has(flag MessageFlag) bool + func (f MessageFlag) HasAll(flags ...MessageFlag) bool + func (f MessageFlag) HasAny(flags ...MessageFlag) bool + func (f MessageFlag) Matches(flag MessageFlag) bool + func (f MessageFlag) Remove(flag MessageFlag) MessageFlag + func (f MessageFlag) Toggle(flag MessageFlag) MessageFlag + type MessageGroupCount struct + LabelID string + Total int + Unread int + type MessageMetadata struct + AddressID string + BCCList []*mail.Address + CCList []*mail.Address + ExpirationTime int64 + ExternalID string + Flags MessageFlag + ID string + IsForwarded Bool + IsReplied Bool + IsRepliedAll Bool + LabelIDs []string + NumAttachments int + ReplyTos []*mail.Address + Sender *mail.Address + Size int + Subject string + Time int64 + ToList []*mail.Address + Unread Bool + func (meta MessageMetadata) IsDraft() bool + func (meta MessageMetadata) Seen() bool + func (meta MessageMetadata) Starred() bool + type MessagePackage struct + Addresses map[string]*MessageRecipient + AttachmentKeys map[string]*SessionKey + Body string + BodyKey *SessionKey + MIMEType rfc822.MIMEType + Type EncryptionScheme + type MessageRecipient struct + AttachmentKeyPackets map[string]string + BodyKeyPacket string + Signature SignatureType + Type EncryptionScheme + type NetCtl struct + func NewNetCtl() *NetCtl + func (c *NetCtl) Disable() + func (c *NetCtl) Enable() + func (c *NetCtl) NewRoundTripper(tlsConfig *tls.Config) http.RoundTripper + func (c *NetCtl) OnDial(f func(net.Conn)) + func (c *NetCtl) OnRead(fn func([]byte)) + func (c *NetCtl) OnWrite(fn func([]byte)) + func (c *NetCtl) SetCanDial(canDial bool) + func (c *NetCtl) SetCanRead(canRead bool) + func (c *NetCtl) SetCanWrite(canWrite bool) + func (c *NetCtl) SetDialLimit(limit uint64) + func (c *NetCtl) SetReadLimit(limit uint64) + func (c *NetCtl) SetReadSpeed(speed int) + func (c *NetCtl) SetWriteLimit(limit uint64) + func (c *NetCtl) SetWriteSpeed(speed int) + type NetError struct + Cause error + Message string + func (err *NetError) Error() string + func (err *NetError) Is(target error) bool + func (err *NetError) Unwrap() error + type Option interface + func WithAppVersion(appVersion string) Option + func WithCookieJar(jar http.CookieJar) Option + func WithDebug(debug bool) Option + func WithHostURL(hostURL string) Option + func WithLogger(logger resty.Logger) Option + func WithPanicHandler(panicHandler async.PanicHandler) Option + func WithRetryCount(retryCount int) Option + func WithSkipVerifyProofs() Option + func WithTransport(transport http.RoundTripper) Option + type OrderAddressesReq struct + AddressIDs []string + type ParallelScheduler struct + func NewParallelScheduler(workers int, panicHandler async.PanicHandler) *ParallelScheduler + func (p ParallelScheduler) Schedule(ctx context.Context, attachmentIDs []string, ...) ([]*bytes.Buffer, error) + type PasswordMode int + const OnePasswordMode + const TwoPasswordMode + type Pool struct + func NewPool(size int, panicHandler async.PanicHandler, ...) *Pool[In, Out] + func (pool *Pool[In, Out]) Done() + func (pool *Pool[In, Out]) NewJob(ctx context.Context, req In) (*job[In, Out], doneFunc, error) + func (pool *Pool[In, Out]) Process(ctx context.Context, reqs []In, fn func(int, In, Out, error) error) error + func (pool *Pool[In, Out]) ProcessAll(ctx context.Context, reqs []In) ([]Out, error) + func (pool *Pool[In, Out]) ProcessOne(ctx context.Context, req In) (Out, error) + type PublicKey struct + Flags KeyState + PublicKey string + type PublicKeys []PublicKey + func (keys PublicKeys) GetKeyRing() (*crypto.KeyRing, error) + type RecipientType int + const RecipientTypeExternal + const RecipientTypeInternal + type RefreshFlag uint8 + const RefreshAll + const RefreshMail + type RegisteredKey struct + AttestationFormat string + CredentialID []int + Name string + type ReportBugAttachment struct + Body []byte + Filename string + MIMEType rfc822.MIMEType + Name string + type ReportBugReq struct + Browser string + BrowserExtensions string + BrowserVersion string + Client string + ClientType ClientType + ClientVersion string + Country string + Description string + DisplayMode string + Email string + ISP string + OS string + OSVersion string + Resolution string + Title string + Username string + type Revision struct + Blocks []Block + type RevisionMetadata struct + CreateTime int64 + ID string + ManifestSignature string + SignatureEmail string + Size int64 + State RevisionState + Thumbnail Bool + ThumbnailHash string + type RevisionState int + const RevisionStateActive + const RevisionStateDeleted + const RevisionStateDraft + const RevisionStateObsolete + type Salt struct + ID string + KeySalt string + type Salts []Salt + func (salts Salts) SaltForKey(keyPass []byte, keyID string) ([]byte, error) + type Scheduler interface + Schedule func(ctx context.Context, attachmentIDs []string, ...) ([]*bytes.Buffer, error) + type SendDraftReq struct + Packages []*MessagePackage + func (req *SendDraftReq) AddMIMEPackage(kr *crypto.KeyRing, mimeBody string, prefs map[string]SendPreferences) error + func (req *SendDraftReq) AddTextPackage(kr *crypto.KeyRing, body string, mimeType rfc822.MIMEType, ...) error + type SendPreferences struct + Encrypt bool + EncryptionScheme EncryptionScheme + MIMEType rfc822.MIMEType + PubKey *crypto.KeyRing + SignatureType SignatureType + type SendStatsMultiReq struct + EventInfo []SendStatsReq + type SendStatsReq struct + Dimensions map[string]any + Event string + MeasurementGroup string + Values map[string]any + type SendVerificationCodeReq struct + Destination TokenDestination + Type TokenType + Username string + type SequentialScheduler struct + func NewSequentialScheduler() *SequentialScheduler + func (SequentialScheduler) Schedule(ctx context.Context, attachmentIDs []string, ...) ([]*bytes.Buffer, error) + type SessionKey struct + Algorithm string + Key string + type SetAttachPublicKeyReq struct + AttachPublicKey Bool + type SetCrashReportReq struct + CrashReports SettingsBool + type SetDefaultPGPSchemeReq struct + PGPScheme EncryptionScheme + type SetDisplayNameReq struct + DisplayName string + type SetDraftMIMETypeReq struct + MIMEType rfc822.MIMEType + type SetSignExternalMessagesReq struct + Sign SignExternalMessages + type SetSignatureReq struct + Signature string + type SetTelemetryReq struct + Telemetry SettingsBool + type SettingsBool int + const SettingDisabled + const SettingEnabled + type Share struct + AddressID string + AddressKeyID string + Key string + Passphrase string + PassphraseSignature string + func (s Share) GetKeyRing(addrKR *crypto.KeyRing) (*crypto.KeyRing, error) + type ShareFlags int + const NoFlags + const PrimaryShare + type ShareMetadata struct + CreationTime int64 + Creator string + Flags ShareFlags + LinkID string + Locked bool + ModifyTime int64 + ShareID string + State ShareState + Type ShareType + VolumeID string + VolumeSoftDeleted bool + type ShareState int + const ShareStateActive + const ShareStateDeleted + type ShareType int + const ShareTypeDevice + const ShareTypeMain + const ShareTypeStandard + type SignExternalMessages int + const SignExternalMessagesDisabled + const SignExternalMessagesEnabled + type Signature struct + Data *crypto.PGPSignature + Hash string + func ExtractSignatures(kr *crypto.KeyRing, arm string) ([]Signature, error) + type SignatureType int + const AttachedSignature + const DetachedSignature + const NoSignature + type Status int + const StatusDown + const StatusUp + func (s Status) String() string + type StatusObserver func(Status) + type Ticker struct + C chan time.Time + func NewTicker(period, jitter time.Duration, panicHandler async.PanicHandler) *Ticker + func (t *Ticker) Stop() + type TokenDestination struct + Address string + Phone string + type TokenType string + const EmailTokenType + const SMSTokenType + type TwoFAInfo struct + Enabled TwoFAStatus + FIDO2 FIDO2Info + type TwoFAStatus int + const HasFIDO2 + const HasTOTP + type UndoRes struct + Messages []Message + type UndoToken struct + Token string + ValidUntil int64 + type UpdateContactReq struct + Cards Cards + type UpdateDraftReq struct + AttachmentKeyPackets []string + Message DraftTemplate + type UpdateLabelReq struct + Color string + Name string + ParentID string + type UpdateRevisionReq struct + BlockList []BlockToken + ManifestSignature string + SignatureAddress string + State RevisionState + type User struct + Credit int + Currency string + DisplayName string + Email string + ID string + Keys Keys + MaxSpace int + MaxUpload int + Name string + UsedSpace int + type UserSettings struct + CrashReports SettingsBool + Telemetry SettingsBool + type UserType int + const MailUserType + const VPNUserType + type Volume struct + CreationTime int64 + DownloadedBytes int64 + MaxSpace *int64 + ModifyTime int64 + RestoreStatus *VolumeRestoreStatus + Share VolumeShare + State VolumeState + UploadedBytes int64 + UsedSpace int64 + VolumeID string + type VolumeRestoreStatus int + const RestoreStatusDone + const RestoreStatusFailed + const RestoreStatusInProgress + type VolumeShare struct + LinkID string + ShareID string + type VolumeState int + const VolumeStateActive + const VolumeStateLocked