Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BoltDBFile is the filename to store the boltdb database BoltDBFile = "store.db" // BucketName is the bucket name to save the sote BucketName = "store" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryType ¶
type EntryType struct { Path hash.Hash `json:"path"` // Path of the entry Parent *hash.Hash `json:"parent"` // path of the parent, or nil when it's the root Data []byte `json:"data"` // actual (encrypted) data Timestamp int64 `json:"timestamp"` // Timestamp of this entry, or the highest timestamp of any entry below HasChildren bool `json:"has_children"` // True when this entry has children Children []EntryType `json:"entries"` // Child entries (when recursive) Signature []byte `json:"signature"` // Signature for this entry }
EntryType is the structure that defines the output of a store entry (collection)
func (*EntryType) MarshalBinary ¶
MarshalBinary converts a storeentrytype to binary format so it can be stored in Redis
func (*EntryType) UnmarshalBinary ¶
UnmarshalBinary converts binary to a ticket so it can be fetched from Redis
type Repository ¶
type Repository interface { HasEntry(account, path hash.Hash) bool RemoveEntry(account, path hash.Hash, recursive bool) error GetEntry(account, path hash.Hash, recursive bool, since time.Time) (*EntryType, error) SetEntry(account hash.Hash, entry EntryType) error OpenDb(account hash.Hash) error CloseDb(account hash.Hash) error }
Repository is a store repository to fetch and store tickets
func NewBoltRepository ¶
func NewBoltRepository(accountsPath string) Repository
NewBoltRepository initializes a new repository
Click to show internal directories.
Click to hide internal directories.