-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bashorun97 <[email protected]>
- Loading branch information
1 parent
b84799c
commit d7bb170
Showing
5 changed files
with
82 additions
and
17 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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
|
||
"github.com/gandalf-network/gandalf-sdk-go/connect" | ||
) | ||
|
||
const publicKey = "0x036518f1c7a10fc77f835becc0aca9916c54505f771c82d87dd5943bb01ba5ca08"; | ||
const redirectURL = "https://example.com" | ||
|
||
|
||
func main() { | ||
qrCodeServices := connect.Services{ | ||
{Name: "Netflix", Status: true}, | ||
{Name: "Playstation", Status: false}, | ||
} | ||
qrCodeURL, err := connect.GenerateQRCode(publicKey, redirectURL, qrCodeServices) | ||
if err != nil { | ||
log.Fatalf("An error occurred generating QR Code url: %v", err) | ||
} | ||
|
||
fmt.Println("QR Code URL => ", qrCodeURL) | ||
|
||
services := connect.Services{ | ||
{Name: "Netflix", Status: false}, | ||
{Name: "Playstation", Status: true}, | ||
} | ||
url, err := connect.GenerateURL(publicKey, redirectURL, services) | ||
if err != nil { | ||
log.Fatalf("An error occurred url: %v", err) | ||
} | ||
|
||
fmt.Println("URL => ", url) | ||
} |
Empty file.
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