certpg

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 12 Imported by: 0

README

PostgreSQL schema

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BulkRange = int64(4096)
View Source
var FunctionOperatorID = `` /* 503-byte string literal not displayed */
View Source
var FunctionStreamID = `` /* 494-byte string literal not displayed */
View Source
var Initialize = `
CREATE EXTENSION IF NOT EXISTS pg_trgm;
`
View Source
var ProcedureNewEntry = `` /* 2660-byte string literal not displayed */
View Source
var SelectGaps = `` /* 203-byte string literal not displayed */
View Source
var SelectMinIndex = `SELECT MIN(logindex) AS logindex FROM CERTDB_entry WHERE stream = $1;`
View Source
var TableCert = `` /* 385-byte string literal not displayed */
View Source
var TableDNSName = `` /* 246-byte string literal not displayed */
View Source
var TableEmail = `` /* 217-byte string literal not displayed */
View Source
var TableEntry = `` /* 246-byte string literal not displayed */
View Source
var TableIPAddress = `` /* 225-byte string literal not displayed */
View Source
var TableIdent = `` /* 390-byte string literal not displayed */
View Source
var TableOperator = `` /* 162-byte string literal not displayed */
View Source
var TablePrefix = "certdb_"
View Source
var TableStream = `` /* 203-byte string literal not displayed */
View Source
var TableURI = `` /* 203-byte string literal not displayed */
View Source
var ViewDNSName = `` /* 470-byte string literal not displayed */

Functions

func CreateSchema

func CreateSchema(ctx context.Context, db *sql.DB) (err error)

Types

type CertPG

type CertPG struct {
	*sql.DB
	certstream.Logger
	// contains filtered or unexported fields
}

CertPG integrates with sql.DB to manage certificate stream data for a PostgreSQL database

func New

func New(ctx context.Context, db *sql.DB) (cdb *CertPG, err error)

New creates a Certdb and creates the needed tables and indices if they don't exist.

func (*CertPG) Backfill

func (cdb *CertPG) Backfill(ctx context.Context, ls *certstream.LogStream)

func (*CertPG) Close

func (cdb *CertPG) Close() error

Close frees resources used.

func (*CertPG) Entry

func (cdb *CertPG) Entry(ctx context.Context, le *certstream.LogEntry) (err error)

func (*CertPG) GetMinMaxIndexes

func (cdb *CertPG) GetMinMaxIndexes(ctx context.Context, streamUrl string) (minIndex, maxIndex int64, err error)

func (*CertPG) LogError

func (cdb *CertPG) LogError(err error, msg string, args ...any) error

func (*CertPG) Operator

func (cdb *CertPG) Operator(ctx context.Context, lo *certstream.LogOperator) (err error)

func (*CertPG) Stream

func (cdb *CertPG) Stream(ctx context.Context, ls *certstream.LogStream) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL