Documentation ¶
Overview ¶
Package postgreskeystore provides an implementation of bakery.RootKeyStore that uses Postgres as a persistent store.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RootKeys ¶
type RootKeys struct {
// contains filtered or unexported fields
}
RootKeys represents a cache of macaroon root keys.
func NewRootKeys ¶
NewRootKeys returns a root-keys cache that uses the given table in the given Postgres database for storage and is limited in size to approximately the given size. The table will be created lazily when the root key store is first used.
The returned RootKeys instance must be closed after use.
It also creates other SQL resources using the table name as a prefix.
Use the NewStore method to obtain a RootKeyStore implementation suitable for particular root key lifetimes.
func (*RootKeys) Close ¶
Close closes the RootKeys instance. This must be called after using the instance.
func (*RootKeys) NewStore ¶
func (s *RootKeys) NewStore(policy Policy) bakery.RootKeyStore
NewStore returns a new RootKeyStore implementation that stores and obtains root keys from the given collection.
Root keys will be generated and stored following the given store policy.
It is expected that all collections passed to a given Store's NewStore method should refer to the same underlying collection.