Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
Update Docs and Add Examples For Some Commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe committed Apr 17, 2020
1 parent 8b7af32 commit 7a543ab
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 15 deletions.
5 changes: 3 additions & 2 deletions cmd/byEmail.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
// byEmailCmd represents the byEmail command
var byEmailCmd = &cobra.Command{
Use: "byEmail",
Aliases: []string{"email"},
Short: "find a user by email address",
Aliases: []string{"email", "by-email"},
Short: "Find a Firebase Auth user by email address",
Example: `kamanda auth find by-email [email protected]`,
Run: func(cmd *cobra.Command, args []string) {
// args = list of UIDs
if len(args) == 0 {
Expand Down
5 changes: 3 additions & 2 deletions cmd/byPhone.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
// byPhoneCmd represents the byPhone command
var byPhoneCmd = &cobra.Command{
Use: "byPhone",
Aliases: []string{"phone"},
Short: "find a user by phone number",
Aliases: []string{"phone", "by-phone"},
Short: "find a Firebase Auth User by their phone number",
Example: `kamanda auth find by-phone +254712345678`,
Run: func(cmd *cobra.Command, args []string) {
// args = list of phone numbers
if len(args) == 0 {
Expand Down
5 changes: 4 additions & 1 deletion cmd/findUser.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import (
var findUserCmd = &cobra.Command{
Use: "find",
Aliases: []string{"findUser"},
Short: "Find a user by uid. To find user by email or by phone use `find byEmail` or `find byPhone`",
Short: "Find a a Firebase Auth user by their Firebase UID.",
Long: `Find a a Firebase Auth user by their Firebase UID.
To find user by email or by phone use "find by-email" or "find by-phone"`,
Example: `kamanda auth find [UID1] [UID2]`,
Run: func(cmd *cobra.Command, args []string) {
// args = list of uids
if len(args) == 0 {
Expand Down
1 change: 1 addition & 0 deletions docs/kamanda.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ which is always a trick preposition.

### SEE ALSO

* [kamanda auth](kamanda_auth.md) - Perform Firebase Auth Operations
* [kamanda docsGen](kamanda_docsGen.md) - Generate Kamanda Documentation
* [kamanda login](kamanda_login.md) - Log kamanda into firebase
* [kamanda login:ci](kamanda_login:ci.md) - generate an access token for use in non-interactive environments
Expand Down
34 changes: 34 additions & 0 deletions docs/kamanda_auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## kamanda auth

Perform Firebase Auth Operations

### Synopsis

Perform Firebase Auth Operations

### Options

```
-h, --help help for auth
```

### Options inherited from parent commands

```
--config string config file (default is $HOME/.kamanda/config.json)
-o, --output string The format in which data will be outputted in [text, json, yaml]
-P, --project string The firebase project to use (default "default")
--token string firebase token to use for authentication
```

### SEE ALSO

* [kamanda](kamanda.md) - Kamanda is an extender Firebase Tools CLI
* [kamanda auth addUser](kamanda_auth_addUser.md) - Add a new Firebase Email/Password user (Accepts Custom Claims)
* [kamanda auth addUsers](kamanda_auth_addUsers.md) - Add multiple users from file (JSON/YAML)
* [kamanda auth customClaims](kamanda_auth_customClaims.md) - Add custom claims to an existing firebase user or users through their UIDs
* [kamanda auth deleteUsers](kamanda_auth_deleteUsers.md) - Delete multiple Firebase Auth User by their UID
* [kamanda auth find](kamanda_auth_find.md) - Find a a Firebase Auth user by their Firebase UID.
* [kamanda auth users](kamanda_auth_users.md) - Get a list of users in firebase auth.

###### Auto generated by spf13/cobra on 17-Apr-2020
15 changes: 11 additions & 4 deletions docs/kamanda_auth_find.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
## kamanda auth find

Find a user by uid. To find user by email or by phone use `find byEmail` or `find byPhone`
Find a a Firebase Auth user by their Firebase UID.

### Synopsis

Find a user by uid. To find user by email or by phone use `find byEmail` or `find byPhone`
Find a a Firebase Auth user by their Firebase UID.
To find user by email or by phone use "find by-email" or "find by-phone"

```
kamanda auth find [flags]
```

### Examples

```
kamanda auth find [UID1] [UID2]
```

### Options

```
Expand All @@ -29,7 +36,7 @@ kamanda auth find [flags]
### SEE ALSO

* [kamanda auth](kamanda_auth.md) - Perform Firebase Auth Operations
* [kamanda auth find byEmail](kamanda_auth_find_byEmail.md) - find a user by email address
* [kamanda auth find byPhone](kamanda_auth_find_byPhone.md) - find a user by phone number
* [kamanda auth find byEmail](kamanda_auth_find_byEmail.md) - Find a Firebase Auth user by email address
* [kamanda auth find byPhone](kamanda_auth_find_byPhone.md) - find a Firebase Auth User by their phone number

###### Auto generated by spf13/cobra on 17-Apr-2020
12 changes: 9 additions & 3 deletions docs/kamanda_auth_find_byEmail.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
## kamanda auth find byEmail

find a user by email address
Find a Firebase Auth user by email address

### Synopsis

find a user by email address
Find a Firebase Auth user by email address

```
kamanda auth find byEmail [flags]
```

### Examples

```
kamanda auth find by-email [email protected]
```

### Options

```
Expand All @@ -27,6 +33,6 @@ kamanda auth find byEmail [flags]

### SEE ALSO

* [kamanda auth find](kamanda_auth_find.md) - Find a user by uid. To find user by email or by phone use `find byEmail` or `find byPhone`
* [kamanda auth find](kamanda_auth_find.md) - Find a a Firebase Auth user by their Firebase UID.

###### Auto generated by spf13/cobra on 17-Apr-2020
12 changes: 9 additions & 3 deletions docs/kamanda_auth_find_byPhone.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
## kamanda auth find byPhone

find a user by phone number
find a Firebase Auth User by their phone number

### Synopsis

find a user by phone number
find a Firebase Auth User by their phone number

```
kamanda auth find byPhone [flags]
```

### Examples

```
kamanda auth find by-phone +254712345678
```

### Options

```
Expand All @@ -27,6 +33,6 @@ kamanda auth find byPhone [flags]

### SEE ALSO

* [kamanda auth find](kamanda_auth_find.md) - Find a user by uid. To find user by email or by phone use `find byEmail` or `find byPhone`
* [kamanda auth find](kamanda_auth_find.md) - Find a a Firebase Auth user by their Firebase UID.

###### Auto generated by spf13/cobra on 17-Apr-2020

0 comments on commit 7a543ab

Please sign in to comment.