Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
6a0f4fb6
Commit
6a0f4fb6
authored
Feb 1, 2022
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Add request deletion to CLI
parent
7856acdc
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!170
Release
,
!147
Implement Delete requests functions for auth store
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmd/root.go
+27
-0
27 additions, 0 deletions
cmd/root.go
with
27 additions
and
0 deletions
cmd/root.go
+
27
−
0
View file @
6a0f4fb6
...
@@ -304,6 +304,18 @@ var rootCmd = &cobra.Command{
...
@@ -304,6 +304,18 @@ var rootCmd = &cobra.Command{
deleteChannel
(
client
,
recipientID
)
deleteChannel
(
client
,
recipientID
)
}
}
if
viper
.
GetBool
(
"delete-receive-requests"
)
{
client
.
DeleteReceiveRequests
()
}
if
viper
.
GetBool
(
"delete-sent-requests"
)
{
client
.
DeleteSentRequests
()
}
if
viper
.
GetBool
(
"delete-all-requests"
)
{
client
.
DeleteAllRequests
()
}
msg
:=
message
.
Send
{
msg
:=
message
.
Send
{
Recipient
:
recipientID
,
Recipient
:
recipientID
,
Payload
:
[]
byte
(
msgBody
),
Payload
:
[]
byte
(
msgBody
),
...
@@ -1030,6 +1042,21 @@ func init() {
...
@@ -1030,6 +1042,21 @@ func init() {
viper
.
BindPFlag
(
"delete-channel"
,
viper
.
BindPFlag
(
"delete-channel"
,
rootCmd
.
PersistentFlags
()
.
Lookup
(
"delete-channel"
))
rootCmd
.
PersistentFlags
()
.
Lookup
(
"delete-channel"
))
rootCmd
.
PersistentFlags
()
.
Bool
(
"delete-receive-requests"
,
false
,
"Delete the all received contact requests."
)
viper
.
BindPFlag
(
"delete-receive-requests"
,
rootCmd
.
PersistentFlags
()
.
Lookup
(
"delete-receive-requests"
))
rootCmd
.
PersistentFlags
()
.
Bool
(
"delete-sent-requests"
,
false
,
"Delete the all sent contact requests."
)
viper
.
BindPFlag
(
"delete-sent-requests"
,
rootCmd
.
PersistentFlags
()
.
Lookup
(
"delete-sent-requests"
))
rootCmd
.
PersistentFlags
()
.
Bool
(
"delete-all-requests"
,
false
,
"Delete the all contact requests, both sent and received."
)
viper
.
BindPFlag
(
"delete-all-requests"
,
rootCmd
.
PersistentFlags
()
.
Lookup
(
"delete-all-requests"
))
rootCmd
.
Flags
()
.
BoolP
(
"send-auth-request"
,
""
,
false
,
rootCmd
.
Flags
()
.
BoolP
(
"send-auth-request"
,
""
,
false
,
"Send an auth request to the specified destination and wait"
+
"Send an auth request to the specified destination and wait"
+
"for confirmation"
)
"for confirmation"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment