Documentation ¶
Overview ¶
Package truststorage provides a "factory" for trust database. A config containing the backend type and the connection string are used to create a specific trust db.
Index ¶
- Constants
- type Backend
- type TrustDBConf
- func (cfg *TrustDBConf) Backend() Backend
- func (cfg *TrustDBConf) ConfigName() string
- func (cfg *TrustDBConf) Connection() string
- func (cfg *TrustDBConf) InitDefaults()
- func (cfg *TrustDBConf) MaxIdleConns() (int, bool)
- func (cfg *TrustDBConf) MaxOpenConns() (int, bool)
- func (cfg *TrustDBConf) New() (trustdb.TrustDB, error)
- func (cfg *TrustDBConf) Sample(dst io.Writer, path config.Path, ctx config.CtxMap)
- func (cfg *TrustDBConf) Validate() error
Constants ¶
View Source
const ( BackendKey = "backend" ConnectionKey = "connection" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TrustDBConf ¶
TrustDBConf is the configuration for the connection to the trust database.
func (*TrustDBConf) Backend ¶
func (cfg *TrustDBConf) Backend() Backend
func (*TrustDBConf) ConfigName ¶
func (cfg *TrustDBConf) ConfigName() string
func (*TrustDBConf) Connection ¶
func (cfg *TrustDBConf) Connection() string
func (*TrustDBConf) InitDefaults ¶
func (cfg *TrustDBConf) InitDefaults()
InitDefaults choses the sqlite backend if no backend is set.
func (*TrustDBConf) MaxIdleConns ¶
func (cfg *TrustDBConf) MaxIdleConns() (int, bool)
func (*TrustDBConf) MaxOpenConns ¶
func (cfg *TrustDBConf) MaxOpenConns() (int, bool)
func (*TrustDBConf) New ¶
func (cfg *TrustDBConf) New() (trustdb.TrustDB, error)
New creates a TrustDB from the config.
func (*TrustDBConf) Validate ¶
func (cfg *TrustDBConf) Validate() error
Click to show internal directories.
Click to hide internal directories.