-
Notifications
You must be signed in to change notification settings - Fork 1
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
151 changed files
with
11,435 additions
and
34 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This allows generated code to be indexed correctly | ||
*.go linguist-generated=false |
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 @@ | ||
# .gitignore |
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,33 @@ | ||
<!-- Start SDK Example Usage [usage] --> | ||
```go | ||
package main | ||
|
||
import ( | ||
"context" | ||
unkeygo "github.com/unkeyed/unkey-go" | ||
"github.com/unkeyed/unkey-go/models/components" | ||
"github.com/unkeyed/unkey-go/models/operations" | ||
"log" | ||
) | ||
|
||
func main() { | ||
s := unkeygo.New( | ||
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"), | ||
) | ||
|
||
request := operations.CreateAPIRequestBody{ | ||
Name: "my-api", | ||
} | ||
|
||
ctx := context.Background() | ||
res, err := s.CreateAPI(ctx, request) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
if res != nil { | ||
// handle response | ||
} | ||
} | ||
|
||
``` | ||
<!-- End SDK Example Usage [usage] --> |
Oops, something went wrong.