(Liveness)
package main
import(
unkeygo "github.com/unkeyed/unkey-go"
"context"
"log"
)
func main() {
s := unkeygo.New(
unkeygo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
ctx := context.Background()
res, err := s.Liveness.V1Liveness(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.V1LivenessResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.ErrBadRequest | 400 | application/json |
sdkerrors.ErrUnauthorized | 401 | application/json |
sdkerrors.ErrForbidden | 403 | application/json |
sdkerrors.ErrNotFound | 404 | application/json |
sdkerrors.ErrConflict | 409 | application/json |
sdkerrors.ErrTooManyRequests | 429 | application/json |
sdkerrors.ErrInternalServerError | 500 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |