schema

package
v1.5.14 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

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

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 Cert added in v1.5.6

type Cert struct {
	Name string `json:"name"`
	CertMeta
	Ts time.Time `json:"timestamp,omitzero"`
}

Certificate Metadata

func (*Cert) Scan added in v1.5.6

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

func (Cert) String added in v1.5.6

func (c Cert) String() string

type CertCreateMeta added in v1.5.6

type CertCreateMeta struct {
	Name         string        `json:"name,omitempty"`
	CommonName   string        `json:"common_name,omitempty"`
	Signer       string        `json:"signer,omitempty"`
	Subject      string        `json:"subject,omitempty"`
	SerialNumber *big.Int      `json:"serial_number,omitempty"`
	Expiry       time.Duration `json:"expiry,omitempty"`
	IsCA         bool          `json:"is_ca,omitempty"`
	KeyType      string        `json:"key_type,omitempty"`
	Address      []string      `json:"address,omitempty"`
}

Certificate Metadata for creating a new certificate

type CertList added in v1.5.6

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

func (CertList) String added in v1.5.6

func (c CertList) String() string

type CertListRequest added in v1.5.6

type CertListRequest struct {
	pg.OffsetLimit
}

func (CertListRequest) String added in v1.5.6

func (c CertListRequest) String() string

type CertMeta

type CertMeta struct {
	Signer    *string   `json:"signer,omitempty"`
	Subject   *uint64   `json:"subject,omitempty"`
	NotBefore time.Time `json:"not_before,omitzero"`
	NotAfter  time.Time `json:"not_after,omitzero"`
	IsCA      bool      `json:"is_ca,omitempty"`
	Cert      []byte    `json:"cert,omitempty"`
	Key       []byte    `json:"key,omitempty"`
}

Certificate Metadata

func (CertMeta) Insert added in v1.5.6

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

func (CertMeta) String

func (c CertMeta) String() string

func (CertMeta) Update added in v1.5.6

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

type CertName added in v1.5.6

type CertName string

Certificate Name

func (CertName) Select added in v1.5.6

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

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 {
	NameListRequest
	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)

func (NameListRequest) String added in v1.5.6

func (n NameListRequest) String() string

type NameMeta

type NameMeta struct {
	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