Documentation ¶
Index ¶
- Constants
- type CA
- type Certificate
- type KeyPair
- type Option
- func WithIsCa(isCa bool) Option
- func WithMaxPathLen(len int) Option
- func WithNotAfter(t time.Time) Option
- func WithSubjectCountry(country []string) Option
- func WithSubjectLocality(locality []string) Option
- func WithSubjectOrganization(organization []string) Option
- func WithSubjectOrganizationalUnit(organizationalUnit []string) Option
- func WithSubjectProvince(province []string) Option
- type Storage
- func (s *Storage) Close() error
- func (s *Storage) Delete(CertificateId string, option ...clientv3.OpOption) error
- func (s *Storage) Get(CertificateId string, option ...clientv3.OpOption) ([]*mvccpb.KeyValue, error)
- func (s *Storage) Put(CertificateId string, Certificate string, option ...clientv3.OpOption) error
Constants ¶
View Source
const ( PrefixRoot = "root/" PrefixMiddle = "middle/" PrefixTerminal = "terminal/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CA ¶
type CA struct {
// contains filtered or unexported fields
}
type Certificate ¶
type Certificate struct {
x509.Certificate
}
func NewCertificate ¶
func NewCertificate(cn string, option ...Option) Certificate
NewCertificate new certificate with CommonName. To Add other information, use WithXXX().
type Option ¶
type Option func(*Certificate)
func WithMaxPathLen ¶
WithMaxPathLen add max length for certificate link
func WithSubjectCountry ¶
WithSubjectCountry add country for Subject
func WithSubjectLocality ¶
WithSubjectLocality add locality for Subject
func WithSubjectOrganization ¶
WithSubjectOrganization add organization for Subject
func WithSubjectOrganizationalUnit ¶
WithSubjectOrganizationalUnit add organizationalUnit for Subject
func WithSubjectProvince ¶
WithSubjectProvince add province for Subject
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
Click to show internal directories.
Click to hide internal directories.