-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
Signed-off-by: nyagamunene <[email protected]>
@@ -32,6 +32,17 @@ func (req viewReq) validate() error { | |||
return nil | |||
} | |||
|
|||
type deleteReq struct { | |||
entityID string |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use singular RemovCert
.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, use singular.
Signed-off-by: nyagamunene <[email protected]>
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