Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

NOISSUE - Add delete certs feature#46

Merged
dborovcanin merged 2 commits into
absmach:mainfrom
nyagamunene:Add-Remove-Certs
Nov 18, 2024
Merged

NOISSUE - Add delete certs feature#46
dborovcanin merged 2 commits into
absmach:mainfrom
nyagamunene:Add-Remove-Certs

Conversation

@nyagamunene

@nyagamunene nyagamunene commented Nov 14, 2024

Copy link
Copy Markdown
Contributor

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 <stevenyaga2014@gmail.com>
@nyagamunene nyagamunene marked this pull request as ready for review November 14, 2024 11:47
SammyOina
SammyOina previously approved these changes Nov 14, 2024
Comment thread api/http/requests.go
}

type deleteReq struct {
entityID string

Copy link
Copy Markdown
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.

Comment thread certs.go Outdated
ListRevokedCerts(ctx context.Context) ([]Certificate, error)

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

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread sdk/sdk.go Outdated
return cp, nil
}

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

Copy link
Copy Markdown
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.

Comment thread service.go Outdated
return certPg, nil
}

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

Copy link
Copy Markdown
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
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
@dborovcanin dborovcanin merged commit bdaaa5f into absmach:main Nov 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants