Skip to content

Commit

Permalink
Add delete all keys endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender committed Sep 6, 2024
1 parent 71a5aeb commit 22ab425
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pkg/rpc/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,28 @@ func (s *DaemonService) IsRunning(opts *IsRunningOptions) (*IsRunningResponse, *

return r, resp, nil
}

// DaemonDeleteAllKeysOpts options for delete all keys request
type DaemonDeleteAllKeysOpts struct {}

// DaemonDeleteAllKeysResponse response when deleting all keys
type DaemonDeleteAllKeysResponse struct {
Response
}

// DeleteAllKeys deletes all keys from the keychain
func (s *DaemonService) DeleteAllKeys(opts *DaemonDeleteAllKeysOpts) (*DaemonDeleteAllKeysResponse, *http.Response, error) {
request, err := s.NewRequest("delete_all_keys", opts)
if err != nil {
return nil, nil, err
}

r := &DaemonDeleteAllKeysResponse{}

resp, err := s.Do(request, r)
if err != nil {
return nil, resp, err
}

return r, resp, nil
}

0 comments on commit 22ab425

Please sign in to comment.