threema

package
v0.0.0-...-c4f4ec1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const BackupIDLength = 32

BackupIDLength is the length in bytes of the backup ID

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupID

type BackupID [BackupIDLength]byte

BackupID is the backup ID type

func ConvertToBackupID

func ConvertToBackupID(s string) (BackupID, error)

ConvertToBackupID converts string to BackupID

func (*BackupID) String

func (b *BackupID) String() string

String converts BackupID to string

type BackupInput

type BackupInput struct {
	BackupID        BackupID
	EncryptedBackup EncryptedBackup
	RetentionDays   uint
}

BackupInput is a struct containing the backup

type BackupOutput

type BackupOutput struct {
	BackupID        BackupID
	EncryptedBackup EncryptedBackup
	CreationTime    time.Time
	ExpirationTime  time.Time
}

BackupOutput is a struct containing the backup

type EncryptedBackup

type EncryptedBackup []byte

EncryptedBackup is the encrypted backup type

func (*EncryptedBackup) Validate

func (t *EncryptedBackup) Validate(maxBackupBytes uint) error

Validate validates the EncryptedBackup

type ErrBackupIDInvalid

type ErrBackupIDInvalid struct {
	BackupID BackupID
}

ErrBackupIDInvalid is being used whenever a backup ID is invalid

func (*ErrBackupIDInvalid) Error

func (e *ErrBackupIDInvalid) Error() string

type ErrBackupIDLength

type ErrBackupIDLength struct {
	BackupID      BackupID
	DesiredLength uint
}

ErrBackupIDLength is being used whenever the length of a backup ID is invalid

func (*ErrBackupIDLength) Error

func (e *ErrBackupIDLength) Error() string

type ErrBackupIDStringInvalid

type ErrBackupIDStringInvalid struct {
	BackupIDString string
	UpstreamError  error
}

ErrBackupIDStringInvalid is being used whenever a backup ID string is invalid

func (*ErrBackupIDStringInvalid) Error

func (e *ErrBackupIDStringInvalid) Error() string

type ErrBackupIDStringLength

type ErrBackupIDStringLength struct {
	BackupIDString string
	DesiredLength  uint
}

ErrBackupIDStringLength is being used whenever the length of a backup ID string is invalid

func (*ErrBackupIDStringLength) Error

func (e *ErrBackupIDStringLength) Error() string

type ErrEncryptedBackupInvalid

type ErrEncryptedBackupInvalid struct {
	EncryptedBackup EncryptedBackup
}

ErrEncryptedBackupInvalid is being used whenever an encrypted backup is invalid

func (*ErrEncryptedBackupInvalid) Error

func (e *ErrEncryptedBackupInvalid) Error() string

type ErrEncryptedBackupLength

type ErrEncryptedBackupLength struct {
	EncryptedBackup EncryptedBackup
	MaxLength       uint
}

ErrEncryptedBackupLength is being used whenever the length of an encrypted backup is invalid

func (*ErrEncryptedBackupLength) Error

func (e *ErrEncryptedBackupLength) Error() string

type ErrInvalidUserAgent

type ErrInvalidUserAgent struct {
	UserAgent string
}

ErrInvalidUserAgent is being used whenever a user agent is invalid

func (*ErrInvalidUserAgent) Error

func (e *ErrInvalidUserAgent) Error() string

Jump to

Keyboard shortcuts

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