Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOISSUE - Add delete certs feature #46

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

nyagamunene
Copy link
Contributor

@nyagamunene nyagamunene commented Nov 14, 2024

What type of PR is this?

This is a feature because it adds the following functionality: it adds a feature for deleting multiple certs for an entity id.

What does this do?

It adds a feature for deleting multiple certs for an entity id.

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

Yes

Did you document any new/modified features?

No

Notes

Signed-off-by: nyagamunene <[email protected]>
@nyagamunene nyagamunene marked this pull request as ready for review November 14, 2024 11:47
SammyOina
SammyOina previously approved these changes Nov 14, 2024
@@ -32,6 +32,17 @@ func (req viewReq) validate() error {
return nil
}

type deleteReq struct {
entityID string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use certID or just id.

certs.go Outdated
@@ -90,4 +93,7 @@ type Repository interface {

// ListRevokedCerts retrieves revoked lists from database.
ListRevokedCerts(ctx context.Context) ([]Certificate, error)

// RemoveCerts deletes certs from database.
RemoveCerts(ctx context.Context, entityId string) error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use singular RemovCert.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also certID or id.

sdk/sdk.go Outdated
@@ -291,6 +298,12 @@ func (sdk mgSDK) ListCerts(pm PageMetadata) (CertificatePage, errors.SDKError) {
return cp, nil
}

func (sdk mgSDK) DeleteCerts(entityID string) errors.SDKError {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, use singular DeleteCert.

service.go Outdated
@@ -271,6 +271,10 @@ func (s *service) ListCerts(ctx context.Context, pm PageMetadata) (CertificatePa
return certPg, nil
}

func (s *service) RemoveCerts(ctx context.Context, entityId string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, use singular.

@nyagamunene nyagamunene self-assigned this Nov 18, 2024
@dborovcanin dborovcanin merged commit bdaaa5f into absmach:main Nov 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants