-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
109 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,11 +130,54 @@ db.signin({ | |
}) | ||
`, | ||
go: ` | ||
db.Signin(map[string]string{ | ||
"user": "root", | ||
"pass": "root", | ||
}) | ||
`, | ||
// Sign in as a root user | ||
authData := &surrealdb.Auth{ | ||
Username: "root", // use your setup username | ||
Password: "root", // use your setup password | ||
} | ||
token, err := db.SignIn(authData) | ||
if err != nil { | ||
panic(err) | ||
} | ||
// Sign in to authentication db using the namespace user | ||
authData := &surrealdb.Auth{ | ||
Username: "root", // use your setup username | ||
Password: "root", // use your setup password | ||
Namespace = "test", | ||
} | ||
token, err := db.SignIn(authData) | ||
if err != nil { | ||
panic(err) | ||
} | ||
// Sign in to authentication db using the database user | ||
authData := &surrealdb.Auth{ | ||
Username: "root", // use your setup username | ||
Password: "root", // use your setup password | ||
Namespace = "test", | ||
Database = "test", | ||
} | ||
token, err := db.SignIn(authData) | ||
if err != nil { | ||
panic(err) | ||
} | ||
// Sign in to authentication db using the record accessmethod | ||
authData := &surrealdb.Auth{ | ||
Username: "root", // use your setup username | ||
Password: "root", // use your setup password | ||
Namespace = "test", | ||
Database = "test", | ||
Access = "user", | ||
Email = "[email protected]", | ||
Password = "123456" | ||
} | ||
token, err := db.SignIn(authData) | ||
if err != nil { | ||
panic(err) | ||
} | ||
`, | ||
csharp: ` | ||
// Sign in as root user | ||
await db.SignIn( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,13 +77,19 @@ export function DocsAuthSignUp({ language }: TopicProps) { | |
}) | ||
`, | ||
go: ` | ||
db.Signup(map[string]string{ | ||
"NS": "clear-crocodile-production", | ||
"DB": "web-scraping-application", | ||
"SC": "user", | ||
"email": "[email protected]", | ||
"pass": "123456", | ||
}) | ||
authData := &surrealdb.Auth{ | ||
Username: "root", | ||
Password: "root", | ||
Namespace = "test", | ||
Database = "test", | ||
Access = "user", | ||
Email = "[email protected]", | ||
Password = "123456" | ||
} | ||
token, err := db.SignUp(authData) | ||
if err != nil { | ||
panic(err) | ||
} | ||
`, | ||
csharp: ` | ||
// With Record Access | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters