schema

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 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

Index

Constants

View Source
const (
	// Maximum number of names to return in a list query
	NameListLimit = 100
)
View Source
const (
	SchemaName = "cert"
)

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(ctx context.Context, conn pg.Conn) error

Bootstrap creates the schema and tables for the certificate manager and returns an error if it fails. It is expected that this function will be called within a transaction

Types

type CertMeta

type CertMeta struct {
	Name         string    `json:"name"`
	Signer       *string   `json:"signer,omitempty"`
	SerialNumber string    `json:"serial_number,omitempty"`
	Subject      string    `json:"subject,omitempty"`
	NotBefore    time.Time `json:"not_before,omitempty"`
	NotAfter     time.Time `json:"not_after,omitempty"`
	IPs          []net.IP  `json:"ips,omitempty"`
	Hosts        []string  `json:"hosts,omitempty"`
	IsCA         bool      `json:"is_ca,omitempty"`
	KeyType      string    `json:"key_type,omitempty"`
	KeyBits      string    `json:"key_subtype,omitempty"`
}

Certificate Metadata

func (CertMeta) String

func (c CertMeta) String() string

type Name

type Name struct {
	Id uint64 `json:"id"`
	NameMeta
	Ts      time.Time `json:"timestamp,omitzero"`
	Subject *string   `json:"subject,omitempty"`
}

func (*Name) Scan

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

func (Name) String

func (n Name) String() string

type NameId

type NameId uint64

func (NameId) Select

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

type NameList

type NameList struct {
	Count uint64 `json:"count"`
	Body  []Name `json:"body,omitempty"`
}

func (*NameList) Scan

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

func (*NameList) ScanCount

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

func (NameList) String

func (n NameList) String() string

type NameListRequest

type NameListRequest struct {
	pg.OffsetLimit
}

func (NameListRequest) Select

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

type NameMeta

type NameMeta struct {
	CommonName    string  `json:"commonName,omitempty"`
	Org           *string `json:"organizationName,omitempty"`
	Unit          *string `json:"organizationalUnit,omitempty"`
	Country       *string `json:"countryName,omitempty"`
	City          *string `json:"localityName,omitempty"`
	State         *string `json:"stateOrProvinceName,omitempty"`
	StreetAddress *string `json:"streetAddress,omitempty"`
	PostalCode    *string `json:"postalCode,omitempty"`
}

func (NameMeta) Insert

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

func (NameMeta) String

func (n NameMeta) String() string

func (NameMeta) Update

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

Jump to

Keyboard shortcuts

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