Documentation ¶
Index ¶
- Constants
- type DB
- func (e DB) Chain(ctx context.Context, chainID []byte) ([]*x509.Certificate, error)
- func (e DB) Chains(ctx context.Context, query trust.ChainQuery) ([][]*x509.Certificate, error)
- func (db DB) Close() error
- func (e DB) InsertChain(ctx context.Context, chain []*x509.Certificate) (bool, error)
- func (e DB) InsertTRC(ctx context.Context, trc cppki.SignedTRC) (bool, error)
- func (db DB) SetMaxIdleConns(maxIdleConns int)
- func (db DB) SetMaxOpenConns(maxOpenConns int)
- func (e DB) SignedTRC(ctx context.Context, id cppki.TRCID) (cppki.SignedTRC, error)
- func (e DB) SignedTRCs(ctx context.Context, query truststorage.TRCsQuery) (cppki.SignedTRCs, error)
Constants ¶
View Source
const ( // SchemaVersion is the version of the SQLite schema understood by this backend. // Whenever changes to the schema are made, this version number should be increased // to prevent data corruption between incompatible database schemas. SchemaVersion = 1 // Schema is the SQLite database layout. Schema = `` /* 521-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB implements the trust DB with an SQLite backend.
func New ¶
New returns a new SQLite backend opening a database at the given path. If no database exists a new database is be created. If the schema version of the stored database is different from the one in schema.go, an error is returned.
func (DB) Chains ¶
func (e DB) Chains(ctx context.Context, query trust.ChainQuery) ([][]*x509.Certificate, error)
func (DB) InsertChain ¶
func (DB) SetMaxIdleConns ¶
SetMaxIdleConns sets the maximum number of idle connections.
func (DB) SetMaxOpenConns ¶
SetMaxOpenConns sets the maximum number of open connections.
func (DB) SignedTRCs ¶
func (e DB) SignedTRCs(ctx context.Context, query truststorage.TRCsQuery) (cppki.SignedTRCs, error)
SignedTRCs returns the TRC from each ISD in the trust database according to the query.
Click to show internal directories.
Click to hide internal directories.