Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 2.6 KB

README.md

File metadata and controls

61 lines (46 loc) · 2.6 KB

Liveness

(Liveness)

Overview

Available Operations

V1Liveness

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
opts []operations.Option The options for this request.

Response

*operations.V1LivenessResponse, error

Errors

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 */*