Documentation ¶
Index ¶
- func ComputeBytesHash(data []byte) []byte
- func ComputePublicKeyTypeSpecificHashFromPrivateKey(privateKey crypto.PrivateKey) ([]byte, error)
- func ComputeSubjectOrIssuerHash(name pkix.Name) []byte
- func ParsePrivateKey(der []byte) (key crypto.PrivateKey, keyType string, err error)
- type CreatePrivateKeyRequest
- type CreateX509CertificateSubscriptionDto
- type DefaultX509PrivateKeyService
- type X509CertificateDto
- type X509CertificateService
- type X509CertificateSubscriptionDto
- type X509CertificateSubscriptionService
- func (x *X509CertificateSubscriptionService) Create(ctx context.Context, request *CreateX509CertificateSubscriptionDto) (*X509CertificateSubscriptionDto, error)
- func (x *X509CertificateSubscriptionService) Delete(ctx context.Context, subID uuid.UUID) (rowsDeleted int64, err error)
- func (x *X509CertificateSubscriptionService) Exists(ctx context.Context, IDs []uuid.UUID) (notExistingIDs []uuid.UUID, err error)
- func (x *X509CertificateSubscriptionService) FindByIDs(ctx context.Context, IDs []uuid.UUID) ([]*X509CertificateSubscriptionDto, error)
- type X509ImportService
- type X509PrivateKeyDto
- type X509PrivateKeyService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeBytesHash ¶
func ComputePublicKeyTypeSpecificHashFromPrivateKey ¶
func ComputePublicKeyTypeSpecificHashFromPrivateKey(privateKey crypto.PrivateKey) ([]byte, error)
func ParsePrivateKey ¶
func ParsePrivateKey(der []byte) (key crypto.PrivateKey, keyType string, err error)
Types ¶
type CreatePrivateKeyRequest ¶
type CreateX509CertificateSubscriptionDto ¶
type CreateX509CertificateSubscriptionDto struct { SubjectAltNames []string IncludePrivateKey bool }
func NewCreateX509CertificateSubscriptionDto ¶
func NewCreateX509CertificateSubscriptionDto(subjectAltNames []string, includePrivateKey bool) *CreateX509CertificateSubscriptionDto
type DefaultX509PrivateKeyService ¶
type DefaultX509PrivateKeyService struct {
// contains filtered or unexported fields
}
func NewDefaultX509PrivateKeyService ¶
func NewDefaultX509PrivateKeyService(certRepo repository.PrivateKeyRepository, clock clockwork.Clock) *DefaultX509PrivateKeyService
func (*DefaultX509PrivateKeyService) FindByIDs ¶
func (x *DefaultX509PrivateKeyService) FindByIDs(ctx context.Context, ids []uuid.UUID) ([]*X509PrivateKeyDto, error)
func (*DefaultX509PrivateKeyService) GetOrCreate ¶
func (x *DefaultX509PrivateKeyService) GetOrCreate(ctx context.Context, request *CreatePrivateKeyRequest) (*X509PrivateKeyDto, error)
type X509CertificateDto ¶
type X509CertificateDto struct { ID uuid.UUID `binding:"required" validate:"required" json:"id" toml:"id" yaml:"id"` CommonName string `binding:"required" validate:"required" json:"common_name" toml:"common_name" yaml:"common_name"` SubjectAltNames []string `binding:"required" validate:"required" json:"sans" toml:"sans" yaml:"sans"` CertificatePem string `binding:"required" validate:"required" json:"certificate" toml:"certificate" yaml:"certificate"` ParentCertificateID *uuid.UUID `json:"parent_certificate_id,omitempty" toml:"parent_certificate_id" yaml:"parent_certificate_id,omitempty"` PrivateKeyID *uuid.UUID `json:"private_key_id,omitempty" toml:"private_key_id" yaml:"private_key_id,omitempty"` NotBefore time.Time `binding:"required" validate:"required" json:"not_before" toml:"not_before" yaml:"not_before"` NotAfter time.Time `binding:"required" validate:"required" json:"not_after" toml:"not_after" yaml:"not_after"` CreatedAt time.Time `binding:"required" validate:"required" json:"created_at" toml:"created_at" yaml:"created_at"` }
type X509CertificateService ¶
type X509CertificateService struct {
// contains filtered or unexported fields
}
func NewX509CertificateService ¶
func NewX509CertificateService( certRepo repository.X509CertificateRepository, subService *X509CertificateSubscriptionService, privKeyService *DefaultX509PrivateKeyService, ) *X509CertificateService
func (*X509CertificateService) GetUpdates ¶
func (x *X509CertificateService) GetUpdates( ctx context.Context, subIDs []uuid.UUID, after time.Time, includeCertChainIfExists bool, ) ([]*X509CertificateDto, []*X509PrivateKeyDto, error)
GetUpdates returns the latest active certificate for each subscription. Also includes the private key for a certificate if it exists and is configured in the subscription.
type X509CertificateSubscriptionDto ¶
type X509CertificateSubscriptionDto struct { ID uuid.UUID `binding:"required" validate:"required" json:"id" toml:"id" yaml:"id"` SANs []string `binding:"required" validate:"required" json:"sans" toml:"sans" yaml:"sans"` IncludePrivateKey bool `binding:"required" validate:"required" json:"include_private_key" toml:"include_private_key" yaml:"include_private_key"` CreatedAt time.Time `binding:"required" validate:"required" json:"created_at" toml:"created_at" yaml:"created_at"` }
type X509CertificateSubscriptionService ¶
type X509CertificateSubscriptionService struct {
// contains filtered or unexported fields
}
func NewX509CertificateSubscriptionService ¶
func NewX509CertificateSubscriptionService( repository repository.X509CertificateSubscriptionRepository, clock clockwork.Clock, ) *X509CertificateSubscriptionService
func (*X509CertificateSubscriptionService) Create ¶
func (x *X509CertificateSubscriptionService) Create( ctx context.Context, request *CreateX509CertificateSubscriptionDto, ) (*X509CertificateSubscriptionDto, error)
func (*X509CertificateSubscriptionService) FindByIDs ¶
func (x *X509CertificateSubscriptionService) FindByIDs( ctx context.Context, IDs []uuid.UUID, ) ([]*X509CertificateSubscriptionDto, error)
type X509ImportService ¶
type X509ImportService struct { repository.Bundle // contains filtered or unexported fields }
func NewX509ImportService ¶
func NewX509ImportService(bundle repository.Bundle, clock clockwork.Clock) *X509ImportService
func (*X509ImportService) Import ¶
func (x *X509ImportService) Import( ctx context.Context, certPems []*pem.Block, privKeyPems []*pem.Block, ) ([]*X509CertificateDto, []*X509PrivateKeyDto, error)
type X509PrivateKeyDto ¶
type X509PrivateKeyDto struct { ID uuid.UUID `binding:"required" validate:"required" json:"id" toml:"id" yaml:"id"` PemPrivateKey string `binding:"required" validate:"required" json:"private_key" toml:"private_key" yaml:"private_key"` CreatedAt time.Time `binding:"required" validate:"required" json:"created_at" toml:"created_at" yaml:"created_at"` }
func NewX509PrivateKeyDto ¶
type X509PrivateKeyService ¶
type X509PrivateKeyService interface { GetOrCreate(ctx context.Context, request *CreatePrivateKeyRequest) (*X509PrivateKeyDto, error) FindByIDs(ctx context.Context, ids []uuid.UUID) ([]*X509PrivateKeyDto, error) }
Click to show internal directories.
Click to hide internal directories.