server

package
v0.0.0-...-c0bec1e Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(config *config.Server) error

Types

type AboutInfo

type AboutInfo struct {
	Version   string `json:"version"`
	Timestamp string `json:"timestamp"`
}

<- /api/about

type BasicConstraintsSpec

type BasicConstraintsSpec struct {
	ExtensionSpec
	CA                bool `json:"ca"`
	PathLenConstraint int  `json:"pathLenConstraint"`
}

type CA

type CA struct {
	Name string `json:"name"`
}

type CAs

type CAs struct {
	CAs []CA `json:"cas"`
}

<- /api/cas

type Entries

type Entries struct {
	Entries []Entry `json:"entries"`
	Start   int     `json:"start"`
	Total   int     `json:"total"`
}

type EntriesFilter

type EntriesFilter struct {
	Start int `form:"start"`
	Limit int `form:"limit"`
}

<- /api/entries

type Entry

type Entry struct {
	Name      string        `json:"name"`
	DN        string        `json:"dn"`
	Serial    *big.Int      `json:"serial"`
	KeyType   string        `json:"keyType"`
	Key       bool          `json:"key"`
	CRT       bool          `json:"crt"`
	CSR       bool          `json:"csr"`
	CRL       bool          `json:"crl"`
	CA        bool          `json:"ca"`
	ValidFrom string        `json:"validFrom"`
	ValidTo   string        `json:"validTo"`
	KeyUsage  x509.KeyUsage `json:"keyUsage"`
}

type EntryDetails

type EntryDetails struct {
	Name   string              `json:"name"`
	Groups []EntryDetailsGroup `json:"groups"`
}

<- /api/details/:name

type EntryDetailsAttribute

type EntryDetailsAttribute struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type EntryDetailsGroup

type EntryDetailsGroup struct {
	Title      string                  `json:"title"`
	Attributes []EntryDetailsAttribute `json:"attributes"`
}

func (*EntryDetailsGroup) Empty

func (group *EntryDetailsGroup) Empty() bool

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

<- /api/*

type ExtKeyUsageSpec

type ExtKeyUsageSpec struct {
	ExtensionSpec
	Any                            bool `json:"any"`
	ServerAuth                     bool `json:"serverAuth"`
	ClientAuth                     bool `json:"clientAuth"`
	CodeSigning                    bool `json:"codeSigning"`
	EmailProtection                bool `json:"emailProtection"`
	IPSECEndSystem                 bool `json:"ipsecEndSystem"`
	IPSECTunnel                    bool `json:"ipsecTunnel"`
	IPSECUser                      bool `json:"ipsecUser"`
	TimeStamping                   bool `json:"timeStamping"`
	OCSPSigning                    bool `json:"ocspSigning"`
	MicrosoftServerGatedCrypto     bool `json:"microsoftServerGatedCrypto"`
	NetscapeServerGatedCrypto      bool `json:"netscapeServerGatedCrypto"`
	MicrosoftCommercialCodeSigning bool `json:"microsoftCommercialCodeSigning"`
	MicrosoftKernelCodeSigning     bool `json:"microsoftKernelCodeSigning"`
}

type ExtensionSpec

type ExtensionSpec struct {
	Enabled bool `json:"enabled"`
}

type Generate

type Generate struct {
	Name string `json:"name"`
	CA   string `json:"ca"`
}

<- /api/generate/local

type GenerateACME

type GenerateACME struct {
	Generate
	Domains []string `json:"domains"`
	KeyType string   `json:"keyType"`
}

<- /api/generate/acme

type GenerateLocal

type GenerateLocal struct {
	Generate
	DN               string               `json:"dn"`
	KeyType          string               `json:"keyType"`
	Issuer           string               `json:"issuer"`
	ValidFrom        time.Time            `json:"validFrom"`
	ValidTo          time.Time            `json:"validTo"`
	KeyUsage         KeyUsageSpec         `json:"keyUsage"`
	ExtKeyUsage      ExtKeyUsageSpec      `json:"extKeyUsage"`
	BasicConstraints BasicConstraintsSpec `json:"basicConstraints"`
}

type GenerateRemote

type GenerateRemote struct {
	Generate
	DN      string `json:"dn"`
	KeyType string `json:"keyType"`
}

<- /api/generate/remote

type IssuersFilter

type IssuersFilter struct {
	KeyUsage x509.KeyUsage `form:"keyUsage"`
}

<- /api/issuers

type KeyUsageSpec

type KeyUsageSpec struct {
	ExtensionSpec
	KeyUsage x509.KeyUsage `json:"keyUsage"`
}

Jump to

Keyboard shortcuts

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