Documentation
¶
Index ¶
- Constants
- type Cache
- func (c *Cache) GetAPICertificate(fingerprint string) *api.CertificatePut
- func (c *Cache) GetCertificates() map[Type]map[string]x509.Certificate
- func (c *Cache) GetCertificatesAndProjects() (map[Type]map[string]x509.Certificate, map[string][]string)
- func (c *Cache) GetProjects() map[string][]string
- func (c *Cache) SetCertificates(certificates []*api.Certificate)
- type Type
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) GetAPICertificate ¶
func (c *Cache) GetAPICertificate(fingerprint string) *api.CertificatePut
GetAPICertificate returns a read-only copy of the API certificate associated to the given fingerprint.
func (*Cache) GetCertificates ¶
func (c *Cache) GetCertificates() map[Type]map[string]x509.Certificate
GetCertificates returns a certificate map.
func (*Cache) GetCertificatesAndProjects ¶
func (c *Cache) GetCertificatesAndProjects() (map[Type]map[string]x509.Certificate, map[string][]string)
GetCertificatesAndProjects returns certificate and project maps.
func (*Cache) GetProjects ¶
GetProjects returns a project map.
func (*Cache) SetCertificates ¶
func (c *Cache) SetCertificates(certificates []*api.Certificate)
SetCertificates sets the certificates on the Cache.
Click to show internal directories.
Click to hide internal directories.