schema

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package schema has the PostgreSQL store's tables and queries, and binds the certificate types in cert/cert to them. Each type here is one of cert/cert's, so converts to and from it, such as (*Certificate)(&c).

Index

Constants

View Source
const (
	// Maximum number of subjects to return in a list query
	SubjectListLimit = 100

	// Maximum number of certificates to return in a list query
	CertListLimit = 100
)
View Source
const LockName = `SELECT pg_advisory_xact_lock(hashtext(${'schema'} || '.' || @name))`

LockName serializes creating certificates with a name, bound as name, until the transaction ends. It's run with Exec, which doesn't look up the named queries.

View Source
const (
	SchemaName = "cert"
)

Variables

View Source
var Objects string
View Source
var Queries string

Functions

This section is empty.

Types

type CertKey

type CertKey cert.CertKey

CertKey selects a certificate by its name and serial

func (CertKey) Select

func (c CertKey) Select(bind *pg.Bind, op pg.Op) (string, error)

type CertList

type CertList cert.CertList

CertList reads a list of certificates

func (*CertList) Scan

func (c *CertList) Scan(row pg.Row) error

func (*CertList) ScanCount

func (c *CertList) ScanCount(row pg.Row) error

type CertListRequest

type CertListRequest cert.CertListRequest

CertListRequest lists certificates

func (CertListRequest) Select

func (c CertListRequest) Select(bind *pg.Bind, op pg.Op) (string, error)

type CertMeta

type CertMeta cert.CertMeta

CertMeta updates a certificate's metadata

func (CertMeta) Insert

func (c CertMeta) Insert(bind *pg.Bind) (string, error)

func (CertMeta) Update

func (c CertMeta) Update(bind *pg.Bind) error

type CertName

type CertName string

CertName selects the latest certificate with a name

func (CertName) Select

func (c CertName) Select(bind *pg.Bind, op pg.Op) (string, error)

type CertWithPrivateKey

type CertWithPrivateKey cert.CertWithPrivateKey

CertWithPrivateKey inserts a certificate with its private key, and reads one

func (CertWithPrivateKey) Insert

func (c CertWithPrivateKey) Insert(bind *pg.Bind) (string, error)

func (*CertWithPrivateKey) Scan

func (c *CertWithPrivateKey) Scan(row pg.Row) error

func (CertWithPrivateKey) Update added in v0.0.15

func (c CertWithPrivateKey) Update(bind *pg.Bind) error

Update updates the certificate's metadata, so with Insert it's a pg.Writer

type Certificate added in v0.0.15

type Certificate cert.Certificate

Certificate reads a certificate

func (*Certificate) Scan added in v0.0.15

func (c *Certificate) Scan(row pg.Row) error

type PrivateCertKey

type PrivateCertKey cert.CertKey

PrivateCertKey selects a certificate by its name and serial, with its private key

func (PrivateCertKey) Select

func (c PrivateCertKey) Select(bind *pg.Bind, op pg.Op) (string, error)

type PrivateCertName

type PrivateCertName string

PrivateCertName selects the latest certificate with a name, with its private key

func (PrivateCertName) Select

func (c PrivateCertName) Select(bind *pg.Bind, op pg.Op) (string, error)

type Subject

type Subject cert.Subject

Subject reads a subject

func (*Subject) Scan

func (n *Subject) Scan(row pg.Row) error

type SubjectID

type SubjectID uint64

SubjectID selects a subject by its row identifier

func (SubjectID) Select

func (n SubjectID) Select(bind *pg.Bind, op pg.Op) (string, error)

type SubjectList

type SubjectList cert.SubjectList

SubjectList reads a list of subjects

func (*SubjectList) Scan

func (n *SubjectList) Scan(row pg.Row) error

func (*SubjectList) ScanCount

func (n *SubjectList) ScanCount(row pg.Row) error

type SubjectListRequest

type SubjectListRequest cert.SubjectListRequest

SubjectListRequest lists subjects

func (SubjectListRequest) Select

func (n SubjectListRequest) Select(bind *pg.Bind, op pg.Op) (string, error)

type SubjectLock added in v0.0.15

type SubjectLock uint64

SubjectLock locks a subject, until the transaction ends

func (SubjectLock) Select added in v0.0.15

func (n SubjectLock) Select(bind *pg.Bind, op pg.Op) (string, error)

type SubjectMeta

type SubjectMeta cert.SubjectMeta

SubjectMeta inserts and updates a subject

func (SubjectMeta) Insert

func (n SubjectMeta) Insert(bind *pg.Bind) (string, error)

func (SubjectMeta) Update

func (n SubjectMeta) Update(bind *pg.Bind) error

Jump to

Keyboard shortcuts

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