Documentation ¶
Index ¶
- type BindIdentityToDeviceInput
- type CAService
- type CRLService
- type CreateCAInput
- type CreateCertificateInput
- type CreateDMSInput
- type CreateDeviceInput
- type DMSManagerService
- type DeleteCAInput
- type DeviceManagerService
- type ESTService
- type GetAllInput
- type GetCAByIDInput
- type GetCABySerialNumberInput
- type GetCAsByCommonNameInput
- type GetCAsInput
- type GetCRLInput
- type GetCertificatesByCAInput
- type GetCertificatesByCaAndStatusInput
- type GetCertificatesByExpirationDateInput
- type GetCertificatesBySerialNumberInput
- type GetCertificatesByStatusInput
- type GetCertificatesInput
- type GetDMSByIDInput
- type GetDMSStatsInput
- type GetDeviceByIDInput
- type GetDevicesByDMSInput
- type GetDevicesInput
- type GetDevicesStatsInput
- type GetStatsByCAIDInput
- type ImportCAInput
- type ImportCertificateInput
- type IssueCAInput
- type IssueCAOutput
- type OCSPService
- type ProvisionDeviceSlotInput
- type SignCertificateInput
- type SignInput
- type SignatureSignInput
- type SignatureVerifyInput
- type UpdateCAIssuanceExpirationInput
- type UpdateCAMetadataInput
- type UpdateCAStatusInput
- type UpdateCertificateMetadataInput
- type UpdateCertificateStatusInput
- type UpdateDMSInput
- type UpdateDeviceIdentitySlotInput
- type UpdateDeviceMetadataInput
- type UpdateDeviceStatusInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindIdentityToDeviceInput ¶
type BindIdentityToDeviceInput struct { DeviceID string CertificateSerialNumber string BindMode models.DeviceEventType }
type CAService ¶
type CAService interface { GetStats(ctx context.Context) (*models.CAStats, error) GetStatsByCAID(ctx context.Context, input GetStatsByCAIDInput) (map[models.CertificateStatus]int, error) GetCryptoEngineProvider(ctx context.Context) ([]*models.CryptoEngineProvider, error) CreateCA(ctx context.Context, input CreateCAInput) (*models.CACertificate, error) ImportCA(ctx context.Context, input ImportCAInput) (*models.CACertificate, error) GetCAByID(ctx context.Context, input GetCAByIDInput) (*models.CACertificate, error) GetCAs(ctx context.Context, input GetCAsInput) (string, error) GetCAsByCommonName(ctx context.Context, input GetCAsByCommonNameInput) (string, error) UpdateCAStatus(ctx context.Context, input UpdateCAStatusInput) (*models.CACertificate, error) UpdateCAMetadata(ctx context.Context, input UpdateCAMetadataInput) (*models.CACertificate, error) UpdateCAIssuanceExpiration(ctx context.Context, input UpdateCAIssuanceExpirationInput) (*models.CACertificate, error) DeleteCA(ctx context.Context, input DeleteCAInput) error SignatureSign(ctx context.Context, input SignatureSignInput) ([]byte, error) SignatureVerify(ctx context.Context, input SignatureVerifyInput) (bool, error) SignCertificate(ctx context.Context, input SignCertificateInput) (*models.Certificate, error) CreateCertificate(ctx context.Context, input CreateCertificateInput) (*models.Certificate, error) ImportCertificate(ctx context.Context, input ImportCertificateInput) (*models.Certificate, error) GetCertificateBySerialNumber(ctx context.Context, input GetCertificatesBySerialNumberInput) (*models.Certificate, error) GetCertificates(ctx context.Context, input GetCertificatesInput) (string, error) GetCertificatesByCA(ctx context.Context, input GetCertificatesByCAInput) (string, error) GetCertificatesByExpirationDate(ctx context.Context, input GetCertificatesByExpirationDateInput) (string, error) GetCertificatesByCaAndStatus(ctx context.Context, input GetCertificatesByCaAndStatusInput) (string, error) // GetCertificatesByExpirationDateAndCA(input GetCertificatesByExpirationDateInput) (string, error) GetCertificatesByStatus(ctx context.Context, input GetCertificatesByStatusInput) (string, error) // GetCertificatesByStatusAndCA(input GetCertificatesByExpirationDateInput) (string, error) UpdateCertificateStatus(ctx context.Context, input UpdateCertificateStatusInput) (*models.Certificate, error) UpdateCertificateMetadata(ctx context.Context, input UpdateCertificateMetadataInput) (*models.Certificate, error) }
type CRLService ¶
type CRLService interface {
GetCRL(ctx context.Context, input GetCRLInput) ([]byte, error)
}
type CreateCAInput ¶
type CreateCAInput struct { ID string ParentID string KeyMetadata models.KeyMetadata `validate:"required"` Subject models.Subject `validate:"required"` IssuanceExpiration models.Expiration `validate:"required"` CAExpiration models.Expiration `validate:"required"` EngineID string Metadata map[string]any }
type CreateCertificateInput ¶
type CreateCertificateInput struct { KeyMetadata models.KeyMetadata `validate:"required"` Subject models.Subject `validate:"required"` }
type CreateDMSInput ¶
type CreateDeviceInput ¶
type DMSManagerService ¶
type DMSManagerService interface { ESTService GetDMSStats(ctx context.Context, input GetDMSStatsInput) (*models.DMSStats, error) CreateDMS(ctx context.Context, input CreateDMSInput) (*models.DMS, error) UpdateDMS(ctx context.Context, input UpdateDMSInput) (*models.DMS, error) GetDMSByID(ctx context.Context, input GetDMSByIDInput) (*models.DMS, error) GetAll(ctx context.Context, input GetAllInput) (string, error) BindIdentityToDevice(ctx context.Context, input BindIdentityToDeviceInput) (*models.BindIdentityToDeviceOutput, error) }
type DeleteCAInput ¶
type DeleteCAInput struct {
CAID string `validate:"required"`
}
type DeviceManagerService ¶
type DeviceManagerService interface { GetDevicesStats(ctx context.Context, input GetDevicesStatsInput) (*models.DevicesStats, error) CreateDevice(ctx context.Context, input CreateDeviceInput) (*models.Device, error) GetDeviceByID(ctx context.Context, input GetDeviceByIDInput) (*models.Device, error) GetDevices(ctx context.Context, input GetDevicesInput) (string, error) GetDeviceByDMS(ctx context.Context, input GetDevicesByDMSInput) (string, error) UpdateDeviceStatus(ctx context.Context, input UpdateDeviceStatusInput) (*models.Device, error) UpdateDeviceIdentitySlot(ctx context.Context, input UpdateDeviceIdentitySlotInput) (*models.Device, error) UpdateDeviceMetadata(ctx context.Context, input UpdateDeviceMetadataInput) (*models.Device, error) }
type ESTService ¶
type ESTService interface { // CACerts requests a copy of the current CA certificates. See RFC7030 4.1. CACerts(ctx context.Context, aps string) ([]*x509.Certificate, error) // Enroll requests a new certificate. See RFC7030 4.2. Enroll(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, error) // Reenroll requests renewal/rekey of an existing certificate. See RFC7030 // 4.2. Reenroll(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, error) // ServerKeyGen requests a new certificate and a private key. The key must // be returned as a DER-encoded PKCS8 PrivateKeyInfo structure if additional // encryption is not being employed, or returned inside a CMS SignedData // structure which itself is inside a CMS EnvelopedData structure. See // RFC7030 4.4. ServerKeyGen(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, interface{}, error) }
type GetCAByIDInput ¶
type GetCAByIDInput struct {
CAID string `validate:"required"`
}
type GetCABySerialNumberInput ¶
type GetCABySerialNumberInput struct {
SerialNumber string `validate:"required"`
}
type GetCAsByCommonNameInput ¶
type GetCAsByCommonNameInput struct { CommonName string QueryParameters *resources.QueryParameters ExhaustiveRun bool //wether to iter all elems ApplyFunc func(cert models.CACertificate) }
type GetCAsInput ¶
type GetCAsInput struct { QueryParameters *resources.QueryParameters ExhaustiveRun bool //wether to iter all elems ApplyFunc func(ca models.CACertificate) }
type GetCRLInput ¶
type GetCRLInput struct {
CAID string `validate:"required"`
}
type GetCertificatesByCAInput ¶
type GetCertificatesByCAInput struct { CAID string `validate:"required"` resources.ListInput[models.Certificate] }
type GetCertificatesByCaAndStatusInput ¶
type GetCertificatesByCaAndStatusInput struct { CAID string Status models.CertificateStatus resources.ListInput[models.Certificate] }
type GetCertificatesBySerialNumberInput ¶
type GetCertificatesBySerialNumberInput struct {
SerialNumber string `validate:"required"`
}
type GetCertificatesByStatusInput ¶
type GetCertificatesByStatusInput struct { Status models.CertificateStatus resources.ListInput[models.Certificate] }
type GetCertificatesInput ¶
type GetCertificatesInput struct { resources.ListInput[models.Certificate] }
type GetDMSByIDInput ¶
type GetDMSByIDInput struct {
ID string `validate:"required"`
}
type GetDMSStatsInput ¶
type GetDMSStatsInput struct{}
type GetDeviceByIDInput ¶
type GetDeviceByIDInput struct {
ID string `validate:"required"`
}
type GetDevicesByDMSInput ¶
type GetDevicesStatsInput ¶
type GetDevicesStatsInput struct { }
type GetStatsByCAIDInput ¶
type GetStatsByCAIDInput struct {
CAID string
}
type ImportCAInput ¶
type ImportCAInput struct { ID string CAType models.CertificateType `validate:"required,ne=MANAGED"` IssuanceExpiration models.Expiration `validate:"required"` CACertificate *models.X509Certificate `validate:"required"` CAChain []*models.X509Certificate //Parent CAs. They MUST be sorted as follows. 0: Root-CA; 1: Subordinate CA from Root-CA; ... CARSAKey *rsa.PrivateKey CAECKey *ecdsa.PrivateKey KeyType models.KeyType EngineID string ParentID string }
type ImportCertificateInput ¶
type ImportCertificateInput struct { Certificate *models.X509Certificate Metadata map[string]any }
type IssueCAInput ¶
type IssueCAInput struct { ParentCA *models.CACertificate KeyMetadata models.KeyMetadata `validate:"required"` Subject models.Subject `validate:"required"` CAType models.CertificateType `validate:"required"` CAExpiration models.Expiration EngineID string CAID string `validate:"required"` }
type IssueCAOutput ¶
type IssueCAOutput struct {
Certificate *x509.Certificate
}
type OCSPService ¶
type SignCertificateInput ¶
type SignInput ¶
type SignInput struct { CAID string Message []byte MessageType models.SignMessageType SignatureAlgorithm string }
type SignatureSignInput ¶
type SignatureSignInput struct { CAID string `validate:"required"` Message []byte `validate:"required"` MessageType models.SignMessageType `validate:"required"` SigningAlgorithm string `validate:"required"` }
type SignatureVerifyInput ¶
type UpdateCAIssuanceExpirationInput ¶
type UpdateCAIssuanceExpirationInput struct { CAID string `validate:"required"` IssuanceExpiration models.Expiration `validate:"required"` }
type UpdateCAMetadataInput ¶
type UpdateCAStatusInput ¶
type UpdateCAStatusInput struct { CAID string `validate:"required"` Status models.CertificateStatus `validate:"required"` RevocationReason models.RevocationReason }
type UpdateCertificateStatusInput ¶
type UpdateCertificateStatusInput struct { SerialNumber string `validate:"required"` NewStatus models.CertificateStatus `validate:"required"` RevocationReason models.RevocationReason }
type UpdateDMSInput ¶
type UpdateDeviceStatusInput ¶
type UpdateDeviceStatusInput struct { ID string `validate:"required"` NewStatus models.DeviceStatus `validate:"required"` }
Click to show internal directories.
Click to hide internal directories.