Documentation ¶
Index ¶
- Constants
- func CheckFileNotExist(path string) error
- func DefaultStoragePath() (string, error)
- func KubernetesSecretFromCertAndKey(name, namespace string, cacertPem, certPem, keyPem []byte) []byte
- func ReadCertificateFile(p string) (*x509.Certificate, error)
- func ReadFileOrInlineText(p string) ([]byte, error)
- func ReadPrivateKeyFile(p string) (crypto.PrivateKey, error)
- func VerifyProfileName(name string) error
- func WriteCertificateDerFile(p string, certDer []byte) error
- func WriteCertificateFile(p string, cert *x509.Certificate) error
- func WritePrivateKeyFile(p string, priv crypto.PrivateKey) error
- type CAStatus
- type CAStatusCode
- type Profile
- func (s *Profile) CACertPath() string
- func (s *Profile) CAPrivateKeyPath() string
- func (s *Profile) IssueDBPath() string
- func (p *Profile) Name() string
- func (s *Profile) ReadCACertificate() (*x509.Certificate, error)
- func (s *Profile) ReadCAPrivateKey() (crypto.PrivateKey, error)
- func (s *Profile) ReadServerCertificate() (*x509.Certificate, error)
- func (s *Profile) ReadServerPrivateKey() (crypto.PrivateKey, error)
- func (s *Profile) Status(now time.Time) (st *CAStatus)
- func (p *Profile) String() string
- func (s *Profile) WriteCACertificateDer(certDer []byte) error
- func (s *Profile) WriteCAPrivateKey(priv crypto.PrivateKey) error
- func (s *Profile) WriteServerCertificate(cert *x509.Certificate) error
- func (s *Profile) WriteServerPrivateKey(priv crypto.PrivateKey) error
- type Storage
Constants ¶
View Source
const DefaultProfileName = "default"
The name of storage profile to be used as default if nothing was specified.
View Source
const InlinePrefix = "inline:"
Variables ¶
This section is empty.
Functions ¶
func CheckFileNotExist ¶
func DefaultStoragePath ¶
func KubernetesSecretFromCertAndKey ¶ added in v0.3.0
func KubernetesSecretFromCertAndKey(name, namespace string, cacertPem, certPem, keyPem []byte) []byte
KubernetesSecretFromCertAndKey creates a k8s secret yaml from given cert and key.
func ReadCertificateFile ¶
func ReadCertificateFile(p string) (*x509.Certificate, error)
func ReadFileOrInlineText ¶ added in v0.2.3
func ReadPrivateKeyFile ¶
func ReadPrivateKeyFile(p string) (crypto.PrivateKey, error)
func VerifyProfileName ¶ added in v0.2.2
func WriteCertificateDerFile ¶
func WriteCertificateFile ¶
func WriteCertificateFile(p string, cert *x509.Certificate) error
func WritePrivateKeyFile ¶
func WritePrivateKeyFile(p string, priv crypto.PrivateKey) error
Types ¶
type CAStatus ¶
type CAStatus struct { Profile *Profile Code CAStatusCode CACert *x509.Certificate Err error }
type CAStatusCode ¶
type CAStatusCode int
const ( ValidCA CAStatusCode = iota NotCA Broken Expired MaxCAStatusCode = Expired )
func (CAStatusCode) String ¶ added in v0.2.3
func (c CAStatusCode) String() string
type Profile ¶
type Profile struct {
BaseDir string
}
func (*Profile) CACertPath ¶
func (*Profile) CAPrivateKeyPath ¶
func (*Profile) IssueDBPath ¶
func (*Profile) ReadCACertificate ¶
func (s *Profile) ReadCACertificate() (*x509.Certificate, error)
func (*Profile) ReadCAPrivateKey ¶
func (s *Profile) ReadCAPrivateKey() (crypto.PrivateKey, error)
func (*Profile) ReadServerCertificate ¶
func (s *Profile) ReadServerCertificate() (*x509.Certificate, error)
func (*Profile) ReadServerPrivateKey ¶
func (s *Profile) ReadServerPrivateKey() (crypto.PrivateKey, error)
func (*Profile) WriteCACertificateDer ¶
func (*Profile) WriteCAPrivateKey ¶
func (s *Profile) WriteCAPrivateKey(priv crypto.PrivateKey) error
func (*Profile) WriteServerCertificate ¶
func (s *Profile) WriteServerCertificate(cert *x509.Certificate) error
func (*Profile) WriteServerPrivateKey ¶
func (s *Profile) WriteServerPrivateKey(priv crypto.PrivateKey) error
type Storage ¶
type Storage struct {
BaseDir string
}
func (*Storage) ClientCertPath ¶
func (*Storage) ClientPrivateKeyPath ¶
func (*Storage) ConnectionInfoPath ¶
func (*Storage) GeoIpCachePath ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.