Documentation ¶
Index ¶
- func Allocate(length int) ([]byte, error)
- func Decrypt(data []byte, passphrase string) ([]byte, error)
- func Encrypt(data []byte, passphrase string) ([]byte, error)
- func Unallocate(bytes []byte) error
- func WriteFilesToZip(w *zip.Writer, files chan *multipart.FileHeader, wg *sync.WaitGroup) error
- type OnionBuffer
- func (b *OnionBuffer) Destroy() error
- func (b *OnionBuffer) GetChecksum() (string, error)
- func (b *OnionBuffer) IsExpired() bool
- func (b *OnionBuffer) Mlock() error
- func (b *OnionBuffer) Munlock() error
- func (b *OnionBuffer) SetExpiration(expiration string) error
- func (b *OnionBuffer) ValidateChecksum() (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Unallocate ¶
func WriteFilesToZip ¶
Types ¶
type OnionBuffer ¶
type OnionBuffer struct { sync.RWMutex Name string Bytes []byte Checksum string Encrypted bool Downloads int64 DownloadLimit int64 Expire bool ExpiresAt time.Time }
OnionBuffer struct
func (*OnionBuffer) Destroy ¶
func (b *OnionBuffer) Destroy() error
Destroy is mostly used to destroy temporary OnionBuffer objects after they have been copied to the store or to remove an individual OnionBuffer from the store.
func (*OnionBuffer) GetChecksum ¶
func (b *OnionBuffer) GetChecksum() (string, error)
func (*OnionBuffer) IsExpired ¶
func (b *OnionBuffer) IsExpired() bool
IsExpired is used to check if an OnionBuffer is expired or not.
func (*OnionBuffer) Mlock ¶
func (b *OnionBuffer) Mlock() error
func (*OnionBuffer) Munlock ¶
func (b *OnionBuffer) Munlock() error
func (*OnionBuffer) SetExpiration ¶
func (b *OnionBuffer) SetExpiration(expiration string) error
SetExpiration is used to set the expiration duration of the OnionBuffer.
func (*OnionBuffer) ValidateChecksum ¶
func (b *OnionBuffer) ValidateChecksum() (bool, error)
Click to show internal directories.
Click to hide internal directories.