certificate

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TypeClient = Type(1)

TypeClient indicates a client certificate type.

View Source
const TypeMetrics = Type(3)

TypeMetrics indicates a metrics certificate type.

View Source
const TypeServer = Type(2)

TypeServer indicates a server certificate type.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache represents an thread-safe in-memory cache of the certificates in the database.

func (*Cache) GetCertificates

func (c *Cache) GetCertificates() map[Type]map[string]x509.Certificate

GetCertificates returns a read-only copy of the certificate map.

func (*Cache) GetCertificatesAndProjects

func (c *Cache) GetCertificatesAndProjects() (map[Type]map[string]x509.Certificate, map[string][]string)

GetCertificatesAndProjects returns a read-only copy of the certificate and project maps.

func (*Cache) GetProjects

func (c *Cache) GetProjects() map[string][]string

GetProjects returns a read-only copy of the project map.

func (*Cache) SetCertificates

func (c *Cache) SetCertificates(certificates map[Type]map[string]x509.Certificate)

SetCertificates sets the certificates on the Cache.

func (*Cache) SetCertificatesAndProjects

func (c *Cache) SetCertificatesAndProjects(certificates map[Type]map[string]x509.Certificate, projects map[string][]string)

SetCertificatesAndProjects sets both certificates and projects on the Cache.

func (*Cache) SetProjects

func (c *Cache) SetProjects(projects map[string][]string)

SetProjects sets the projects on the Cache.

type Type

type Type int

Type indicates the type of the certificate.

func FromAPIType

func FromAPIType(apiType string) (Type, error)

FromAPIType converts an API type to the equivalent Type.

Jump to

Keyboard shortcuts

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