Documentation
¶
Overview ¶
Package attachments owns the ephemeral server attachment spool.
Index ¶
- Constants
- type Capacity
- type Download
- type Error
- type Owner
- type Store
- func (s *Store) Bind(owner Owner, id, recipient string, sequence uint64) (*protocol.Attachment, error)
- func (s *Store) Close() error
- func (s *Store) Delete(id, reason string)
- func (s *Store) DeleteOwned(owner Owner, id string, bindingSequence uint64)
- func (s *Store) DiskCapacity() (Capacity, error)
- func (s *Store) Enabled() bool
- func (s *Store) Get(project, recipient, id string) (*Download, error)
- func (s *Store) SetEnabled(enabled bool)
- func (s *Store) Upload(ctx context.Context, owner Owner, name string, size int64, body io.Reader) (protocol.Attachment, error)
Constants ¶
View Source
const DiskFloorBytes uint64 = 1 << 30
View Source
const Expiry = 30 * time.Minute
View Source
const MaxFileBytes int64 = 100 << 20
View Source
const MaxTransfers = 8
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capacity ¶
type Capacity struct{ Free, Total uint64 }
Capacity describes space available to this server on the spool volume.
type Download ¶
type Download struct {
io.ReadCloser
Ref protocol.Attachment
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) DeleteOwned ¶
func (*Store) DiskCapacity ¶
func (*Store) SetEnabled ¶
Click to show internal directories.
Click to hide internal directories.