Documentation
¶
Index ¶
- Constants
- func DeleteExpiredFile(pile, entry string) error
- func IsConfiguredBucket(buckets [][]byte, name []byte) bool
- func Startup(config Config, db *bbolt.DB) error
- func VoidExpired(config Config, db *bbolt.DB)
- type BoltDatabase
- func (eh BoltDatabase) CreateEntry(pile string, filename string, create CreateWithFunc) (string, error)
- func (eh BoltDatabase) GetEntry(pile string, entry string, get GetWithFunc) error
- func (eh BoltDatabase) GetPileEntries(pile string) (map[string]EntryMeta, error)
- func (eh BoltDatabase) Startup(config Config) error
- type Config
- type CreateWithFunc
- type EntryCreator
- type EntryGetter
- type EntryHandler
- type EntryMeta
- type ErrDuringFileOperation
- type ErrFailedCreatingEntryFile
- type ErrFailedCreatingPileDirectory
- type ErrFailedMakingId
- type ErrFailedStoringEntryMetadata
- type ErrNoSuchEntry
- type ErrNoSuchPile
- type ErrUnparsableMeta
- type GetWithFunc
- type Lifetime
- type PileConfig
- type PileGetter
- type QuitSignalChan
- type Starter
Constants ¶
View Source
const (
TIME_FORMAT = time.RFC3339
)
Variables ¶
This section is empty.
Functions ¶
func DeleteExpiredFile ¶
func IsConfiguredBucket ¶
func VoidExpired ¶
Types ¶
type BoltDatabase ¶
type BoltDatabase struct {
// contains filtered or unexported fields
}
func MustOpenBoltDatabase ¶
func MustOpenBoltDatabase(filename string) BoltDatabase
func (BoltDatabase) CreateEntry ¶
func (eh BoltDatabase) CreateEntry(pile string, filename string, create CreateWithFunc) (string, error)
func (BoltDatabase) GetEntry ¶
func (eh BoltDatabase) GetEntry(pile string, entry string, get GetWithFunc) error
func (BoltDatabase) GetPileEntries ¶
func (eh BoltDatabase) GetPileEntries(pile string) (map[string]EntryMeta, error)
func (BoltDatabase) Startup ¶
func (eh BoltDatabase) Startup(config Config) error
type Config ¶
type Config struct { Piles map[string]PileConfig `json:"piles"` ForwardHeader string `json:"forward_header"` }
func LoadConfig ¶
func (Config) BucketNames ¶
type EntryCreator ¶
type EntryCreator interface {
CreateEntry(pile string, entry string, creator CreateWithFunc) (entryID string, err error)
}
type EntryGetter ¶
type EntryGetter interface {
GetEntry(pile string, entry string, read GetWithFunc) (err error)
}
type EntryHandler ¶
type EntryHandler interface { EntryGetter EntryCreator }
type EntryMeta ¶
type EntryMeta struct {
// contains filtered or unexported fields
}
func EntryMetaFromBytes ¶
type ErrDuringFileOperation ¶
func (ErrDuringFileOperation) Error ¶
func (err ErrDuringFileOperation) Error() string
type ErrFailedCreatingEntryFile ¶
func (ErrFailedCreatingEntryFile) Error ¶
func (err ErrFailedCreatingEntryFile) Error() string
type ErrFailedCreatingPileDirectory ¶
func (ErrFailedCreatingPileDirectory) Error ¶
func (err ErrFailedCreatingPileDirectory) Error() string
type ErrFailedMakingId ¶
type ErrFailedMakingId struct {
UpstreamError error
}
func (ErrFailedMakingId) Error ¶
func (err ErrFailedMakingId) Error() string
type ErrFailedStoringEntryMetadata ¶
func (ErrFailedStoringEntryMetadata) Error ¶
func (err ErrFailedStoringEntryMetadata) Error() string
type ErrNoSuchEntry ¶
func (ErrNoSuchEntry) Error ¶
func (err ErrNoSuchEntry) Error() string
type ErrNoSuchPile ¶
type ErrNoSuchPile struct {
Pile string
}
func (ErrNoSuchPile) Error ¶
func (err ErrNoSuchPile) Error() string
type ErrUnparsableMeta ¶
func (ErrUnparsableMeta) Error ¶
func (err ErrUnparsableMeta) Error() string
type PileConfig ¶
type PileGetter ¶
Click to show internal directories.
Click to hide internal directories.