Documentation ¶
Index ¶
- func NewCASigner(ctx context.Context, ca *models.CACertificate, caSDK CAService) crypto.Signer
- type AlertsService
- type AlertsServiceBackend
- func (svc *AlertsServiceBackend) GetLatestEventsPerEventType(ctx context.Context, input *GetLatestEventsPerEventTypeInput) ([]*models.AlertLatestEvent, error)
- func (svc *AlertsServiceBackend) GetUserSubscriptions(ctx context.Context, input *GetUserSubscriptionsInput) ([]*models.Subscription, error)
- func (svc *AlertsServiceBackend) HandleEvent(ctx context.Context, input *HandleEventInput) error
- func (svc *AlertsServiceBackend) Subscribe(ctx context.Context, input *SubscribeInput) ([]*models.Subscription, error)
- func (svc *AlertsServiceBackend) Unsubscribe(ctx context.Context, input *UnsubscribeInput) ([]*models.Subscription, error)
- type AlertsServiceBuilder
- type BindIdentityToDeviceInput
- type CAMiddleware
- type CAService
- type CAServiceBackend
- func (svc *CAServiceBackend) CheckCAsAndCertificates()
- func (svc *CAServiceBackend) Close()
- func (svc *CAServiceBackend) CreateCA(ctx context.Context, input CreateCAInput) (*models.CACertificate, error)
- func (svc *CAServiceBackend) CreateCertificate(ctx context.Context, input CreateCertificateInput) (*models.Certificate, error)
- func (svc *CAServiceBackend) DeleteCA(ctx context.Context, input DeleteCAInput) error
- func (svc *CAServiceBackend) GetCAByID(ctx context.Context, input GetCAByIDInput) (*models.CACertificate, error)
- func (svc *CAServiceBackend) GetCABySerialNumber(ctx context.Context, input GetCABySerialNumberInput) (*models.CACertificate, error)
- func (svc *CAServiceBackend) GetCAs(ctx context.Context, input GetCAsInput) (string, error)
- func (svc *CAServiceBackend) GetCAsByCommonName(ctx context.Context, input GetCAsByCommonNameInput) (string, error)
- func (svc *CAServiceBackend) GetCertificateBySerialNumber(ctx context.Context, input GetCertificatesBySerialNumberInput) (*models.Certificate, error)
- func (svc *CAServiceBackend) GetCertificates(ctx context.Context, input GetCertificatesInput) (string, error)
- func (svc *CAServiceBackend) GetCertificatesByCA(ctx context.Context, input GetCertificatesByCAInput) (string, error)
- func (svc *CAServiceBackend) GetCertificatesByCaAndStatus(ctx context.Context, input GetCertificatesByCaAndStatusInput) (string, error)
- func (svc *CAServiceBackend) GetCertificatesByExpirationDate(ctx context.Context, input GetCertificatesByExpirationDateInput) (string, error)
- func (svc *CAServiceBackend) GetCertificatesByStatus(ctx context.Context, input GetCertificatesByStatusInput) (string, error)
- func (svc *CAServiceBackend) GetCryptoEngineProvider(ctx context.Context) ([]*models.CryptoEngineProvider, error)
- func (svc *CAServiceBackend) GetStats(ctx context.Context) (*models.CAStats, error)
- func (svc *CAServiceBackend) GetStatsByCAID(ctx context.Context, input GetStatsByCAIDInput) (map[models.CertificateStatus]int, error)
- func (svc *CAServiceBackend) ImportCA(ctx context.Context, input ImportCAInput) (*models.CACertificate, error)
- func (svc *CAServiceBackend) ImportCertificate(ctx context.Context, input ImportCertificateInput) (*models.Certificate, error)
- func (svc *CAServiceBackend) SetService(service CAService)
- func (svc *CAServiceBackend) SignCertificate(ctx context.Context, input SignCertificateInput) (*models.Certificate, error)
- func (svc *CAServiceBackend) SignatureSign(ctx context.Context, input SignatureSignInput) ([]byte, error)
- func (svc *CAServiceBackend) SignatureVerify(ctx context.Context, input SignatureVerifyInput) (bool, error)
- func (svc *CAServiceBackend) UpdateCAMetadata(ctx context.Context, input UpdateCAMetadataInput) (*models.CACertificate, error)
- func (svc *CAServiceBackend) UpdateCAStatus(ctx context.Context, input UpdateCAStatusInput) (*models.CACertificate, error)
- func (svc *CAServiceBackend) UpdateCertificateMetadata(ctx context.Context, input UpdateCertificateMetadataInput) (*models.Certificate, error)
- func (svc *CAServiceBackend) UpdateCertificateStatus(ctx context.Context, input UpdateCertificateStatusInput) (*models.Certificate, error)
- type CAServiceBuilder
- type CRLService
- type CRLServiceBuilder
- type CreateCAInput
- type CreateCertificateInput
- type CreateDMSInput
- type CreateDeviceInput
- type DMSManagerBuilder
- type DMSManagerMiddleware
- type DMSManagerService
- type DMSManagerServiceBackend
- func (svc DMSManagerServiceBackend) BindIdentityToDevice(ctx context.Context, input BindIdentityToDeviceInput) (*models.BindIdentityToDeviceOutput, error)
- func (svc DMSManagerServiceBackend) CACerts(ctx context.Context, aps string) ([]*x509.Certificate, error)
- func (svc DMSManagerServiceBackend) CreateDMS(ctx context.Context, input CreateDMSInput) (*models.DMS, error)
- func (svc DMSManagerServiceBackend) Enroll(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, error)
- func (svc DMSManagerServiceBackend) GetAll(ctx context.Context, input GetAllInput) (string, error)
- func (svc DMSManagerServiceBackend) GetDMSByID(ctx context.Context, input GetDMSByIDInput) (*models.DMS, error)
- func (svc DMSManagerServiceBackend) GetDMSStats(ctx context.Context, input GetDMSStatsInput) (*models.DMSStats, error)
- func (svc DMSManagerServiceBackend) Reenroll(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, error)
- func (svc DMSManagerServiceBackend) ServerKeyGen(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, interface{}, error)
- func (svc *DMSManagerServiceBackend) SetService(service DMSManagerService)
- func (svc DMSManagerServiceBackend) UpdateDMS(ctx context.Context, input UpdateDMSInput) (*models.DMS, error)
- type DeleteCAInput
- type DeviceManagerBuilder
- type DeviceManagerService
- type DeviceManagerServiceBackend
- func (svc DeviceManagerServiceBackend) CreateDevice(ctx context.Context, input CreateDeviceInput) (*models.Device, error)
- func (svc DeviceManagerServiceBackend) GetDeviceByDMS(ctx context.Context, input GetDevicesByDMSInput) (string, error)
- func (svc DeviceManagerServiceBackend) GetDeviceByID(ctx context.Context, input GetDeviceByIDInput) (*models.Device, error)
- func (svc DeviceManagerServiceBackend) GetDevices(ctx context.Context, input GetDevicesInput) (string, error)
- func (svc *DeviceManagerServiceBackend) GetDevicesStats(ctx context.Context, input GetDevicesStatsInput) (*models.DevicesStats, error)
- func (svc *DeviceManagerServiceBackend) SetService(service DeviceManagerService)
- func (svc DeviceManagerServiceBackend) UpdateDeviceIdentitySlot(ctx context.Context, input UpdateDeviceIdentitySlotInput) (*models.Device, error)
- func (svc DeviceManagerServiceBackend) UpdateDeviceMetadata(ctx context.Context, input UpdateDeviceMetadataInput) (*models.Device, error)
- func (svc DeviceManagerServiceBackend) UpdateDeviceStatus(ctx context.Context, input UpdateDeviceStatusInput) (*models.Device, error)
- type DeviceMiddleware
- type ESTService
- type Engine
- 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 GetLatestEventsPerEventTypeInput
- type GetStatsByCAIDInput
- type GetUserSubscriptionsInput
- type HandleEventInput
- type ImportCAInput
- type ImportCertificateInput
- type OCSPService
- type OCSPServiceBuilder
- type ProvisionDeviceSlotInput
- type SignCertificateInput
- type SignInput
- type SignatureSignInput
- type SignatureVerifyInput
- type SubscribeInput
- type UnsubscribeInput
- 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 ¶
func NewCASigner ¶
Types ¶
type AlertsService ¶
type AlertsService interface { HandleEvent(ctx context.Context, input *HandleEventInput) error GetUserSubscriptions(ctx context.Context, input *GetUserSubscriptionsInput) ([]*models.Subscription, error) Subscribe(ctx context.Context, input *SubscribeInput) ([]*models.Subscription, error) Unsubscribe(ctx context.Context, input *UnsubscribeInput) ([]*models.Subscription, error) GetLatestEventsPerEventType(ctx context.Context, input *GetLatestEventsPerEventTypeInput) ([]*models.AlertLatestEvent, error) }
func NewAlertsService ¶
func NewAlertsService(builder AlertsServiceBuilder) AlertsService
type AlertsServiceBackend ¶
type AlertsServiceBackend struct {
// contains filtered or unexported fields
}
func (*AlertsServiceBackend) GetLatestEventsPerEventType ¶
func (svc *AlertsServiceBackend) GetLatestEventsPerEventType(ctx context.Context, input *GetLatestEventsPerEventTypeInput) ([]*models.AlertLatestEvent, error)
func (*AlertsServiceBackend) GetUserSubscriptions ¶
func (svc *AlertsServiceBackend) GetUserSubscriptions(ctx context.Context, input *GetUserSubscriptionsInput) ([]*models.Subscription, error)
func (*AlertsServiceBackend) HandleEvent ¶
func (svc *AlertsServiceBackend) HandleEvent(ctx context.Context, input *HandleEventInput) error
func (*AlertsServiceBackend) Subscribe ¶
func (svc *AlertsServiceBackend) Subscribe(ctx context.Context, input *SubscribeInput) ([]*models.Subscription, error)
func (*AlertsServiceBackend) Unsubscribe ¶
func (svc *AlertsServiceBackend) Unsubscribe(ctx context.Context, input *UnsubscribeInput) ([]*models.Subscription, error)
type AlertsServiceBuilder ¶
type AlertsServiceBuilder struct { SubsStorage storage.SubscriptionsRepository EventStorage storage.EventRepository SmtpServerConfig config.SMTPServer Logger *logrus.Entry }
type BindIdentityToDeviceInput ¶
type BindIdentityToDeviceInput struct { DeviceID string CertificateSerialNumber string BindMode models.DeviceEventType }
type CAMiddleware ¶
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) 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) }
func NewCAService ¶
func NewCAService(builder CAServiceBuilder) (CAService, error)
type CAServiceBackend ¶ added in v2.5.1
type CAServiceBackend struct {
// contains filtered or unexported fields
}
func (*CAServiceBackend) CheckCAsAndCertificates ¶ added in v2.5.1
func (svc *CAServiceBackend) CheckCAsAndCertificates()
func (*CAServiceBackend) Close ¶ added in v2.5.1
func (svc *CAServiceBackend) Close()
func (*CAServiceBackend) CreateCA ¶ added in v2.5.1
func (svc *CAServiceBackend) CreateCA(ctx context.Context, input CreateCAInput) (*models.CACertificate, error)
Returned Error Codes:
- ErrCAIncompatibleExpirationTimeRef The Expiration time ref is incompatible with the selected variable, i.e. if the time ref is Duration the variable must be of type Duration not of type Time.
- ErrCAIssuanceExpiration When creating a CA, the Issuance Expiration is greater than the CA Expiration.
- ErrCAType When creating the CA, the CA Type must have the value of MANAGED.
- ErrValidateBadRequest The required variables of the data structure are not valid.
func (*CAServiceBackend) CreateCertificate ¶ added in v2.5.1
func (svc *CAServiceBackend) CreateCertificate(ctx context.Context, input CreateCertificateInput) (*models.Certificate, error)
func (*CAServiceBackend) DeleteCA ¶ added in v2.5.1
func (svc *CAServiceBackend) DeleteCA(ctx context.Context, input DeleteCAInput) error
Returned Error Codes:
- ErrCANotFound The specified CA can not be found in the Database
- ErrValidateBadRequest The required variables of the data structure are not valid.
- ErrCAStatus Cannot delete a CA that is not expired or revoked.
func (*CAServiceBackend) GetCAByID ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCAByID(ctx context.Context, input GetCAByIDInput) (*models.CACertificate, error)
Returned Error Codes:
- ErrCANotFound The specified CA can not be found in the Database
- ErrValidateBadRequest The required variables of the data structure are not valid.
func (*CAServiceBackend) GetCABySerialNumber ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCABySerialNumber(ctx context.Context, input GetCABySerialNumberInput) (*models.CACertificate, error)
func (*CAServiceBackend) GetCAs ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCAs(ctx context.Context, input GetCAsInput) (string, error)
func (*CAServiceBackend) GetCAsByCommonName ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCAsByCommonName(ctx context.Context, input GetCAsByCommonNameInput) (string, error)
func (*CAServiceBackend) GetCertificateBySerialNumber ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCertificateBySerialNumber(ctx context.Context, input GetCertificatesBySerialNumberInput) (*models.Certificate, error)
Returned Error Codes:
- ErrCertificateNotFound The specified Certificate can not be found in the Database
- ErrValidateBadRequest The required variables of the data structure are not valid.
func (*CAServiceBackend) GetCertificates ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCertificates(ctx context.Context, input GetCertificatesInput) (string, error)
func (*CAServiceBackend) GetCertificatesByCA ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCertificatesByCA(ctx context.Context, input GetCertificatesByCAInput) (string, error)
Returned Error Codes:
- ErrCANotFound The specified CA can not be found in the Database
- ErrValidateBadRequest The required variables of the data structure are not valid.
func (*CAServiceBackend) GetCertificatesByCaAndStatus ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCertificatesByCaAndStatus(ctx context.Context, input GetCertificatesByCaAndStatusInput) (string, error)
func (*CAServiceBackend) GetCertificatesByExpirationDate ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCertificatesByExpirationDate(ctx context.Context, input GetCertificatesByExpirationDateInput) (string, error)
func (*CAServiceBackend) GetCertificatesByStatus ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCertificatesByStatus(ctx context.Context, input GetCertificatesByStatusInput) (string, error)
func (*CAServiceBackend) GetCryptoEngineProvider ¶ added in v2.5.1
func (svc *CAServiceBackend) GetCryptoEngineProvider(ctx context.Context) ([]*models.CryptoEngineProvider, error)
func (*CAServiceBackend) GetStatsByCAID ¶ added in v2.5.1
func (svc *CAServiceBackend) GetStatsByCAID(ctx context.Context, input GetStatsByCAIDInput) (map[models.CertificateStatus]int, error)
func (*CAServiceBackend) ImportCA ¶ added in v2.5.1
func (svc *CAServiceBackend) ImportCA(ctx context.Context, input ImportCAInput) (*models.CACertificate, error)
Returned Error Codes:
- ErrCAIncompatibleExpirationTimeRef The Expiration time ref is incompatible with the selected variable, i.e. if the time ref is Duration the variable must be of type Duration not of type Time.
- ErrCAIssuanceExpiration When creating a CA, the Issuance Expiration is greater than the CA Expiration.
- ErrCAType The CA Type cannot have the value of MANAGED.
- ErrCAValidCertAndPrivKey The CA certificate and the private key provided are not compatible.
- ErrValidateBadRequest The required variables of the data structure are not valid.
func (*CAServiceBackend) ImportCertificate ¶ added in v2.5.1
func (svc *CAServiceBackend) ImportCertificate(ctx context.Context, input ImportCertificateInput) (*models.Certificate, error)
func (*CAServiceBackend) SetService ¶ added in v2.5.1
func (svc *CAServiceBackend) SetService(service CAService)
func (*CAServiceBackend) SignCertificate ¶ added in v2.5.1
func (svc *CAServiceBackend) SignCertificate(ctx context.Context, input SignCertificateInput) (*models.Certificate, error)
Returned Error Codes:
- ErrCANotFound The specified CA can not be found in the Database
- ErrValidateBadRequest The required variables of the data structure are not valid.
- ErrCAStatus CA is not active
func (*CAServiceBackend) SignatureSign ¶ added in v2.5.1
func (svc *CAServiceBackend) SignatureSign(ctx context.Context, input SignatureSignInput) ([]byte, error)
func (*CAServiceBackend) SignatureVerify ¶ added in v2.5.1
func (svc *CAServiceBackend) SignatureVerify(ctx context.Context, input SignatureVerifyInput) (bool, error)
func (*CAServiceBackend) UpdateCAMetadata ¶ added in v2.5.1
func (svc *CAServiceBackend) UpdateCAMetadata(ctx context.Context, input UpdateCAMetadataInput) (*models.CACertificate, error)
Returned Error Codes:
- ErrCANotFound The specified CA can not be found in the Database
- ErrValidateBadRequest The required variables of the data structure are not valid.
func (*CAServiceBackend) UpdateCAStatus ¶ added in v2.5.1
func (svc *CAServiceBackend) UpdateCAStatus(ctx context.Context, input UpdateCAStatusInput) (*models.CACertificate, error)
Returned Error Codes:
- ErrCANotFound The specified CA can not be found in the Database
- ErrValidateBadRequest The required variables of the data structure are not valid.
- ErrCAAlreadyRevoked CA already revoked
func (*CAServiceBackend) UpdateCertificateMetadata ¶ added in v2.5.1
func (svc *CAServiceBackend) UpdateCertificateMetadata(ctx context.Context, input UpdateCertificateMetadataInput) (*models.Certificate, error)
Returned Error Codes:
- ErrCertificateNotFound The specified Certificate can not be found in the Database
- ErrValidateBadRequest The required variables of the data structure are not valid.
func (*CAServiceBackend) UpdateCertificateStatus ¶ added in v2.5.1
func (svc *CAServiceBackend) UpdateCertificateStatus(ctx context.Context, input UpdateCertificateStatusInput) (*models.Certificate, error)
Returned Error Codes:
- ErrCertificateNotFound The specified Certificate can not be found in the Database
- ErrCertificateStatusTransitionNotAllowed The specified status is not valid for this certficate due to its initial status
- ErrValidateBadRequest The required variables of the data structure are not valid.
type CAServiceBuilder ¶
type CAServiceBuilder struct { Logger *logrus.Entry CryptoEngines map[string]*Engine CAStorage storage.CACertificatesRepo CertificateStorage storage.CertificatesRepo CryptoMonitoringConf config.CryptoMonitoring VAServerDomain string }
type CRLService ¶
type CRLService interface {
GetCRL(ctx context.Context, input GetCRLInput) ([]byte, error)
}
func NewCRLService ¶
func NewCRLService(builder CRLServiceBuilder) CRLService
type CRLServiceBuilder ¶
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 DMSManagerBuilder ¶
type DMSManagerBuilder struct { Logger *logrus.Entry DevManagerCli DeviceManagerService CAClient CAService DMSStorage storage.DMSRepo DownstreamCertificate *x509.Certificate }
type DMSManagerMiddleware ¶
type DMSManagerMiddleware func(DMSManagerService) DMSManagerService
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) }
func NewDMSManagerService ¶
func NewDMSManagerService(builder DMSManagerBuilder) DMSManagerService
type DMSManagerServiceBackend ¶ added in v2.5.1
type DMSManagerServiceBackend struct {
// contains filtered or unexported fields
}
func (DMSManagerServiceBackend) BindIdentityToDevice ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) BindIdentityToDevice(ctx context.Context, input BindIdentityToDeviceInput) (*models.BindIdentityToDeviceOutput, error)
func (DMSManagerServiceBackend) CACerts ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) CACerts(ctx context.Context, aps string) ([]*x509.Certificate, error)
func (DMSManagerServiceBackend) CreateDMS ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) CreateDMS(ctx context.Context, input CreateDMSInput) (*models.DMS, error)
func (DMSManagerServiceBackend) Enroll ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) Enroll(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, error)
Validation:
- Cert: Only Bootstrap cert (CA issued By Lamassu)
func (DMSManagerServiceBackend) GetAll ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) GetAll(ctx context.Context, input GetAllInput) (string, error)
func (DMSManagerServiceBackend) GetDMSByID ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) GetDMSByID(ctx context.Context, input GetDMSByIDInput) (*models.DMS, error)
func (DMSManagerServiceBackend) GetDMSStats ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) GetDMSStats(ctx context.Context, input GetDMSStatsInput) (*models.DMSStats, error)
func (DMSManagerServiceBackend) Reenroll ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) Reenroll(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, error)
func (DMSManagerServiceBackend) ServerKeyGen ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) ServerKeyGen(ctx context.Context, csr *x509.CertificateRequest, aps string) (*x509.Certificate, interface{}, error)
func (*DMSManagerServiceBackend) SetService ¶ added in v2.5.1
func (svc *DMSManagerServiceBackend) SetService(service DMSManagerService)
func (DMSManagerServiceBackend) UpdateDMS ¶ added in v2.5.1
func (svc DMSManagerServiceBackend) UpdateDMS(ctx context.Context, input UpdateDMSInput) (*models.DMS, error)
type DeleteCAInput ¶
type DeleteCAInput struct {
CAID string `validate:"required"`
}
type DeviceManagerBuilder ¶
type DeviceManagerBuilder struct { Logger *logrus.Entry CAClient CAService DevicesStorage storage.DeviceManagerRepo }
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) }
func NewDeviceManagerService ¶
func NewDeviceManagerService(builder DeviceManagerBuilder) DeviceManagerService
type DeviceManagerServiceBackend ¶ added in v2.5.1
type DeviceManagerServiceBackend struct {
// contains filtered or unexported fields
}
func (DeviceManagerServiceBackend) CreateDevice ¶ added in v2.5.1
func (svc DeviceManagerServiceBackend) CreateDevice(ctx context.Context, input CreateDeviceInput) (*models.Device, error)
func (DeviceManagerServiceBackend) GetDeviceByDMS ¶ added in v2.5.1
func (svc DeviceManagerServiceBackend) GetDeviceByDMS(ctx context.Context, input GetDevicesByDMSInput) (string, error)
func (DeviceManagerServiceBackend) GetDeviceByID ¶ added in v2.5.1
func (svc DeviceManagerServiceBackend) GetDeviceByID(ctx context.Context, input GetDeviceByIDInput) (*models.Device, error)
func (DeviceManagerServiceBackend) GetDevices ¶ added in v2.5.1
func (svc DeviceManagerServiceBackend) GetDevices(ctx context.Context, input GetDevicesInput) (string, error)
func (*DeviceManagerServiceBackend) GetDevicesStats ¶ added in v2.5.1
func (svc *DeviceManagerServiceBackend) GetDevicesStats(ctx context.Context, input GetDevicesStatsInput) (*models.DevicesStats, error)
func (*DeviceManagerServiceBackend) SetService ¶ added in v2.5.1
func (svc *DeviceManagerServiceBackend) SetService(service DeviceManagerService)
func (DeviceManagerServiceBackend) UpdateDeviceIdentitySlot ¶ added in v2.5.1
func (svc DeviceManagerServiceBackend) UpdateDeviceIdentitySlot(ctx context.Context, input UpdateDeviceIdentitySlotInput) (*models.Device, error)
func (DeviceManagerServiceBackend) UpdateDeviceMetadata ¶ added in v2.5.1
func (svc DeviceManagerServiceBackend) UpdateDeviceMetadata(ctx context.Context, input UpdateDeviceMetadataInput) (*models.Device, error)
func (DeviceManagerServiceBackend) UpdateDeviceStatus ¶ added in v2.5.1
func (svc DeviceManagerServiceBackend) UpdateDeviceStatus(ctx context.Context, input UpdateDeviceStatusInput) (*models.Device, error)
type DeviceMiddleware ¶
type DeviceMiddleware func(DeviceManagerService) DeviceManagerService
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 Engine ¶
type Engine struct { Default bool Service cryptoengines.CryptoEngine }
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 GetLatestEventsPerEventTypeInput ¶
type GetLatestEventsPerEventTypeInput struct{}
type GetStatsByCAIDInput ¶
type GetStatsByCAIDInput struct {
CAID string
}
type GetUserSubscriptionsInput ¶
type GetUserSubscriptionsInput struct {
UserID string
}
type HandleEventInput ¶
type HandleEventInput struct {
Event cloudevents.Event
}
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 { ImportMode models.CertificateType Certificate *models.X509Certificate Metadata map[string]any }
type OCSPService ¶
func NewOCSPService ¶
func NewOCSPService(builder OCSPServiceBuilder) OCSPService
type OCSPServiceBuilder ¶
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 SubscribeInput ¶
type UnsubscribeInput ¶
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"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.