keycard

package module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

README

Keycard API Go API Library

Go Reference

The Keycard API Go library provides convenient access to the Keycard API REST API from applications written in Go.

It is generated with Stainless.

MCP Server

Use the Keycard API MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

Add to Cursor Install in VS Code

Note: You may need to set environment variables in your MCP client.

Installation

import (
	"github.com/keycardai/keycard-go" // imported as keycard
)

Or to pin the version:

go get -u 'github.com/keycardai/keycard-go@v0.6.0'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/keycardai/keycard-go"
)

func main() {
	client := keycard.NewClient()
	zones, err := client.Zones.List(context.TODO(), keycard.ZoneListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", zones.Items)
}

Request fields

The keycard library uses the omitzero semantics from the Go 1.24+ encoding/json release for request fields.

Required primitive fields (int64, string, etc.) feature the tag `json:"...,required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, keycard.String(string), keycard.Int(int64), etc.

Any param.Opt[T], map, slice, struct or string enum uses the tag `json:"...,omitzero"`. Its zero value is considered omitted.

The param.IsOmitted(any) function can confirm the presence of any omitzero field.

p := keycard.ExampleParams{
	ID:   "id_xxx",              // required property
	Name: keycard.String("..."), // optional property

	Point: keycard.Point{
		X: 0,              // required field will serialize as 0
		Y: keycard.Int(1), // optional field will serialize as 1
		// ... omitted non-required fields will not be serialized
	},

	Origin: keycard.Origin{}, // the zero value of [Origin] is considered omitted
}

To send null instead of a param.Opt[T], use param.Null[T](). To send null instead of a struct T, use param.NullStruct[T]().

p.Name = param.Null[string]()       // 'null' instead of string
p.Point = param.NullStruct[Point]() // 'null' instead of struct

param.IsNull(p.Name)  // true
param.IsNull(p.Point) // true

Request structs contain a .SetExtraFields(map[string]any) method which can send non-conforming fields in the request body. Extra fields overwrite any struct fields with a matching key. For security reasons, only use SetExtraFields with trusted data.

To send a custom value instead of a struct, use param.Override[T](value).

// In cases where the API specifies a given type,
// but you want to send something else, use [SetExtraFields]:
p.SetExtraFields(map[string]any{
	"x": 0.01, // send "x" as a float instead of int
})

// Send a number instead of an object
custom := param.Override[keycard.FooParams](12)
Request unions

Unions are represented as a struct with fields prefixed by "Of" for each of its variants, only one field can be non-zero. The non-zero field will be serialized.

Sub-properties of the union can be accessed via methods on the union struct. These methods return a mutable pointer to the underlying data, if present.

// Only one field can be non-zero, use param.IsOmitted() to check if a field is set
type AnimalUnionParam struct {
	OfCat *Cat `json:",omitzero,inline`
	OfDog *Dog `json:",omitzero,inline`
}

animal := AnimalUnionParam{
	OfCat: &Cat{
		Name: "Whiskers",
		Owner: PersonParam{
			Address: AddressParam{Street: "3333 Coyote Hill Rd", Zip: 0},
		},
	},
}

// Mutating a field
if address := animal.GetOwner().GetAddress(); address != nil {
	address.ZipCode = 94304
}
Response objects

All fields in response structs are ordinary value types (not pointers or wrappers). Response structs also include a special JSON field containing metadata about each property.

type Animal struct {
	Name   string `json:"name,nullable"`
	Owners int    `json:"owners"`
	Age    int    `json:"age"`
	JSON   struct {
		Name        respjson.Field
		Owner       respjson.Field
		Age         respjson.Field
		ExtraFields map[string]respjson.Field
	} `json:"-"`
}

To handle optional data, use the .Valid() method on the JSON field. .Valid() returns true if a field is not null, not present, or couldn't be marshaled.

If .Valid() is false, the corresponding field will simply be its zero value.

raw := `{"owners": 1, "name": null}`

var res Animal
json.Unmarshal([]byte(raw), &res)

// Accessing regular fields

res.Owners // 1
res.Name   // ""
res.Age    // 0

// Optional field checks

res.JSON.Owners.Valid() // true
res.JSON.Name.Valid()   // false
res.JSON.Age.Valid()    // false

// Raw JSON values

res.JSON.Owners.Raw()                  // "1"
res.JSON.Name.Raw() == "null"          // true
res.JSON.Name.Raw() == respjson.Null   // true
res.JSON.Age.Raw() == ""               // true
res.JSON.Age.Raw() == respjson.Omitted // true

These .JSON structs also include an ExtraFields map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
Response Unions

In responses, unions are represented by a flattened struct containing all possible fields from each of the object variants. To convert it to a variant use the .AsFooVariant() method or the .AsAny() method if present.

If a response value union contains primitive values, primitive fields will be alongside the properties but prefixed with Of and feature the tag json:"...,inline".

type AnimalUnion struct {
	// From variants [Dog], [Cat]
	Owner Person `json:"owner"`
	// From variant [Dog]
	DogBreed string `json:"dog_breed"`
	// From variant [Cat]
	CatBreed string `json:"cat_breed"`
	// ...

	JSON struct {
		Owner respjson.Field
		// ...
	} `json:"-"`
}

// If animal variant
if animal.Owner.Address.ZipCode == "" {
	panic("missing zip code")
}

// Switch on the variant
switch variant := animal.AsAny().(type) {
case Dog:
case Cat:
default:
	panic("unexpected type")
}
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := keycard.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Zones.List(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

The request option option.WithDebugLog(nil) may be helpful while debugging.

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

Errors

When the API returns a non-success status code, we return an error with type *keycard.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Zones.List(context.TODO(), keycard.ZoneListParams{})
if err != nil {
	var apierr *keycard.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/zones": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Zones.List(
	ctx,
	keycard.ZoneListParams{},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as io.Reader. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper keycard.File(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := keycard.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Zones.List(
	context.TODO(),
	keycard.ZoneListParams{},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
zones, err := client.Zones.List(
	context.TODO(),
	keycard.ZoneListParams{},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", zones)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]any

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   "id_xxxx",
    Data: FooNewParamsData{
        FirstName: keycard.String("John"),
    },
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := keycard.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (KEYCARD_API_API_KEY, KEYCARD_API_CLIENT_ID, KEYCARD_API_CLIENT_SECRET, KEYCARD_API_BASE_URL). This should be used to initialize new clients.

func File

func File(rdr io.Reader, filename string, contentType string) file

func Float

func Float(f float64) param.Opt[float64]

func FloatPtr

func FloatPtr(v float64) *float64

func Int

func Int(i int64) param.Opt[int64]

func IntPtr

func IntPtr(v int64) *int64

func Opt

func Opt[T comparable](v T) param.Opt[T]

func Ptr

func Ptr[T any](v T) *T

func String

func String(s string) param.Opt[string]

func StringPtr

func StringPtr(v string) *string

func Time

func Time(t time.Time) param.Opt[time.Time]

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

type Application

type Application struct {
	// Unique identifier of the application
	ID string `json:"id" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Number of resource dependencies
	DependenciesCount int64 `json:"dependencies_count" api:"required"`
	// User specified identifier, unique within the zone
	Identifier string `json:"identifier" api:"required"`
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Organization that owns this application
	OrganizationID string `json:"organization_id" api:"required"`
	// Who owns this application. Platform-owned applications cannot be modified via
	// API.
	//
	// Any of "platform", "customer".
	OwnerType ApplicationOwnerType `json:"owner_type" api:"required"`
	// URL-safe identifier, unique within the zone
	Slug string `json:"slug" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Zone this application belongs to
	ZoneID string `json:"zone_id" api:"required"`
	// Human-readable description
	Description string `json:"description" api:"nullable"`
	// Entity metadata
	Metadata Metadata `json:"metadata"`
	// Protocol-specific configuration
	Protocols ApplicationProtocols `json:"protocols" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		CreatedAt         respjson.Field
		DependenciesCount respjson.Field
		Identifier        respjson.Field
		Name              respjson.Field
		OrganizationID    respjson.Field
		OwnerType         respjson.Field
		Slug              respjson.Field
		UpdatedAt         respjson.Field
		ZoneID            respjson.Field
		Description       respjson.Field
		Metadata          respjson.Field
		Protocols         respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An Application is a software system with an associated identity that can access Resources. It may act on its own behalf (machine-to-machine) or on behalf of a user (delegated access).

func (Application) RawJSON

func (r Application) RawJSON() string

Returns the unmodified JSON received from the API

func (*Application) UnmarshalJSON

func (r *Application) UnmarshalJSON(data []byte) error

type ApplicationOwnerType

type ApplicationOwnerType string

Who owns this application. Platform-owned applications cannot be modified via API.

const (
	ApplicationOwnerTypePlatform ApplicationOwnerType = "platform"
	ApplicationOwnerTypeCustomer ApplicationOwnerType = "customer"
)

type ApplicationProtocols

type ApplicationProtocols struct {
	// OAuth 2.0 protocol configuration
	Oauth2 ApplicationProtocolsOauth2 `json:"oauth2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Oauth2      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Protocol-specific configuration

func (ApplicationProtocols) RawJSON

func (r ApplicationProtocols) RawJSON() string

Returns the unmodified JSON received from the API

func (*ApplicationProtocols) UnmarshalJSON

func (r *ApplicationProtocols) UnmarshalJSON(data []byte) error

type ApplicationProtocolsOauth2

type ApplicationProtocolsOauth2 struct {
	// OAuth 2.0 post-logout redirect URIs for this application
	PostLogoutRedirectUris []string `json:"post_logout_redirect_uris" api:"nullable" format:"uri"`
	// OAuth 2.0 redirect URIs for this application
	RedirectUris []string `json:"redirect_uris" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		PostLogoutRedirectUris respjson.Field
		RedirectUris           respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OAuth 2.0 protocol configuration

func (ApplicationProtocolsOauth2) RawJSON

func (r ApplicationProtocolsOauth2) RawJSON() string

Returns the unmodified JSON received from the API

func (*ApplicationProtocolsOauth2) UnmarshalJSON

func (r *ApplicationProtocolsOauth2) UnmarshalJSON(data []byte) error

type ApplicationTrait

type ApplicationTrait string

Traits ascribe behaviors and characteristics to an application, which may activate trait-specific user experiences, workflows, or other system behaviors

const (
	ApplicationTraitGateway     ApplicationTrait = "gateway"
	ApplicationTraitMcpProvider ApplicationTrait = "mcp-provider"
)

type Attestation added in v0.6.0

type Attestation struct {
	// Base64url-encoded AttestationStatement (RFC 7515 §3). Decode to inspect
	// attestation content. The RFC 8785 canonical form of the decoded JSON is the JWS
	// Signing Input alongside the protected header.
	Payload string `json:"payload" api:"required"`
	// Base64url-encoded JWS protected header (RFC 7515 §4). Contains at minimum "alg"
	// (signing algorithm — currently RS256, will migrate to EdDSA) and "kid" (signing
	// key identifier resolvable via the zone JWKS endpoint).
	Protected string `json:"protected" api:"required"`
	// Base64url-encoded digital signature computed over the JWS Signing Input
	// (ASCII(protected) || '.' || payload) per RFC 7515 §5.1.
	Signature string `json:"signature" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Payload     respjson.Field
		Protected   respjson.Field
		Signature   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

JWS Flattened JSON Serialization (RFC 7515 §7.2.2) of a policy set attestation. The protected header carries the signing algorithm and key identifier; the payload is a base64url-encoded AttestationStatement canonicalized per RFC 8785 (JCS). Verify using the zone JWKS endpoint (RFC 7517). Currently signed with RS256; future zone key types (e.g. EdDSA) will be indicated by the "alg" header — no envelope changes required.

func (Attestation) RawJSON added in v0.6.0

func (r Attestation) RawJSON() string

Returns the unmodified JSON received from the API

func (*Attestation) UnmarshalJSON added in v0.6.0

func (r *Attestation) UnmarshalJSON(data []byte) error

type BaseFields

type BaseFields struct {
	// Unique identifier of the credential
	ID string `json:"id" api:"required"`
	// ID of the application this credential belongs to
	ApplicationID string `json:"application_id" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Organization that owns this credential
	OrganizationID string `json:"organization_id" api:"required"`
	// URL-safe identifier, unique within the zone
	Slug string `json:"slug" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Zone this credential belongs to
	ZoneID string `json:"zone_id" api:"required"`
	// An Application is a software system with an associated identity that can access
	// Resources. It may act on its own behalf (machine-to-machine) or on behalf of a
	// user (delegated access).
	//
	// Deprecated: deprecated
	Application Application `json:"application"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		ApplicationID  respjson.Field
		CreatedAt      respjson.Field
		OrganizationID respjson.Field
		Slug           respjson.Field
		UpdatedAt      respjson.Field
		ZoneID         respjson.Field
		Application    respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Common fields shared by all application credential types

func (BaseFields) RawJSON

func (r BaseFields) RawJSON() string

Returns the unmodified JSON received from the API

func (*BaseFields) UnmarshalJSON

func (r *BaseFields) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	Options       []option.RequestOption
	Zones         ZoneService
	Organizations OrganizationService
	Invitations   InvitationService
}

Client creates a struct with services and top level methods that help with interacting with the keycard-api API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r Client)

NewClient generates a new client with the default option read from the environment (KEYCARD_API_API_KEY, KEYCARD_API_CLIENT_ID, KEYCARD_API_CLIENT_SECRET, KEYCARD_API_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type CredentialUnion

type CredentialUnion struct {
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	ID string `json:"id"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	ApplicationID string `json:"application_id"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	CreatedAt time.Time `json:"created_at"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	OrganizationID string `json:"organization_id"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	Slug string `json:"slug"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	UpdatedAt time.Time `json:"updated_at"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	ZoneID string `json:"zone_id"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	Application Application `json:"application"`
	Identifier  string      `json:"identifier"`
	// This field is from variant [Token].
	ProviderID string `json:"provider_id"`
	Type       string `json:"type"`
	// This field is from variant [Token].
	Provider Provider `json:"provider"`
	// This field is from variant [Token].
	Subject string `json:"subject"`
	// This field is from variant [Password].
	Password string `json:"password"`
	// This field is from variant [PublicKey].
	JwksUri string `json:"jwks_uri"`
	JSON    struct {
		ID             respjson.Field
		ApplicationID  respjson.Field
		CreatedAt      respjson.Field
		OrganizationID respjson.Field
		Slug           respjson.Field
		UpdatedAt      respjson.Field
		ZoneID         respjson.Field
		Application    respjson.Field
		Identifier     respjson.Field
		ProviderID     respjson.Field
		Type           respjson.Field
		Provider       respjson.Field
		Subject        respjson.Field
		Password       respjson.Field
		JwksUri        respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

CredentialUnion contains all possible properties and values from Token, Password, PublicKey, URL, Public.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (CredentialUnion) AsApplicationCredentialPassword

func (u CredentialUnion) AsApplicationCredentialPassword() (v Password)

func (CredentialUnion) AsApplicationCredentialPublic

func (u CredentialUnion) AsApplicationCredentialPublic() (v Public)

func (CredentialUnion) AsApplicationCredentialPublicKey

func (u CredentialUnion) AsApplicationCredentialPublicKey() (v PublicKey)

func (CredentialUnion) AsApplicationCredentialToken

func (u CredentialUnion) AsApplicationCredentialToken() (v Token)

func (CredentialUnion) AsApplicationCredentialURL

func (u CredentialUnion) AsApplicationCredentialURL() (v URL)

func (CredentialUnion) RawJSON

func (u CredentialUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*CredentialUnion) UnmarshalJSON

func (r *CredentialUnion) UnmarshalJSON(data []byte) error

type EncryptionKeyAwsKmsConfig

type EncryptionKeyAwsKmsConfig struct {
	// AWS KMS Key ARN for encrypting the zone's data
	Arn string `json:"arn" api:"required"`
	// Any of "aws".
	Type EncryptionKeyAwsKmsConfigType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Arn         respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AWS KMS configuration for zone encryption. When not specified, the default Keycard Cloud encryption key will be used.

func (EncryptionKeyAwsKmsConfig) RawJSON

func (r EncryptionKeyAwsKmsConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (EncryptionKeyAwsKmsConfig) ToParam

ToParam converts this EncryptionKeyAwsKmsConfig to a EncryptionKeyAwsKmsConfigParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EncryptionKeyAwsKmsConfigParam.Overrides()

func (*EncryptionKeyAwsKmsConfig) UnmarshalJSON

func (r *EncryptionKeyAwsKmsConfig) UnmarshalJSON(data []byte) error

type EncryptionKeyAwsKmsConfigParam

type EncryptionKeyAwsKmsConfigParam struct {
	// AWS KMS Key ARN for encrypting the zone's data
	Arn string `json:"arn" api:"required"`
	// Any of "aws".
	Type EncryptionKeyAwsKmsConfigType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

AWS KMS configuration for zone encryption. When not specified, the default Keycard Cloud encryption key will be used.

The properties Arn, Type are required.

func (EncryptionKeyAwsKmsConfigParam) MarshalJSON

func (r EncryptionKeyAwsKmsConfigParam) MarshalJSON() (data []byte, err error)

func (*EncryptionKeyAwsKmsConfigParam) UnmarshalJSON

func (r *EncryptionKeyAwsKmsConfigParam) UnmarshalJSON(data []byte) error

type EncryptionKeyAwsKmsConfigType

type EncryptionKeyAwsKmsConfigType string
const (
	EncryptionKeyAwsKmsConfigTypeAws EncryptionKeyAwsKmsConfigType = "aws"
)

type Error

type Error = apierror.Error

type Grant

type Grant struct {
	// Unique identifier of the delegated grant
	ID string `json:"id" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Date when grant expires
	ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
	// Organization that owns this grant
	OrganizationID string `json:"organization_id" api:"required"`
	// ID of the provider that issued this grant
	ProviderID string `json:"provider_id" api:"required"`
	// Indicates whether a refresh token is stored for this grant. Grants with refresh
	// tokens can be refreshed even after access token expiration.
	RefreshTokenSet bool `json:"refresh_token_set" api:"required"`
	// ID of resource receiving grant
	ResourceID string `json:"resource_id" api:"required"`
	// Granted OAuth scopes
	Scopes []string `json:"scopes" api:"required"`
	// Any of "active", "expired", "revoked".
	Status GrantStatus `json:"status" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Reference to the user granting permission
	UserID string `json:"user_id" api:"required"`
	// Zone this grant belongs to
	ZoneID string `json:"zone_id" api:"required"`
	// Whether the grant is currently active (deprecated - use status instead)
	//
	// Deprecated: deprecated
	Active bool `json:"active"`
	// A Provider is a system that supplies access to Resources and allows actors
	// (Users or Applications) to authenticate.
	//
	// Deprecated: deprecated
	Provider Provider `json:"provider"`
	// Timestamp when this grant's tokens were last refreshed. Omitted if grant was
	// never refreshed.
	RefreshedAt time.Time `json:"refreshed_at" format:"date-time"`
	// A Resource is a system that exposes protected information or functionality. It
	// requires authentication of the requesting actor, which may be a user or
	// application, before allowing access.
	//
	// Deprecated: deprecated
	Resource Resource `json:"resource"`
	// An authenticated user entity
	//
	// Deprecated: deprecated
	User User `json:"user"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		ExpiresAt       respjson.Field
		OrganizationID  respjson.Field
		ProviderID      respjson.Field
		RefreshTokenSet respjson.Field
		ResourceID      respjson.Field
		Scopes          respjson.Field
		Status          respjson.Field
		UpdatedAt       respjson.Field
		UserID          respjson.Field
		ZoneID          respjson.Field
		Active          respjson.Field
		Provider        respjson.Field
		RefreshedAt     respjson.Field
		Resource        respjson.Field
		User            respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

User authorization for a resource to be accessed on their behalf. The grant links the user, resource, and the provider that issued the grant.

func (Grant) RawJSON

func (r Grant) RawJSON() string

Returns the unmodified JSON received from the API

func (*Grant) UnmarshalJSON

func (r *Grant) UnmarshalJSON(data []byte) error

type GrantStatus

type GrantStatus string
const (
	GrantStatusActive  GrantStatus = "active"
	GrantStatusExpired GrantStatus = "expired"
	GrantStatusRevoked GrantStatus = "revoked"
)

type Invitation

type Invitation struct {
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	ID string `json:"id" api:"required"`
	// The time the entity was created in utc
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// ID of the user who created the invitation
	CreatedBy string `json:"created_by" api:"required"`
	// Email address for the invitation
	Email string `json:"email" api:"required" format:"email"`
	// When the invitation expires
	ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	OrganizationID string `json:"organization_id" api:"required"`
	// Role that will be assigned when invitation is accepted
	//
	// Any of "org_admin", "org_member", "org_viewer".
	Role OrganizationRole `json:"role" api:"required"`
	// Status of an invitation
	//
	// Any of "pending", "accepted", "expired", "revoked".
	Status InvitationStatus `json:"status" api:"required"`
	// The time the entity was mostly recently updated in utc
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		CreatedAt      respjson.Field
		CreatedBy      respjson.Field
		Email          respjson.Field
		ExpiresAt      respjson.Field
		OrganizationID respjson.Field
		Role           respjson.Field
		Status         respjson.Field
		UpdatedAt      respjson.Field
		Permissions    respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Invitation) RawJSON

func (r Invitation) RawJSON() string

Returns the unmodified JSON received from the API

func (*Invitation) UnmarshalJSON

func (r *Invitation) UnmarshalJSON(data []byte) error

type InvitationAcceptParams

type InvitationAcceptParams struct {
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type InvitationAcceptResponse

type InvitationAcceptResponse struct {
	// ID of the organization joined
	OrganizationID string `json:"organization_id" api:"required"`
	// Name of the organization joined
	OrganizationName string `json:"organization_name" api:"required"`
	// Whether the invitation was successfully accepted
	Success bool `json:"success" api:"required"`
	// ID of the user who accepted the invitation
	UserID string `json:"user_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		OrganizationID   respjson.Field
		OrganizationName respjson.Field
		Success          respjson.Field
		UserID           respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Result of accepting an invitation

func (InvitationAcceptResponse) RawJSON

func (r InvitationAcceptResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*InvitationAcceptResponse) UnmarshalJSON

func (r *InvitationAcceptResponse) UnmarshalJSON(data []byte) error

type InvitationGetParams

type InvitationGetParams struct {
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type InvitationGetResponse

type InvitationGetResponse struct {
	// Name of the user who sent the invitation
	CreatedByName string `json:"created_by_name" api:"required"`
	// Email address for the invitation
	Email string `json:"email" api:"required" format:"email"`
	// When the invitation expires
	ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
	// Name of the organization being invited to
	OrganizationName string `json:"organization_name" api:"required"`
	// Role that will be assigned when invitation is accepted
	//
	// Any of "org_admin", "org_member", "org_viewer".
	Role OrganizationRole `json:"role" api:"required"`
	// Status of an invitation
	//
	// Any of "pending", "accepted", "expired", "revoked".
	Status InvitationStatus `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CreatedByName    respjson.Field
		Email            respjson.Field
		ExpiresAt        respjson.Field
		OrganizationName respjson.Field
		Role             respjson.Field
		Status           respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Public invitation details viewable by token

func (InvitationGetResponse) RawJSON

func (r InvitationGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*InvitationGetResponse) UnmarshalJSON

func (r *InvitationGetResponse) UnmarshalJSON(data []byte) error

type InvitationService

type InvitationService struct {
	Options []option.RequestOption
}

InvitationService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInvitationService method instead.

func NewInvitationService

func NewInvitationService(opts ...option.RequestOption) (r InvitationService)

NewInvitationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*InvitationService) Accept

Accept and consume an invitation token to join the organization

func (*InvitationService) Get

View invitation details by token without consuming the token

type InvitationStatus

type InvitationStatus string

Status of an invitation

const (
	InvitationStatusPending  InvitationStatus = "pending"
	InvitationStatusAccepted InvitationStatus = "accepted"
	InvitationStatusExpired  InvitationStatus = "expired"
	InvitationStatusRevoked  InvitationStatus = "revoked"
)

type Metadata

type Metadata struct {
	// Documentation URL
	DocsURL string `json:"docs_url" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DocsURL     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Entity metadata

func (Metadata) RawJSON

func (r Metadata) RawJSON() string

Returns the unmodified JSON received from the API

func (Metadata) ToParam

func (r Metadata) ToParam() MetadataParam

ToParam converts this Metadata to a MetadataParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MetadataParam.Overrides()

func (*Metadata) UnmarshalJSON

func (r *Metadata) UnmarshalJSON(data []byte) error

type MetadataParam

type MetadataParam struct {
	// Documentation URL
	DocsURL param.Opt[string] `json:"docs_url,omitzero" format:"uri"`
	// contains filtered or unexported fields
}

Entity metadata

func (MetadataParam) MarshalJSON

func (r MetadataParam) MarshalJSON() (data []byte, err error)

func (*MetadataParam) UnmarshalJSON

func (r *MetadataParam) UnmarshalJSON(data []byte) error

type MetadataUpdateParam

type MetadataUpdateParam struct {
	// Documentation URL (set to null to unset)
	DocsURL param.Opt[string] `json:"docs_url,omitzero" format:"uri"`
	// contains filtered or unexported fields
}

Entity metadata (set to null or {} to remove metadata)

func (MetadataUpdateParam) MarshalJSON

func (r MetadataUpdateParam) MarshalJSON() (data []byte, err error)

func (*MetadataUpdateParam) UnmarshalJSON

func (r *MetadataUpdateParam) UnmarshalJSON(data []byte) error

type Organization

type Organization struct {
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	ID string `json:"id" api:"required"`
	// The time the entity was created in utc
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A domain name segment for the entity, often derived from the name.
	Label string `json:"label" api:"required"`
	// A name for the entity to be displayed in UI
	Name string `json:"name" api:"required"`
	// Whether SSO is enabled for this organization
	SSOEnabled bool `json:"sso_enabled" api:"required"`
	// The time the entity was mostly recently updated in utc
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Label       respjson.Field
		Name        respjson.Field
		SSOEnabled  respjson.Field
		UpdatedAt   respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Organization) RawJSON

func (r Organization) RawJSON() string

Returns the unmodified JSON received from the API

func (*Organization) UnmarshalJSON

func (r *Organization) UnmarshalJSON(data []byte) error

type OrganizationExchangeTokenParams

type OrganizationExchangeTokenParams struct {
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type OrganizationGetParams

type OrganizationGetParams struct {
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationGetParams) URLQuery

func (r OrganizationGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationGetParams's query parameters as `url.Values`.

type OrganizationInvitationDeleteParams

type OrganizationInvitationDeleteParams struct {
	// Organization ID or label identifier
	OrganizationID   string            `path:"organization_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type OrganizationInvitationListParams

type OrganizationInvitationListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of invitations to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationInvitationListParams) URLQuery

func (r OrganizationInvitationListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationInvitationListParams's query parameters as `url.Values`.

type OrganizationInvitationListResponse

type OrganizationInvitationListResponse struct {
	Items []Invitation `json:"items" api:"required"`
	// Pagination information using cursor-based pagination
	PageInfo PageInfoCursor `json:"page_info" api:"required"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OrganizationInvitationListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationInvitationListResponse) UnmarshalJSON

func (r *OrganizationInvitationListResponse) UnmarshalJSON(data []byte) error

type OrganizationInvitationNewParams

type OrganizationInvitationNewParams struct {
	// Email address to invite
	Email string `json:"email" api:"required" format:"email"`
	// Role to assign when invitation is accepted
	//
	// Any of "org_admin", "org_member", "org_viewer".
	Role             OrganizationRole  `json:"role,omitzero" api:"required"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationInvitationNewParams) MarshalJSON

func (r OrganizationInvitationNewParams) MarshalJSON() (data []byte, err error)

func (*OrganizationInvitationNewParams) UnmarshalJSON

func (r *OrganizationInvitationNewParams) UnmarshalJSON(data []byte) error

type OrganizationInvitationService

type OrganizationInvitationService struct {
	Options []option.RequestOption
}

OrganizationInvitationService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationInvitationService method instead.

func NewOrganizationInvitationService

func NewOrganizationInvitationService(opts ...option.RequestOption) (r OrganizationInvitationService)

NewOrganizationInvitationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationInvitationService) Delete

Delete an invitation

func (*OrganizationInvitationService) List

List invitations for an organization

func (*OrganizationInvitationService) New

Create an invitation to join an organization

type OrganizationListIdentitiesParams

type OrganizationListIdentitiesParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of identities to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Filter identities by role
	//
	// Any of "org_admin", "org_member", "org_viewer".
	Role OrganizationRole `query:"role,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationListIdentitiesParams) URLQuery

func (r OrganizationListIdentitiesParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationListIdentitiesParams's query parameters as `url.Values`.

type OrganizationListIdentitiesResponse

type OrganizationListIdentitiesResponse struct {
	Items []OrganizationListIdentitiesResponseItem `json:"items" api:"required"`
	// Pagination information using cursor-based pagination
	PageInfo PageInfoCursor `json:"page_info" api:"required"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List of identities (users and invitations) in an organization

func (OrganizationListIdentitiesResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationListIdentitiesResponse) UnmarshalJSON

func (r *OrganizationListIdentitiesResponse) UnmarshalJSON(data []byte) error

type OrganizationListIdentitiesResponseItem

type OrganizationListIdentitiesResponseItem struct {
	// The identity ID (user or invitation)
	ID string `json:"id" api:"required"`
	// The time the entity was created in utc
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Email address of the identity
	Email string `json:"email" api:"required" format:"email"`
	// Role in the organization
	//
	// Any of "org_admin", "org_member", "org_viewer".
	Role OrganizationRole `json:"role" api:"required"`
	// Identity provider issuer
	Source string `json:"source" api:"required" format:"uri"`
	// Status of the identity (OrganizationStatus for users, InvitationStatus for
	// invitations)
	//
	// Any of "active", "disabled", "pending", "accepted", "expired", "revoked".
	Status OrganizationListIdentitiesResponseItemStatus `json:"status" api:"required"`
	// Type of identity (user or invitation)
	//
	// Any of "user", "invitation".
	Type string `json:"type" api:"required"`
	// The time the entity was mostly recently updated in utc
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Email       respjson.Field
		Role        respjson.Field
		Source      respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Unified view of users and invitations in an organization

func (OrganizationListIdentitiesResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationListIdentitiesResponseItem) UnmarshalJSON

func (r *OrganizationListIdentitiesResponseItem) UnmarshalJSON(data []byte) error

type OrganizationListIdentitiesResponseItemStatus

type OrganizationListIdentitiesResponseItemStatus string

Status of the identity (OrganizationStatus for users, InvitationStatus for invitations)

const (
	OrganizationListIdentitiesResponseItemStatusActive   OrganizationListIdentitiesResponseItemStatus = "active"
	OrganizationListIdentitiesResponseItemStatusDisabled OrganizationListIdentitiesResponseItemStatus = "disabled"
	OrganizationListIdentitiesResponseItemStatusPending  OrganizationListIdentitiesResponseItemStatus = "pending"
	OrganizationListIdentitiesResponseItemStatusAccepted OrganizationListIdentitiesResponseItemStatus = "accepted"
	OrganizationListIdentitiesResponseItemStatusExpired  OrganizationListIdentitiesResponseItemStatus = "expired"
	OrganizationListIdentitiesResponseItemStatusRevoked  OrganizationListIdentitiesResponseItemStatus = "revoked"
)

type OrganizationListParams

type OrganizationListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of organizations to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationListParams) URLQuery

func (r OrganizationListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationListParams's query parameters as `url.Values`.

type OrganizationListResponse

type OrganizationListResponse struct {
	Items []Organization `json:"items" api:"required"`
	// Pagination information using cursor-based pagination
	PageInfo PageInfoCursor `json:"page_info" api:"required"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OrganizationListResponse) RawJSON

func (r OrganizationListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*OrganizationListResponse) UnmarshalJSON

func (r *OrganizationListResponse) UnmarshalJSON(data []byte) error

type OrganizationListRolesParams

type OrganizationListRolesParams struct {
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Filter roles by scope (organization or zone level)
	//
	// Any of "organization", "zone".
	Scope RoleScope `query:"scope,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationListRolesParams) URLQuery

func (r OrganizationListRolesParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationListRolesParams's query parameters as `url.Values`.

type OrganizationListRolesResponse

type OrganizationListRolesResponse struct {
	// List of roles
	Items []OrganizationListRolesResponseItem `json:"items" api:"required"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List of available roles

func (OrganizationListRolesResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationListRolesResponse) UnmarshalJSON

func (r *OrganizationListRolesResponse) UnmarshalJSON(data []byte) error

type OrganizationListRolesResponseItem

type OrganizationListRolesResponseItem struct {
	// Detailed description of the role and its permissions
	Description string `json:"description" api:"required"`
	// Human-readable display name for the role
	Label string `json:"label" api:"required"`
	// Internal identifier for the role (e.g., org_admin, zone_manager)
	Name string `json:"name" api:"required"`
	// The scope at which this role can be assigned (organization or zone)
	//
	// Any of "organization", "zone".
	Scope RoleScope `json:"scope" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Description respjson.Field
		Label       respjson.Field
		Name        respjson.Field
		Scope       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A role definition that can be assigned to users

func (OrganizationListRolesResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationListRolesResponseItem) UnmarshalJSON

func (r *OrganizationListRolesResponseItem) UnmarshalJSON(data []byte) error

type OrganizationNewParams

type OrganizationNewParams struct {
	// Organization name
	Name             param.Opt[string] `json:"name,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationNewParams) MarshalJSON

func (r OrganizationNewParams) MarshalJSON() (data []byte, err error)

func (*OrganizationNewParams) UnmarshalJSON

func (r *OrganizationNewParams) UnmarshalJSON(data []byte) error

type OrganizationRole

type OrganizationRole string

User's role in the organization

const (
	OrganizationRoleOrgAdmin  OrganizationRole = "org_admin"
	OrganizationRoleOrgMember OrganizationRole = "org_member"
	OrganizationRoleOrgViewer OrganizationRole = "org_viewer"
)

type OrganizationSSOConnectionDisableParams

type OrganizationSSOConnectionDisableParams struct {
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type OrganizationSSOConnectionEnableParams

type OrganizationSSOConnectionEnableParams struct {
	// OAuth 2.0 client ID
	ClientID string `json:"client_id" api:"required"`
	// SSO provider identifier (e.g., issuer URL)
	Identifier string `json:"identifier" api:"required"`
	// OAuth 2.0 client secret (optional, will be encrypted if provided)
	ClientSecret     param.Opt[string] `json:"client_secret,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Protocol configuration for SSO connection
	Protocols SSOConnectionProtocolParam `json:"protocols,omitzero"`
	// contains filtered or unexported fields
}

func (OrganizationSSOConnectionEnableParams) MarshalJSON

func (r OrganizationSSOConnectionEnableParams) MarshalJSON() (data []byte, err error)

func (*OrganizationSSOConnectionEnableParams) UnmarshalJSON

func (r *OrganizationSSOConnectionEnableParams) UnmarshalJSON(data []byte) error

type OrganizationSSOConnectionGetParams

type OrganizationSSOConnectionGetParams struct {
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationSSOConnectionGetParams) URLQuery

func (r OrganizationSSOConnectionGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationSSOConnectionGetParams's query parameters as `url.Values`.

type OrganizationSSOConnectionService

type OrganizationSSOConnectionService struct {
	Options []option.RequestOption
}

OrganizationSSOConnectionService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationSSOConnectionService method instead.

func NewOrganizationSSOConnectionService

func NewOrganizationSSOConnectionService(opts ...option.RequestOption) (r OrganizationSSOConnectionService)

NewOrganizationSSOConnectionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationSSOConnectionService) Disable

Disable SSO for organization

func (*OrganizationSSOConnectionService) Enable

Enable SSO for organization

func (*OrganizationSSOConnectionService) Get

Get SSO connection configuration for organization

func (*OrganizationSSOConnectionService) Update

Update SSO connection configuration

type OrganizationSSOConnectionUpdateParams

type OrganizationSSOConnectionUpdateParams struct {
	// OAuth 2.0 client ID (set to null to remove)
	ClientID param.Opt[string] `json:"client_id,omitzero"`
	// OAuth 2.0 client secret (set to null to remove)
	ClientSecret param.Opt[string] `json:"client_secret,omitzero"`
	// SSO provider identifier (e.g., issuer URL)
	Identifier       param.Opt[string] `json:"identifier,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Protocol configuration for SSO connection
	Protocols SSOConnectionProtocolParam `json:"protocols,omitzero"`
	// contains filtered or unexported fields
}

func (OrganizationSSOConnectionUpdateParams) MarshalJSON

func (r OrganizationSSOConnectionUpdateParams) MarshalJSON() (data []byte, err error)

func (*OrganizationSSOConnectionUpdateParams) UnmarshalJSON

func (r *OrganizationSSOConnectionUpdateParams) UnmarshalJSON(data []byte) error

type OrganizationService

type OrganizationService struct {
	Options         []option.RequestOption
	Users           OrganizationUserService
	Invitations     OrganizationInvitationService
	ServiceAccounts OrganizationServiceAccountService
	SSOConnection   OrganizationSSOConnectionService
}

OrganizationService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.

func NewOrganizationService

func NewOrganizationService(opts ...option.RequestOption) (r OrganizationService)

NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationService) ExchangeToken

func (r *OrganizationService) ExchangeToken(ctx context.Context, organizationID string, body OrganizationExchangeTokenParams, opts ...option.RequestOption) (res *TokenResponse, err error)

Exchange user token for organization-scoped M2M token

func (*OrganizationService) Get

func (r *OrganizationService) Get(ctx context.Context, organizationID string, params OrganizationGetParams, opts ...option.RequestOption) (res *Organization, err error)

Get organization by ID or label

func (*OrganizationService) List

List organizations for the current user

func (*OrganizationService) ListIdentities

List unified view of users and invitations in an organization

func (*OrganizationService) ListRoles

func (r *OrganizationService) ListRoles(ctx context.Context, organizationID string, params OrganizationListRolesParams, opts ...option.RequestOption) (res *OrganizationListRolesResponse, err error)

Returns the list of available roles in the system for the organization. This includes both organization-level roles (e.g., org_admin, org_member) and zone-level roles (e.g., zone_manager, zone_viewer).

Each role includes:

- `name`: Internal identifier (e.g., org_admin, zone_manager) - `label`: Human-readable display name (e.g., Organization Administrator) - `scope`: Whether the role applies at organization or zone level

func (*OrganizationService) New

func (*OrganizationService) Update

func (r *OrganizationService) Update(ctx context.Context, organizationID string, params OrganizationUpdateParams, opts ...option.RequestOption) (res *Organization, err error)

Update organization details

type OrganizationServiceAccountCredentialDeleteParams

type OrganizationServiceAccountCredentialDeleteParams struct {
	// Organization ID or label identifier
	OrganizationID string `path:"organization_id" api:"required" json:"-"`
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	ServiceAccountID string            `path:"service_account_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type OrganizationServiceAccountCredentialGetParams

type OrganizationServiceAccountCredentialGetParams struct {
	// Organization ID or label identifier
	OrganizationID string `path:"organization_id" api:"required" json:"-"`
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	ServiceAccountID string            `path:"service_account_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationServiceAccountCredentialGetParams) URLQuery

URLQuery serializes OrganizationServiceAccountCredentialGetParams's query parameters as `url.Values`.

type OrganizationServiceAccountCredentialListParams

type OrganizationServiceAccountCredentialListParams struct {
	// Organization ID or label identifier
	OrganizationID string `path:"organization_id" api:"required" json:"-"`
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of credentials to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationServiceAccountCredentialListParams) URLQuery

URLQuery serializes OrganizationServiceAccountCredentialListParams's query parameters as `url.Values`.

type OrganizationServiceAccountCredentialListResponse

type OrganizationServiceAccountCredentialListResponse struct {
	Items []ServiceAccountCredential `json:"items" api:"required"`
	// Pagination information using cursor-based pagination
	PageInfo PageInfoCursor `json:"page_info" api:"required"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OrganizationServiceAccountCredentialListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationServiceAccountCredentialListResponse) UnmarshalJSON

type OrganizationServiceAccountCredentialNewParams

type OrganizationServiceAccountCredentialNewParams struct {
	// Organization ID or label identifier
	OrganizationID string `path:"organization_id" api:"required" json:"-"`
	// Credential name
	Name string `json:"name" api:"required"`
	// Optional description of the credential
	Description      param.Opt[string] `json:"description,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationServiceAccountCredentialNewParams) MarshalJSON

func (r OrganizationServiceAccountCredentialNewParams) MarshalJSON() (data []byte, err error)

func (*OrganizationServiceAccountCredentialNewParams) UnmarshalJSON

func (r *OrganizationServiceAccountCredentialNewParams) UnmarshalJSON(data []byte) error

type OrganizationServiceAccountCredentialNewResponse

type OrganizationServiceAccountCredentialNewResponse struct {
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	ID string `json:"id" api:"required"`
	// The client ID for authentication
	ClientID string `json:"client_id" api:"required"`
	// The client secret
	ClientSecret string `json:"client_secret" api:"required"`
	// The time the entity was created in utc
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A name for the entity to be displayed in UI
	Name string `json:"name" api:"required"`
	// Optional description of the credential
	Description string `json:"description"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		ClientID     respjson.Field
		ClientSecret respjson.Field
		CreatedAt    respjson.Field
		Name         respjson.Field
		Description  respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Service account credential with plaintext secret (only returned on creation)

func (OrganizationServiceAccountCredentialNewResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationServiceAccountCredentialNewResponse) UnmarshalJSON

type OrganizationServiceAccountCredentialService

type OrganizationServiceAccountCredentialService struct {
	Options []option.RequestOption
}

OrganizationServiceAccountCredentialService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationServiceAccountCredentialService method instead.

func NewOrganizationServiceAccountCredentialService

func NewOrganizationServiceAccountCredentialService(opts ...option.RequestOption) (r OrganizationServiceAccountCredentialService)

NewOrganizationServiceAccountCredentialService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationServiceAccountCredentialService) Delete

Delete a service account credential

func (*OrganizationServiceAccountCredentialService) Get

Get a specific service account credential

func (*OrganizationServiceAccountCredentialService) List

List credentials for a service account

func (*OrganizationServiceAccountCredentialService) New

Create a new credential for a service account

func (*OrganizationServiceAccountCredentialService) Update

Update a service account credential

type OrganizationServiceAccountCredentialUpdateParams

type OrganizationServiceAccountCredentialUpdateParams struct {
	// Organization ID or label identifier
	OrganizationID string `path:"organization_id" api:"required" json:"-"`
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	ServiceAccountID string `path:"service_account_id" api:"required" json:"-"`
	// Optional description of the credential
	Description param.Opt[string] `json:"description,omitzero"`
	// Credential name
	Name             param.Opt[string] `json:"name,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationServiceAccountCredentialUpdateParams) MarshalJSON

func (r OrganizationServiceAccountCredentialUpdateParams) MarshalJSON() (data []byte, err error)

func (*OrganizationServiceAccountCredentialUpdateParams) UnmarshalJSON

type OrganizationServiceAccountDeleteParams

type OrganizationServiceAccountDeleteParams struct {
	// Organization ID or label identifier
	OrganizationID   string            `path:"organization_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type OrganizationServiceAccountGetParams

type OrganizationServiceAccountGetParams struct {
	// Organization ID or label identifier
	OrganizationID   string            `path:"organization_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationServiceAccountGetParams) URLQuery

func (r OrganizationServiceAccountGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationServiceAccountGetParams's query parameters as `url.Values`.

type OrganizationServiceAccountListParams

type OrganizationServiceAccountListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of service accounts to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationServiceAccountListParams) URLQuery

func (r OrganizationServiceAccountListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationServiceAccountListParams's query parameters as `url.Values`.

type OrganizationServiceAccountListResponse

type OrganizationServiceAccountListResponse struct {
	Items []ServiceAccount `json:"items" api:"required"`
	// Pagination information using cursor-based pagination
	PageInfo PageInfoCursor `json:"page_info" api:"required"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OrganizationServiceAccountListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationServiceAccountListResponse) UnmarshalJSON

func (r *OrganizationServiceAccountListResponse) UnmarshalJSON(data []byte) error

type OrganizationServiceAccountNewParams

type OrganizationServiceAccountNewParams struct {
	// Service account name
	Name string `json:"name" api:"required"`
	// Optional description of the service account
	Description      param.Opt[string] `json:"description,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationServiceAccountNewParams) MarshalJSON

func (r OrganizationServiceAccountNewParams) MarshalJSON() (data []byte, err error)

func (*OrganizationServiceAccountNewParams) UnmarshalJSON

func (r *OrganizationServiceAccountNewParams) UnmarshalJSON(data []byte) error

type OrganizationServiceAccountService

type OrganizationServiceAccountService struct {
	Options     []option.RequestOption
	Credentials OrganizationServiceAccountCredentialService
}

OrganizationServiceAccountService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationServiceAccountService method instead.

func NewOrganizationServiceAccountService

func NewOrganizationServiceAccountService(opts ...option.RequestOption) (r OrganizationServiceAccountService)

NewOrganizationServiceAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationServiceAccountService) Delete

Delete a service account

func (*OrganizationServiceAccountService) Get

Get a specific service account

func (*OrganizationServiceAccountService) List

List service accounts for an organization

func (*OrganizationServiceAccountService) New

Create a new service account for an organization

func (*OrganizationServiceAccountService) Update

Update a service account

type OrganizationServiceAccountUpdateParams

type OrganizationServiceAccountUpdateParams struct {
	// Organization ID or label identifier
	OrganizationID string `path:"organization_id" api:"required" json:"-"`
	// Optional description of the service account
	Description param.Opt[string] `json:"description,omitzero"`
	// Service account name
	Name             param.Opt[string] `json:"name,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationServiceAccountUpdateParams) MarshalJSON

func (r OrganizationServiceAccountUpdateParams) MarshalJSON() (data []byte, err error)

func (*OrganizationServiceAccountUpdateParams) UnmarshalJSON

func (r *OrganizationServiceAccountUpdateParams) UnmarshalJSON(data []byte) error

type OrganizationStatus

type OrganizationStatus string

Status of organization membership

const (
	OrganizationStatusActive   OrganizationStatus = "active"
	OrganizationStatusDisabled OrganizationStatus = "disabled"
)

type OrganizationUpdateParams

type OrganizationUpdateParams struct {
	// Organization name
	Name             param.Opt[string] `json:"name,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationUpdateParams) MarshalJSON

func (r OrganizationUpdateParams) MarshalJSON() (data []byte, err error)

func (*OrganizationUpdateParams) UnmarshalJSON

func (r *OrganizationUpdateParams) UnmarshalJSON(data []byte) error

type OrganizationUser

type OrganizationUser struct {
	// The keycard account ID
	ID string `json:"id" api:"required"`
	// The time the entity was created in utc
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// User's role in the organization
	//
	// Any of "org_admin", "org_member", "org_viewer".
	Role OrganizationRole `json:"role" api:"required"`
	// Identity provider issuer
	Source string `json:"source" api:"required" format:"uri"`
	// Status of organization membership
	//
	// Any of "active", "disabled".
	Status OrganizationStatus `json:"status" api:"required"`
	// The time the entity was mostly recently updated in utc
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// User email address
	Email string `json:"email" format:"email"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Role        respjson.Field
		Source      respjson.Field
		Status      respjson.Field
		UpdatedAt   respjson.Field
		Email       respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OrganizationUser) RawJSON

func (r OrganizationUser) RawJSON() string

Returns the unmodified JSON received from the API

func (*OrganizationUser) UnmarshalJSON

func (r *OrganizationUser) UnmarshalJSON(data []byte) error

type OrganizationUserDeleteParams

type OrganizationUserDeleteParams struct {
	// Organization ID or label identifier
	OrganizationID   string            `path:"organization_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type OrganizationUserGetParams

type OrganizationUserGetParams struct {
	// Organization ID or label identifier
	OrganizationID   string            `path:"organization_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationUserGetParams) URLQuery

func (r OrganizationUserGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationUserGetParams's query parameters as `url.Values`.

type OrganizationUserListParams

type OrganizationUserListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of users to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Fields to expand in the response. Currently supports "permissions" to include
	// the permissions field with the caller's permissions for the resource.
	//
	// Any of "permissions".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Filter users by role
	//
	// Any of "org_admin", "org_member", "org_viewer".
	Role OrganizationRole `query:"role,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationUserListParams) URLQuery

func (r OrganizationUserListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OrganizationUserListParams's query parameters as `url.Values`.

type OrganizationUserListResponse

type OrganizationUserListResponse struct {
	Items []OrganizationUser `json:"items" api:"required"`
	// Pagination information using cursor-based pagination
	PageInfo PageInfoCursor `json:"page_info" api:"required"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OrganizationUserListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OrganizationUserListResponse) UnmarshalJSON

func (r *OrganizationUserListResponse) UnmarshalJSON(data []byte) error

type OrganizationUserService

type OrganizationUserService struct {
	Options []option.RequestOption
}

OrganizationUserService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationUserService method instead.

func NewOrganizationUserService

func NewOrganizationUserService(opts ...option.RequestOption) (r OrganizationUserService)

NewOrganizationUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationUserService) Delete

Remove a user from an organization

func (*OrganizationUserService) Get

Get a specific user in an organization

func (*OrganizationUserService) List

List users in an organization

func (*OrganizationUserService) Update

Update user status in an organization

type OrganizationUserUpdateParams

type OrganizationUserUpdateParams struct {
	// Organization ID or label identifier
	OrganizationID   string            `path:"organization_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// New role for the user in the organization
	//
	// Any of "org_admin", "org_member", "org_viewer".
	Role OrganizationRole `json:"role,omitzero"`
	// New status for the user in the organization
	//
	// Any of "active", "disabled".
	Status OrganizationStatus `json:"status,omitzero"`
	// contains filtered or unexported fields
}

func (OrganizationUserUpdateParams) MarshalJSON

func (r OrganizationUserUpdateParams) MarshalJSON() (data []byte, err error)

func (*OrganizationUserUpdateParams) UnmarshalJSON

func (r *OrganizationUserUpdateParams) UnmarshalJSON(data []byte) error

type PageInfoCursor

type PageInfoCursor struct {
	// Whether there are more items after the current page
	HasNextPage bool `json:"has_next_page" api:"required"`
	// Whether there are more items before the current page
	HasPrevPage bool `json:"has_prev_page" api:"required"`
	// Cursor pointing to the last item in the current page
	EndCursor string `json:"end_cursor"`
	// Cursor pointing to the first item in the current page
	StartCursor string `json:"start_cursor"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HasNextPage respjson.Field
		HasPrevPage respjson.Field
		EndCursor   respjson.Field
		StartCursor respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Pagination information using cursor-based pagination

func (PageInfoCursor) RawJSON

func (r PageInfoCursor) RawJSON() string

Returns the unmodified JSON received from the API

func (*PageInfoCursor) UnmarshalJSON

func (r *PageInfoCursor) UnmarshalJSON(data []byte) error

type PageInfoPagination

type PageInfoPagination struct {
	// Whether there are more items after the current page
	HasNextPage bool `json:"has_next_page" api:"required"`
	// Whether there are items before the current page
	HasPreviousPage bool `json:"has_previous_page" api:"required"`
	// Cursor pointing to the last item in the current page
	EndCursor string `json:"end_cursor" api:"nullable"`
	// Cursor pointing to the first item in the current page
	StartCursor string `json:"start_cursor" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HasNextPage     respjson.Field
		HasPreviousPage respjson.Field
		EndCursor       respjson.Field
		StartCursor     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Pagination information

func (PageInfoPagination) RawJSON

func (r PageInfoPagination) RawJSON() string

Returns the unmodified JSON received from the API

func (*PageInfoPagination) UnmarshalJSON

func (r *PageInfoPagination) UnmarshalJSON(data []byte) error

type Password

type Password struct {
	// Username for password credential, also used as OAuth 2.0 client ID
	Identifier string `json:"identifier" api:"required"`
	// Any of "password".
	Type string `json:"type" api:"required"`
	// Password for credential (only returned on creation, store securely), also used
	// as OAuth 2.0 client secret
	Password string `json:"password"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Identifier  respjson.Field
		Type        respjson.Field
		Password    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	BaseFields
}

Password-based application credential

func (Password) RawJSON

func (r Password) RawJSON() string

Returns the unmodified JSON received from the API

func (*Password) UnmarshalJSON

func (r *Password) UnmarshalJSON(data []byte) error

type Policy added in v0.6.0

type Policy struct {
	ID        string    `json:"id" api:"required"`
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	CreatedBy string    `json:"created_by" api:"required"`
	Name      string    `json:"name" api:"required"`
	// Any of "platform", "customer".
	OwnerType   PolicyOwnerType `json:"owner_type" api:"required"`
	UpdatedAt   time.Time       `json:"updated_at" api:"required" format:"date-time"`
	ZoneID      string          `json:"zone_id" api:"required"`
	ArchivedAt  time.Time       `json:"archived_at" api:"nullable" format:"date-time"`
	Description string          `json:"description" api:"nullable"`
	// Human-readable version number of the latest version (e.g., 1, 2, 3)
	LatestVersion   int64  `json:"latest_version" api:"nullable"`
	LatestVersionID string `json:"latest_version_id" api:"nullable"`
	UpdatedBy       string `json:"updated_by" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		CreatedBy       respjson.Field
		Name            respjson.Field
		OwnerType       respjson.Field
		UpdatedAt       respjson.Field
		ZoneID          respjson.Field
		ArchivedAt      respjson.Field
		Description     respjson.Field
		LatestVersion   respjson.Field
		LatestVersionID respjson.Field
		UpdatedBy       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Policy) RawJSON added in v0.6.0

func (r Policy) RawJSON() string

Returns the unmodified JSON received from the API

func (*Policy) UnmarshalJSON added in v0.6.0

func (r *Policy) UnmarshalJSON(data []byte) error

type PolicyOwnerType added in v0.6.0

type PolicyOwnerType string
const (
	PolicyOwnerTypePlatform PolicyOwnerType = "platform"
	PolicyOwnerTypeCustomer PolicyOwnerType = "customer"
)

type PolicySet added in v0.6.0

type PolicySet struct {
	ID        string    `json:"id" api:"required"`
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	CreatedBy string    `json:"created_by" api:"required"`
	Name      string    `json:"name" api:"required"`
	// Any of "platform", "customer".
	OwnerType PolicySetOwnerType `json:"owner_type" api:"required"`
	// Any of "zone", "resource", "user", "session".
	ScopeType  PolicySetScopeType `json:"scope_type" api:"required"`
	UpdatedAt  time.Time          `json:"updated_at" api:"required" format:"date-time"`
	ZoneID     string             `json:"zone_id" api:"required"`
	ArchivedAt time.Time          `json:"archived_at" api:"nullable" format:"date-time"`
	// Human-readable version number of the latest version (e.g., 1, 2, 3)
	LatestVersion   int64  `json:"latest_version" api:"nullable"`
	LatestVersionID string `json:"latest_version_id" api:"nullable"`
	UpdatedBy       string `json:"updated_by" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		CreatedBy       respjson.Field
		Name            respjson.Field
		OwnerType       respjson.Field
		ScopeType       respjson.Field
		UpdatedAt       respjson.Field
		ZoneID          respjson.Field
		ArchivedAt      respjson.Field
		LatestVersion   respjson.Field
		LatestVersionID respjson.Field
		UpdatedBy       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PolicySet) RawJSON added in v0.6.0

func (r PolicySet) RawJSON() string

Returns the unmodified JSON received from the API

func (*PolicySet) UnmarshalJSON added in v0.6.0

func (r *PolicySet) UnmarshalJSON(data []byte) error

type PolicySetManifest added in v0.6.0

type PolicySetManifest struct {
	Entries []PolicySetManifestEntry `json:"entries" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Entries     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PolicySetManifest) RawJSON added in v0.6.0

func (r PolicySetManifest) RawJSON() string

Returns the unmodified JSON received from the API

func (PolicySetManifest) ToParam added in v0.6.0

ToParam converts this PolicySetManifest to a PolicySetManifestParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PolicySetManifestParam.Overrides()

func (*PolicySetManifest) UnmarshalJSON added in v0.6.0

func (r *PolicySetManifest) UnmarshalJSON(data []byte) error

type PolicySetManifestEntry added in v0.6.0

type PolicySetManifestEntry struct {
	PolicyID        string `json:"policy_id" api:"required"`
	PolicyVersionID string `json:"policy_version_id" api:"required"`
	// SHA-256 of the policy version content, populated by the server
	Sha string `json:"sha"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		PolicyID        respjson.Field
		PolicyVersionID respjson.Field
		Sha             respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PolicySetManifestEntry) RawJSON added in v0.6.0

func (r PolicySetManifestEntry) RawJSON() string

Returns the unmodified JSON received from the API

func (PolicySetManifestEntry) ToParam added in v0.6.0

ToParam converts this PolicySetManifestEntry to a PolicySetManifestEntryParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PolicySetManifestEntryParam.Overrides()

func (*PolicySetManifestEntry) UnmarshalJSON added in v0.6.0

func (r *PolicySetManifestEntry) UnmarshalJSON(data []byte) error

type PolicySetManifestEntryParam added in v0.6.0

type PolicySetManifestEntryParam struct {
	PolicyID        string `json:"policy_id" api:"required"`
	PolicyVersionID string `json:"policy_version_id" api:"required"`
	// SHA-256 of the policy version content, populated by the server
	Sha param.Opt[string] `json:"sha,omitzero"`
	// contains filtered or unexported fields
}

The properties PolicyID, PolicyVersionID are required.

func (PolicySetManifestEntryParam) MarshalJSON added in v0.6.0

func (r PolicySetManifestEntryParam) MarshalJSON() (data []byte, err error)

func (*PolicySetManifestEntryParam) UnmarshalJSON added in v0.6.0

func (r *PolicySetManifestEntryParam) UnmarshalJSON(data []byte) error

type PolicySetManifestParam added in v0.6.0

type PolicySetManifestParam struct {
	Entries []PolicySetManifestEntryParam `json:"entries,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Entries is required.

func (PolicySetManifestParam) MarshalJSON added in v0.6.0

func (r PolicySetManifestParam) MarshalJSON() (data []byte, err error)

func (*PolicySetManifestParam) UnmarshalJSON added in v0.6.0

func (r *PolicySetManifestParam) UnmarshalJSON(data []byte) error

type PolicySetOwnerType added in v0.6.0

type PolicySetOwnerType string
const (
	PolicySetOwnerTypePlatform PolicySetOwnerType = "platform"
	PolicySetOwnerTypeCustomer PolicySetOwnerType = "customer"
)

type PolicySetScopeType added in v0.6.0

type PolicySetScopeType string
const (
	PolicySetScopeTypeZone     PolicySetScopeType = "zone"
	PolicySetScopeTypeResource PolicySetScopeType = "resource"
	PolicySetScopeTypeUser     PolicySetScopeType = "user"
	PolicySetScopeTypeSession  PolicySetScopeType = "session"
)

type PolicySetVersion added in v0.6.0

type PolicySetVersion struct {
	ID        string            `json:"id" api:"required"`
	CreatedAt time.Time         `json:"created_at" api:"required" format:"date-time"`
	CreatedBy string            `json:"created_by" api:"required"`
	Manifest  PolicySetManifest `json:"manifest" api:"required"`
	// Hex-encoded SHA-256 of the canonicalized manifest
	ManifestSha   string `json:"manifest_sha" api:"required"`
	PolicySetID   string `json:"policy_set_id" api:"required"`
	SchemaVersion string `json:"schema_version" api:"required"`
	Version       int64  `json:"version" api:"required"`
	// Whether this policy set version is currently bound with mode='active'
	Active     bool      `json:"active"`
	ArchivedAt time.Time `json:"archived_at" api:"nullable" format:"date-time"`
	ArchivedBy string    `json:"archived_by" api:"nullable"`
	// JWS Flattened JSON Serialization (RFC 7515 §7.2.2) of a policy set attestation.
	// The protected header carries the signing algorithm and key identifier; the
	// payload is a base64url-encoded AttestationStatement canonicalized per RFC 8785
	// (JCS). Verify using the zone JWKS endpoint (RFC 7517). Currently signed with
	// RS256; future zone key types (e.g. EdDSA) will be indicated by the "alg" header
	// — no envelope changes required.
	Attestation Attestation `json:"attestation" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		CreatedBy     respjson.Field
		Manifest      respjson.Field
		ManifestSha   respjson.Field
		PolicySetID   respjson.Field
		SchemaVersion respjson.Field
		Version       respjson.Field
		Active        respjson.Field
		ArchivedAt    respjson.Field
		ArchivedBy    respjson.Field
		Attestation   respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PolicySetVersion) RawJSON added in v0.6.0

func (r PolicySetVersion) RawJSON() string

Returns the unmodified JSON received from the API

func (*PolicySetVersion) UnmarshalJSON added in v0.6.0

func (r *PolicySetVersion) UnmarshalJSON(data []byte) error

type PolicySetWithBinding added in v0.6.0

type PolicySetWithBinding struct {
	// Whether this policy set is currently bound to a scope
	Active bool `json:"active"`
	// Human-readable version number of the active version (e.g., 1, 2, 3)
	ActiveVersion int64 `json:"active_version" api:"nullable"`
	// Public ID of the currently active (bound) version
	ActiveVersionID string `json:"active_version_id" api:"nullable"`
	// Any of "active", "shadow".
	Mode          string `json:"mode" api:"nullable"`
	ScopeTargetID string `json:"scope_target_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Active          respjson.Field
		ActiveVersion   respjson.Field
		ActiveVersionID respjson.Field
		Mode            respjson.Field
		ScopeTargetID   respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	PolicySet
}

func (PolicySetWithBinding) RawJSON added in v0.6.0

func (r PolicySetWithBinding) RawJSON() string

Returns the unmodified JSON received from the API

func (*PolicySetWithBinding) UnmarshalJSON added in v0.6.0

func (r *PolicySetWithBinding) UnmarshalJSON(data []byte) error

type PolicyVersion added in v0.6.0

type PolicyVersion struct {
	ID            string    `json:"id" api:"required"`
	CreatedAt     time.Time `json:"created_at" api:"required" format:"date-time"`
	CreatedBy     string    `json:"created_by" api:"required"`
	PolicyID      string    `json:"policy_id" api:"required"`
	SchemaVersion string    `json:"schema_version" api:"required"`
	// Hex-encoded content hash
	Sha        string    `json:"sha" api:"required"`
	Version    int64     `json:"version" api:"required"`
	ZoneID     string    `json:"zone_id" api:"required"`
	ArchivedAt time.Time `json:"archived_at" api:"nullable" format:"date-time"`
	ArchivedBy string    `json:"archived_by" api:"nullable"`
	// Cedar policy in JSON representation. Populated when format=json (default).
	CedarJson any `json:"cedar_json" api:"nullable"`
	// Cedar policy in human-readable syntax. Populated when format=cedar.
	CedarRaw string `json:"cedar_raw" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		CreatedBy     respjson.Field
		PolicyID      respjson.Field
		SchemaVersion respjson.Field
		Sha           respjson.Field
		Version       respjson.Field
		ZoneID        respjson.Field
		ArchivedAt    respjson.Field
		ArchivedBy    respjson.Field
		CedarJson     respjson.Field
		CedarRaw      respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PolicyVersion) RawJSON added in v0.6.0

func (r PolicyVersion) RawJSON() string

Returns the unmodified JSON received from the API

func (*PolicyVersion) UnmarshalJSON added in v0.6.0

func (r *PolicyVersion) UnmarshalJSON(data []byte) error

type Provider

type Provider struct {
	// Unique identifier of the provider
	ID string `json:"id" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// User specified identifier, unique within the zone
	Identifier string `json:"identifier" api:"required"`
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Organization that owns this provider
	OrganizationID string `json:"organization_id" api:"required"`
	// Who owns this provider. Platform-owned providers cannot be modified via API.
	//
	// Any of "platform", "customer".
	OwnerType ProviderOwnerType `json:"owner_type" api:"required"`
	// URL-safe identifier, unique within the zone
	Slug string `json:"slug" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Zone this provider belongs to
	ZoneID string `json:"zone_id" api:"required"`
	// OAuth 2.0 client identifier
	ClientID string `json:"client_id" api:"nullable"`
	// Indicates whether a client secret is configured
	ClientSecretSet bool `json:"client_secret_set"`
	// Human-readable description
	Description string `json:"description" api:"nullable"`
	// Provider metadata
	Metadata any `json:"metadata" api:"nullable"`
	// Protocol-specific configuration
	Protocols ProviderProtocols `json:"protocols" api:"nullable"`
	// Any of "external", "keycard-vault", "keycard-sts".
	Type ProviderType `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		Identifier      respjson.Field
		Name            respjson.Field
		OrganizationID  respjson.Field
		OwnerType       respjson.Field
		Slug            respjson.Field
		UpdatedAt       respjson.Field
		ZoneID          respjson.Field
		ClientID        respjson.Field
		ClientSecretSet respjson.Field
		Description     respjson.Field
		Metadata        respjson.Field
		Protocols       respjson.Field
		Type            respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A Provider is a system that supplies access to Resources and allows actors (Users or Applications) to authenticate.

func (Provider) RawJSON

func (r Provider) RawJSON() string

Returns the unmodified JSON received from the API

func (*Provider) UnmarshalJSON

func (r *Provider) UnmarshalJSON(data []byte) error

type ProviderOwnerType

type ProviderOwnerType string

Who owns this provider. Platform-owned providers cannot be modified via API.

const (
	ProviderOwnerTypePlatform ProviderOwnerType = "platform"
	ProviderOwnerTypeCustomer ProviderOwnerType = "customer"
)

type ProviderProtocols

type ProviderProtocols struct {
	// OAuth 2.0 protocol configuration
	Oauth2 ProviderProtocolsOauth2 `json:"oauth2" api:"nullable"`
	// OpenID Connect protocol configuration
	Openid ProviderProtocolsOpenid `json:"openid" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Oauth2      respjson.Field
		Openid      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Protocol-specific configuration

func (ProviderProtocols) RawJSON

func (r ProviderProtocols) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProviderProtocols) UnmarshalJSON

func (r *ProviderProtocols) UnmarshalJSON(data []byte) error

type ProviderProtocolsOauth2

type ProviderProtocolsOauth2 struct {
	// OIDC issuer URL used for discovery and token validation.
	Issuer                string `json:"issuer" api:"required" format:"uri"`
	AuthorizationEndpoint string `json:"authorization_endpoint" api:"nullable" format:"uri"`
	// Custom query parameters appended to authorization redirect URLs. Use for
	// non-standard providers (e.g. Google prompt=consent, access_type=offline).
	AuthorizationParameters map[string]string `json:"authorization_parameters" api:"nullable"`
	// Whether to include the resource parameter in authorization requests.
	AuthorizationResourceEnabled bool `json:"authorization_resource_enabled" api:"nullable"`
	// The resource parameter value to include in authorization requests. Defaults to
	// "resource" when authorization_resource_enabled is true.
	AuthorizationResourceParameter string   `json:"authorization_resource_parameter" api:"nullable"`
	CodeChallengeMethodsSupported  []string `json:"code_challenge_methods_supported" api:"nullable"`
	JwksUri                        string   `json:"jwks_uri" api:"nullable" format:"uri"`
	RegistrationEndpoint           string   `json:"registration_endpoint" api:"nullable" format:"uri"`
	// The query parameter name for scopes in authorization requests. Defaults to
	// "scope". Slack v2 uses "user_scope".
	ScopeParameter string `json:"scope_parameter" api:"nullable"`
	// The separator character for scope values. Defaults to " " (space). Slack v2 uses
	// ",".
	ScopeSeparator  string   `json:"scope_separator" api:"nullable"`
	ScopesSupported []string `json:"scopes_supported" api:"nullable"`
	TokenEndpoint   string   `json:"token_endpoint" api:"nullable" format:"uri"`
	// Dot-separated path to the access token in the token response body. Defaults to
	// "access_token". Slack v2 uses "authed_user.access_token".
	TokenResponseAccessTokenPointer string `json:"token_response_access_token_pointer" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Issuer                          respjson.Field
		AuthorizationEndpoint           respjson.Field
		AuthorizationParameters         respjson.Field
		AuthorizationResourceEnabled    respjson.Field
		AuthorizationResourceParameter  respjson.Field
		CodeChallengeMethodsSupported   respjson.Field
		JwksUri                         respjson.Field
		RegistrationEndpoint            respjson.Field
		ScopeParameter                  respjson.Field
		ScopeSeparator                  respjson.Field
		ScopesSupported                 respjson.Field
		TokenEndpoint                   respjson.Field
		TokenResponseAccessTokenPointer respjson.Field
		ExtraFields                     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OAuth 2.0 protocol configuration

func (ProviderProtocolsOauth2) RawJSON

func (r ProviderProtocolsOauth2) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProviderProtocolsOauth2) UnmarshalJSON

func (r *ProviderProtocolsOauth2) UnmarshalJSON(data []byte) error

type ProviderProtocolsOpenid

type ProviderProtocolsOpenid struct {
	UserinfoEndpoint string `json:"userinfo_endpoint" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		UserinfoEndpoint respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpenID Connect protocol configuration

func (ProviderProtocolsOpenid) RawJSON

func (r ProviderProtocolsOpenid) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProviderProtocolsOpenid) UnmarshalJSON

func (r *ProviderProtocolsOpenid) UnmarshalJSON(data []byte) error

type ProviderType

type ProviderType string
const (
	ProviderTypeExternal     ProviderType = "external"
	ProviderTypeKeycardVault ProviderType = "keycard-vault"
	ProviderTypeKeycardSts   ProviderType = "keycard-sts"
)

type Public

type Public struct {
	// Identifier for public credential, also used as OAuth 2.0 client ID
	Identifier string `json:"identifier" api:"required"`
	// Any of "public".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Identifier  respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	BaseFields
}

Public credential (no secret storage)

func (Public) RawJSON

func (r Public) RawJSON() string

Returns the unmodified JSON received from the API

func (*Public) UnmarshalJSON

func (r *Public) UnmarshalJSON(data []byte) error

type PublicKey

type PublicKey struct {
	// Client ID for public key credential, also used as OAuth 2.0 client ID
	Identifier string `json:"identifier" api:"required"`
	// JWKS URI to retrieve public keys from
	JwksUri string `json:"jwks_uri" api:"required" format:"uri"`
	// Any of "public-key".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Identifier  respjson.Field
		JwksUri     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	BaseFields
}

Public key-based application credential

func (PublicKey) RawJSON

func (r PublicKey) RawJSON() string

Returns the unmodified JSON received from the API

func (*PublicKey) UnmarshalJSON

func (r *PublicKey) UnmarshalJSON(data []byte) error

type Resource

type Resource struct {
	// Unique identifier of the resource
	ID string `json:"id" api:"required"`
	// The expected type of client for this credential. Native clients must use
	// localhost URLs for redirect_uris or URIs with custom schemes. Web clients must
	// use https URLs and must not use localhost as the hostname.
	//
	// Any of "native", "web".
	ApplicationType ResourceApplicationType `json:"application_type" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// User specified identifier, unique within the zone
	Identifier string `json:"identifier" api:"required"`
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Organization that owns this resource
	OrganizationID string `json:"organization_id" api:"required"`
	// Who owns this resource. Platform-owned resources cannot be modified via API.
	//
	// Any of "platform", "customer".
	OwnerType ResourceOwnerType `json:"owner_type" api:"required"`
	// URL-safe identifier, unique within the zone
	Slug string `json:"slug" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Zone this resource belongs to
	ZoneID string `json:"zone_id" api:"required"`
	// An Application is a software system with an associated identity that can access
	// Resources. It may act on its own behalf (machine-to-machine) or on behalf of a
	// user (delegated access).
	//
	// Deprecated: deprecated
	Application Application `json:"application"`
	// ID of the application that provides this resource
	ApplicationID string `json:"application_id"`
	// A Provider is a system that supplies access to Resources and allows actors
	// (Users or Applications) to authenticate.
	//
	// Deprecated: deprecated
	CredentialProvider Provider `json:"credential_provider"`
	// ID of the credential provider for this resource
	CredentialProviderID string `json:"credential_provider_id"`
	// Human-readable description
	Description string `json:"description" api:"nullable"`
	// Entity metadata
	Metadata Metadata `json:"metadata"`
	// Scopes supported by the resource
	Scopes []string `json:"scopes" api:"nullable"`
	// List of resource IDs that, when accessed, make this dependency available. Only
	// present when this resource is returned as a dependency.
	WhenAccessing []string `json:"when_accessing"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		ApplicationType      respjson.Field
		CreatedAt            respjson.Field
		Identifier           respjson.Field
		Name                 respjson.Field
		OrganizationID       respjson.Field
		OwnerType            respjson.Field
		Slug                 respjson.Field
		UpdatedAt            respjson.Field
		ZoneID               respjson.Field
		Application          respjson.Field
		ApplicationID        respjson.Field
		CredentialProvider   respjson.Field
		CredentialProviderID respjson.Field
		Description          respjson.Field
		Metadata             respjson.Field
		Scopes               respjson.Field
		WhenAccessing        respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A Resource is a system that exposes protected information or functionality. It requires authentication of the requesting actor, which may be a user or application, before allowing access.

func (Resource) RawJSON

func (r Resource) RawJSON() string

Returns the unmodified JSON received from the API

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

type ResourceApplicationType

type ResourceApplicationType string

The expected type of client for this credential. Native clients must use localhost URLs for redirect_uris or URIs with custom schemes. Web clients must use https URLs and must not use localhost as the hostname.

const (
	ResourceApplicationTypeNative ResourceApplicationType = "native"
	ResourceApplicationTypeWeb    ResourceApplicationType = "web"
)

type ResourceOwnerType

type ResourceOwnerType string

Who owns this resource. Platform-owned resources cannot be modified via API.

const (
	ResourceOwnerTypePlatform ResourceOwnerType = "platform"
	ResourceOwnerTypeCustomer ResourceOwnerType = "customer"
)

type RoleScope

type RoleScope string

The scope at which a role can be assigned.

- organization: Roles that apply at the organization level (e.g., org_admin) - zone: Roles that apply at the zone level (e.g., zone_manager)

const (
	RoleScopeOrganization RoleScope = "organization"
	RoleScopeZone         RoleScope = "zone"
)

type SSOConnection

type SSOConnection struct {
	// Unique identifier for the SSO connection
	ID string `json:"id" api:"required"`
	// OAuth 2.0 client ID
	ClientID string `json:"client_id" api:"required"`
	// Whether a client secret is configured
	ClientSecretSet bool `json:"client_secret_set" api:"required"`
	// The time the entity was created in utc
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// SSO provider identifier (e.g., issuer URL)
	Identifier string `json:"identifier" api:"required"`
	// The time the entity was mostly recently updated in utc
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// Protocol configuration for SSO connection
	Protocols SSOConnectionProtocol `json:"protocols" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		ClientID        respjson.Field
		ClientSecretSet respjson.Field
		CreatedAt       respjson.Field
		Identifier      respjson.Field
		UpdatedAt       respjson.Field
		Permissions     respjson.Field
		Protocols       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

SSO connection configuration for an organization

func (SSOConnection) RawJSON

func (r SSOConnection) RawJSON() string

Returns the unmodified JSON received from the API

func (*SSOConnection) UnmarshalJSON

func (r *SSOConnection) UnmarshalJSON(data []byte) error

type SSOConnectionProtocol

type SSOConnectionProtocol struct {
	// OAuth 2.0 protocol configuration for SSO connection
	Oauth2 SSOConnectionProtocolOauth2 `json:"oauth2" api:"nullable"`
	// OpenID Connect protocol configuration for SSO connection
	Openid SSOConnectionProtocolOpenid `json:"openid" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Oauth2      respjson.Field
		Openid      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Protocol configuration for SSO connection

func (SSOConnectionProtocol) RawJSON

func (r SSOConnectionProtocol) RawJSON() string

Returns the unmodified JSON received from the API

func (SSOConnectionProtocol) ToParam

ToParam converts this SSOConnectionProtocol to a SSOConnectionProtocolParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SSOConnectionProtocolParam.Overrides()

func (*SSOConnectionProtocol) UnmarshalJSON

func (r *SSOConnectionProtocol) UnmarshalJSON(data []byte) error

type SSOConnectionProtocolOauth2

type SSOConnectionProtocolOauth2 struct {
	// OAuth 2.0 authorization endpoint
	AuthorizationEndpoint string `json:"authorization_endpoint" api:"nullable" format:"uri"`
	// Supported PKCE code challenge methods
	CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported" api:"nullable"`
	// JSON Web Key Set endpoint
	JwksUri string `json:"jwks_uri" api:"nullable" format:"uri"`
	// OAuth 2.0 registration endpoint
	RegistrationEndpoint string `json:"registration_endpoint" api:"nullable" format:"uri"`
	// Supported OAuth 2.0 scopes
	ScopesSupported []string `json:"scopes_supported" api:"nullable"`
	// OAuth 2.0 token endpoint
	TokenEndpoint string `json:"token_endpoint" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AuthorizationEndpoint         respjson.Field
		CodeChallengeMethodsSupported respjson.Field
		JwksUri                       respjson.Field
		RegistrationEndpoint          respjson.Field
		ScopesSupported               respjson.Field
		TokenEndpoint                 respjson.Field
		ExtraFields                   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OAuth 2.0 protocol configuration for SSO connection

func (SSOConnectionProtocolOauth2) RawJSON

func (r SSOConnectionProtocolOauth2) RawJSON() string

Returns the unmodified JSON received from the API

func (*SSOConnectionProtocolOauth2) UnmarshalJSON

func (r *SSOConnectionProtocolOauth2) UnmarshalJSON(data []byte) error

type SSOConnectionProtocolOauth2Param

type SSOConnectionProtocolOauth2Param struct {
	// OAuth 2.0 authorization endpoint
	AuthorizationEndpoint param.Opt[string] `json:"authorization_endpoint,omitzero" format:"uri"`
	// JSON Web Key Set endpoint
	JwksUri param.Opt[string] `json:"jwks_uri,omitzero" format:"uri"`
	// OAuth 2.0 registration endpoint
	RegistrationEndpoint param.Opt[string] `json:"registration_endpoint,omitzero" format:"uri"`
	// OAuth 2.0 token endpoint
	TokenEndpoint param.Opt[string] `json:"token_endpoint,omitzero" format:"uri"`
	// Supported PKCE code challenge methods
	CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported,omitzero"`
	// Supported OAuth 2.0 scopes
	ScopesSupported []string `json:"scopes_supported,omitzero"`
	// contains filtered or unexported fields
}

OAuth 2.0 protocol configuration for SSO connection

func (SSOConnectionProtocolOauth2Param) MarshalJSON

func (r SSOConnectionProtocolOauth2Param) MarshalJSON() (data []byte, err error)

func (*SSOConnectionProtocolOauth2Param) UnmarshalJSON

func (r *SSOConnectionProtocolOauth2Param) UnmarshalJSON(data []byte) error

type SSOConnectionProtocolOpenid

type SSOConnectionProtocolOpenid struct {
	// OpenID Connect UserInfo endpoint
	UserinfoEndpoint string `json:"userinfo_endpoint" api:"nullable" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		UserinfoEndpoint respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpenID Connect protocol configuration for SSO connection

func (SSOConnectionProtocolOpenid) RawJSON

func (r SSOConnectionProtocolOpenid) RawJSON() string

Returns the unmodified JSON received from the API

func (*SSOConnectionProtocolOpenid) UnmarshalJSON

func (r *SSOConnectionProtocolOpenid) UnmarshalJSON(data []byte) error

type SSOConnectionProtocolOpenidParam

type SSOConnectionProtocolOpenidParam struct {
	// OpenID Connect UserInfo endpoint
	UserinfoEndpoint param.Opt[string] `json:"userinfo_endpoint,omitzero" format:"uri"`
	// contains filtered or unexported fields
}

OpenID Connect protocol configuration for SSO connection

func (SSOConnectionProtocolOpenidParam) MarshalJSON

func (r SSOConnectionProtocolOpenidParam) MarshalJSON() (data []byte, err error)

func (*SSOConnectionProtocolOpenidParam) UnmarshalJSON

func (r *SSOConnectionProtocolOpenidParam) UnmarshalJSON(data []byte) error

type SSOConnectionProtocolParam

type SSOConnectionProtocolParam struct {
	// OAuth 2.0 protocol configuration for SSO connection
	Oauth2 SSOConnectionProtocolOauth2Param `json:"oauth2,omitzero"`
	// OpenID Connect protocol configuration for SSO connection
	Openid SSOConnectionProtocolOpenidParam `json:"openid,omitzero"`
	// contains filtered or unexported fields
}

Protocol configuration for SSO connection

func (SSOConnectionProtocolParam) MarshalJSON

func (r SSOConnectionProtocolParam) MarshalJSON() (data []byte, err error)

func (*SSOConnectionProtocolParam) UnmarshalJSON

func (r *SSOConnectionProtocolParam) UnmarshalJSON(data []byte) error

type SchemaVersion added in v0.6.0

type SchemaVersion struct {
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Any of "active", "deprecated", "archived".
	Status     SchemaVersionStatus `json:"status" api:"required"`
	UpdatedAt  time.Time           `json:"updated_at" api:"required" format:"date-time"`
	Version    string              `json:"version" api:"required"`
	ArchivedAt time.Time           `json:"archived_at" api:"nullable" format:"date-time"`
	// Cedar schema in human-readable syntax. Populated when format=cedar.
	CedarSchema string `json:"cedar_schema" api:"nullable"`
	// Cedar schema as JSON object. Populated when format=json (default).
	CedarSchemaJson any       `json:"cedar_schema_json" api:"nullable"`
	DeprecatedAt    time.Time `json:"deprecated_at" api:"nullable" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CreatedAt       respjson.Field
		Status          respjson.Field
		UpdatedAt       respjson.Field
		Version         respjson.Field
		ArchivedAt      respjson.Field
		CedarSchema     respjson.Field
		CedarSchemaJson respjson.Field
		DeprecatedAt    respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SchemaVersion) RawJSON added in v0.6.0

func (r SchemaVersion) RawJSON() string

Returns the unmodified JSON received from the API

func (*SchemaVersion) UnmarshalJSON added in v0.6.0

func (r *SchemaVersion) UnmarshalJSON(data []byte) error

type SchemaVersionStatus added in v0.6.0

type SchemaVersionStatus string
const (
	SchemaVersionStatusActive     SchemaVersionStatus = "active"
	SchemaVersionStatusDeprecated SchemaVersionStatus = "deprecated"
	SchemaVersionStatusArchived   SchemaVersionStatus = "archived"
)

type SchemaVersionWithZoneInfo added in v0.6.0

type SchemaVersionWithZoneInfo struct {
	IsDefault bool `json:"is_default" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsDefault   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	SchemaVersion
}

func (SchemaVersionWithZoneInfo) RawJSON added in v0.6.0

func (r SchemaVersionWithZoneInfo) RawJSON() string

Returns the unmodified JSON received from the API

func (*SchemaVersionWithZoneInfo) UnmarshalJSON added in v0.6.0

func (r *SchemaVersionWithZoneInfo) UnmarshalJSON(data []byte) error

type Secret

type Secret struct {
	// A globally unique opaque identifier
	ID        string    `json:"id" api:"required"`
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A globally unique opaque identifier
	EntityID string `json:"entity_id" api:"required"`
	// A name for the entity to be displayed in UI
	Name string `json:"name" api:"required"`
	// Any of "token", "password".
	Type      SecretType `json:"type" api:"required"`
	UpdatedAt time.Time  `json:"updated_at" api:"required" format:"date-time"`
	Version   int64      `json:"version" api:"required"`
	// A globally unique opaque identifier
	ZoneID string `json:"zone_id" api:"required"`
	// A description of the entity
	Description string `json:"description"`
	// A JSON object containing arbitrary metadata. Metadata will not be encrypted.
	Metadata any `json:"metadata"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		EntityID    respjson.Field
		Name        respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		Version     respjson.Field
		ZoneID      respjson.Field
		Description respjson.Field
		Metadata    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Secret) RawJSON

func (r Secret) RawJSON() string

Returns the unmodified JSON received from the API

func (*Secret) UnmarshalJSON

func (r *Secret) UnmarshalJSON(data []byte) error

type SecretPasswordFields

type SecretPasswordFields struct {
	Password string `json:"password" api:"required"`
	// Any of "password".
	Type     SecretPasswordFieldsType `json:"type" api:"required"`
	Username string                   `json:"username" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Password    respjson.Field
		Type        respjson.Field
		Username    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SecretPasswordFields) RawJSON

func (r SecretPasswordFields) RawJSON() string

Returns the unmodified JSON received from the API

func (SecretPasswordFields) ToParam

ToParam converts this SecretPasswordFields to a SecretPasswordFieldsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SecretPasswordFieldsParam.Overrides()

func (*SecretPasswordFields) UnmarshalJSON

func (r *SecretPasswordFields) UnmarshalJSON(data []byte) error

type SecretPasswordFieldsParam

type SecretPasswordFieldsParam struct {
	Password string `json:"password" api:"required"`
	// Any of "password".
	Type     SecretPasswordFieldsType `json:"type,omitzero" api:"required"`
	Username string                   `json:"username" api:"required"`
	// contains filtered or unexported fields
}

The properties Password, Type, Username are required.

func (SecretPasswordFieldsParam) MarshalJSON

func (r SecretPasswordFieldsParam) MarshalJSON() (data []byte, err error)

func (*SecretPasswordFieldsParam) UnmarshalJSON

func (r *SecretPasswordFieldsParam) UnmarshalJSON(data []byte) error

type SecretPasswordFieldsType

type SecretPasswordFieldsType string
const (
	SecretPasswordFieldsTypePassword SecretPasswordFieldsType = "password"
)

type SecretTokenFields

type SecretTokenFields struct {
	Token string `json:"token" api:"required"`
	// Any of "token".
	Type SecretTokenFieldsType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Token       respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SecretTokenFields) RawJSON

func (r SecretTokenFields) RawJSON() string

Returns the unmodified JSON received from the API

func (SecretTokenFields) ToParam

ToParam converts this SecretTokenFields to a SecretTokenFieldsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SecretTokenFieldsParam.Overrides()

func (*SecretTokenFields) UnmarshalJSON

func (r *SecretTokenFields) UnmarshalJSON(data []byte) error

type SecretTokenFieldsParam

type SecretTokenFieldsParam struct {
	Token string `json:"token" api:"required"`
	// Any of "token".
	Type SecretTokenFieldsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The properties Token, Type are required.

func (SecretTokenFieldsParam) MarshalJSON

func (r SecretTokenFieldsParam) MarshalJSON() (data []byte, err error)

func (*SecretTokenFieldsParam) UnmarshalJSON

func (r *SecretTokenFieldsParam) UnmarshalJSON(data []byte) error

type SecretTokenFieldsType

type SecretTokenFieldsType string
const (
	SecretTokenFieldsTypeToken SecretTokenFieldsType = "token"
)

type SecretType

type SecretType string
const (
	SecretTypeToken    SecretType = "token"
	SecretTypePassword SecretType = "password"
)

type ServiceAccount

type ServiceAccount struct {
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	ID string `json:"id" api:"required"`
	// The time the entity was created in utc
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A name for the entity to be displayed in UI
	Name string `json:"name" api:"required"`
	// The time the entity was mostly recently updated in utc
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Optional description of the service account
	Description string `json:"description"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		UpdatedAt   respjson.Field
		Description respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ServiceAccount) RawJSON

func (r ServiceAccount) RawJSON() string

Returns the unmodified JSON received from the API

func (*ServiceAccount) UnmarshalJSON

func (r *ServiceAccount) UnmarshalJSON(data []byte) error

type ServiceAccountCredential

type ServiceAccountCredential struct {
	// Identifier for API resources. A 26-char nanoid (URL/DNS safe).
	ID string `json:"id" api:"required"`
	// The client ID for authentication
	ClientID string `json:"client_id" api:"required"`
	// The time the entity was created in utc
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A name for the entity to be displayed in UI
	Name string `json:"name" api:"required"`
	// Optional description of the credential
	Description string `json:"description"`
	// When the credential was last used
	LastUsedAt time.Time `json:"last_used_at" format:"date-time"`
	// Permissions granted to the authenticated principal for this resource. Only
	// populated when the 'expand[]=permissions' query parameter is provided. Keys are
	// resource types (e.g., "organizations"), values are objects mapping permission
	// names to boolean values indicating if the permission is granted.
	Permissions map[string]map[string]bool `json:"permissions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ClientID    respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Description respjson.Field
		LastUsedAt  respjson.Field
		Permissions respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Service account credential (without secret)

func (ServiceAccountCredential) RawJSON

func (r ServiceAccountCredential) RawJSON() string

Returns the unmodified JSON received from the API

func (*ServiceAccountCredential) UnmarshalJSON

func (r *ServiceAccountCredential) UnmarshalJSON(data []byte) error

type SessionApplicationSessionType

type SessionApplicationSessionType struct {
	// Application ID that initiated this session
	ApplicationID string `json:"application_id" api:"required"`
	// Issuer URL from IdP
	Issuer string `json:"issuer" api:"required" format:"uri"`
	// Provider ID
	ProviderID string `json:"provider_id" api:"required"`
	// Any of "application".
	SessionType string `json:"session_type" api:"required"`
	// Subject claim from IdP
	Subject string `json:"subject" api:"required"`
	// Session ID
	ID string `json:"id"`
	// Whether the session is currently active (deprecated - use status instead)
	//
	// Deprecated: deprecated
	Active bool `json:"active"`
	// An Application is a software system with an associated identity that can access
	// Resources. It may act on its own behalf (machine-to-machine) or on behalf of a
	// user (delegated access).
	//
	// Deprecated: deprecated
	Application Application `json:"application"`
	// Date when the session was authenticated
	AuthenticatedAt time.Time `json:"authenticated_at" format:"date-time"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Date when session expires
	ExpiresAt time.Time `json:"expires_at" format:"date-time"`
	// Session metadata
	Metadata SessionApplicationSessionTypeMetadata `json:"metadata"`
	// Organization that owns this session
	OrganizationID string `json:"organization_id"`
	// Session claims data (ID token claims for users, application claims for
	// applications)
	SessionData map[string]any `json:"session_data"`
	// Any of "active", "expired", "revoked".
	Status string `json:"status"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" format:"date-time"`
	// Zone this session belongs to
	ZoneID string `json:"zone_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApplicationID   respjson.Field
		Issuer          respjson.Field
		ProviderID      respjson.Field
		SessionType     respjson.Field
		Subject         respjson.Field
		ID              respjson.Field
		Active          respjson.Field
		Application     respjson.Field
		AuthenticatedAt respjson.Field
		CreatedAt       respjson.Field
		ExpiresAt       respjson.Field
		Metadata        respjson.Field
		OrganizationID  respjson.Field
		SessionData     respjson.Field
		Status          respjson.Field
		UpdatedAt       respjson.Field
		ZoneID          respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Application session type-specific fields

func (SessionApplicationSessionType) RawJSON

Returns the unmodified JSON received from the API

func (*SessionApplicationSessionType) UnmarshalJSON

func (r *SessionApplicationSessionType) UnmarshalJSON(data []byte) error

type SessionApplicationSessionTypeMetadata

type SessionApplicationSessionTypeMetadata struct {
	// Name of the initiating application or user agent
	Name string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Session metadata

func (SessionApplicationSessionTypeMetadata) RawJSON

Returns the unmodified JSON received from the API

func (*SessionApplicationSessionTypeMetadata) UnmarshalJSON

func (r *SessionApplicationSessionTypeMetadata) UnmarshalJSON(data []byte) error

type SessionUnion

type SessionUnion struct {
	SessionType string `json:"session_type"`
	// This field is from variant [SessionUserSessionType].
	UserID string `json:"user_id"`
	ID     string `json:"id"`
	Active bool   `json:"active"`
	// This field is from variant [SessionUserSessionType].
	Application     Application `json:"application"`
	ApplicationID   string      `json:"application_id"`
	AuthenticatedAt time.Time   `json:"authenticated_at"`
	CreatedAt       time.Time   `json:"created_at"`
	ExpiresAt       time.Time   `json:"expires_at"`
	Issuer          string      `json:"issuer"`
	// This field is a union of [SessionUserSessionTypeMetadata],
	// [SessionApplicationSessionTypeMetadata]
	Metadata       SessionUnionMetadata `json:"metadata"`
	OrganizationID string               `json:"organization_id"`
	// This field is from variant [SessionUserSessionType].
	ParentID    string    `json:"parent_id"`
	ProviderID  string    `json:"provider_id"`
	SessionData any       `json:"session_data"`
	Status      string    `json:"status"`
	Subject     string    `json:"subject"`
	UpdatedAt   time.Time `json:"updated_at"`
	// This field is from variant [SessionUserSessionType].
	User User `json:"user"`
	// This field is from variant [SessionUserSessionType].
	UserAgent UserAgent `json:"user_agent"`
	// This field is from variant [SessionUserSessionType].
	UserAgentID string `json:"user_agent_id"`
	ZoneID      string `json:"zone_id"`
	JSON        struct {
		SessionType     respjson.Field
		UserID          respjson.Field
		ID              respjson.Field
		Active          respjson.Field
		Application     respjson.Field
		ApplicationID   respjson.Field
		AuthenticatedAt respjson.Field
		CreatedAt       respjson.Field
		ExpiresAt       respjson.Field
		Issuer          respjson.Field
		Metadata        respjson.Field
		OrganizationID  respjson.Field
		ParentID        respjson.Field
		ProviderID      respjson.Field
		SessionData     respjson.Field
		Status          respjson.Field
		Subject         respjson.Field
		UpdatedAt       respjson.Field
		User            respjson.Field
		UserAgent       respjson.Field
		UserAgentID     respjson.Field
		ZoneID          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

SessionUnion contains all possible properties and values from SessionUserSessionType, SessionApplicationSessionType.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (SessionUnion) AsApplicationSessionType

func (u SessionUnion) AsApplicationSessionType() (v SessionApplicationSessionType)

func (SessionUnion) AsUserSessionType

func (u SessionUnion) AsUserSessionType() (v SessionUserSessionType)

func (SessionUnion) RawJSON

func (u SessionUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*SessionUnion) UnmarshalJSON

func (r *SessionUnion) UnmarshalJSON(data []byte) error

type SessionUnionMetadata

type SessionUnionMetadata struct {
	Name string `json:"name"`
	JSON struct {
		Name respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

SessionUnionMetadata is an implicit subunion of SessionUnion. SessionUnionMetadata provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the SessionUnion.

func (*SessionUnionMetadata) UnmarshalJSON

func (r *SessionUnionMetadata) UnmarshalJSON(data []byte) error

type SessionUserSessionType

type SessionUserSessionType struct {
	// Any of "user".
	SessionType string `json:"session_type" api:"required"`
	// User ID
	UserID string `json:"user_id" api:"required"`
	// Session ID
	ID string `json:"id"`
	// Whether the session is currently active (deprecated - use status instead)
	//
	// Deprecated: deprecated
	Active bool `json:"active"`
	// An Application is a software system with an associated identity that can access
	// Resources. It may act on its own behalf (machine-to-machine) or on behalf of a
	// user (delegated access).
	//
	// Deprecated: deprecated
	Application Application `json:"application"`
	// Application ID that initiated this session
	ApplicationID string `json:"application_id"`
	// Date when the session was authenticated
	AuthenticatedAt time.Time `json:"authenticated_at" format:"date-time"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Date when session expires
	ExpiresAt time.Time `json:"expires_at" format:"date-time"`
	// Issuer URL from IdP
	Issuer string `json:"issuer" format:"uri"`
	// Session metadata
	Metadata SessionUserSessionTypeMetadata `json:"metadata"`
	// Organization that owns this session
	OrganizationID string `json:"organization_id"`
	// Parent session ID for hierarchical sessions (user sessions only). When null,
	// this is a web session - a top-level session initiated directly by a user. When
	// set, this is a child session derived from the parent, used for token refresh or
	// delegation. Application sessions cannot have parents.
	ParentID string `json:"parent_id"`
	// Provider ID
	ProviderID string `json:"provider_id"`
	// Session claims data (ID token claims for users, application claims for
	// applications)
	SessionData map[string]any `json:"session_data"`
	// Any of "active", "expired", "revoked".
	Status string `json:"status"`
	// Subject claim from IdP
	Subject string `json:"subject"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" format:"date-time"`
	// An authenticated user entity
	//
	// Deprecated: deprecated
	User User `json:"user"`
	// A User Agent represents a user agent (browser, desktop app, CLI tool) that can
	// initiate user sessions via OAuth 2.0 Dynamic Client Registration.
	//
	// Deprecated: deprecated
	UserAgent UserAgent `json:"user_agent"`
	// User agent ID (browser/client) that initiated this session
	UserAgentID string `json:"user_agent_id"`
	// Zone this session belongs to
	ZoneID string `json:"zone_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SessionType     respjson.Field
		UserID          respjson.Field
		ID              respjson.Field
		Active          respjson.Field
		Application     respjson.Field
		ApplicationID   respjson.Field
		AuthenticatedAt respjson.Field
		CreatedAt       respjson.Field
		ExpiresAt       respjson.Field
		Issuer          respjson.Field
		Metadata        respjson.Field
		OrganizationID  respjson.Field
		ParentID        respjson.Field
		ProviderID      respjson.Field
		SessionData     respjson.Field
		Status          respjson.Field
		Subject         respjson.Field
		UpdatedAt       respjson.Field
		User            respjson.Field
		UserAgent       respjson.Field
		UserAgentID     respjson.Field
		ZoneID          respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

User session type-specific fields

func (SessionUserSessionType) RawJSON

func (r SessionUserSessionType) RawJSON() string

Returns the unmodified JSON received from the API

func (*SessionUserSessionType) UnmarshalJSON

func (r *SessionUserSessionType) UnmarshalJSON(data []byte) error

type SessionUserSessionTypeMetadata

type SessionUserSessionTypeMetadata struct {
	// Name of the initiating application or user agent
	Name string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Session metadata

func (SessionUserSessionTypeMetadata) RawJSON

Returns the unmodified JSON received from the API

func (*SessionUserSessionTypeMetadata) UnmarshalJSON

func (r *SessionUserSessionTypeMetadata) UnmarshalJSON(data []byte) error

type Token

type Token struct {
	// Identifier for this credential. For token type, this equals the subject value,
	// or '\*' when subject is not specified.
	Identifier string `json:"identifier" api:"required"`
	// ID of the provider issuing tokens verified by this credential
	ProviderID string `json:"provider_id" api:"required"`
	// Any of "token".
	Type string `json:"type" api:"required"`
	// A Provider is a system that supplies access to Resources and allows actors
	// (Users or Applications) to authenticate.
	//
	// Deprecated: deprecated
	Provider Provider `json:"provider"`
	// Subject identifier for the token. When null or omitted, any token from the
	// provider is accepted without checking application-specific claims.
	Subject string `json:"subject" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Identifier  respjson.Field
		ProviderID  respjson.Field
		Type        respjson.Field
		Provider    respjson.Field
		Subject     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	BaseFields
}

Token-based application credential

func (Token) RawJSON

func (r Token) RawJSON() string

Returns the unmodified JSON received from the API

func (*Token) UnmarshalJSON

func (r *Token) UnmarshalJSON(data []byte) error

type TokenResponse

type TokenResponse struct {
	// The M2M access token
	AccessToken string `json:"access_token" api:"required"`
	// Token type (always "Bearer")
	TokenType string `json:"token_type" api:"required"`
	// Token expiration time in seconds
	ExpiresIn int64 `json:"expires_in"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AccessToken respjson.Field
		TokenType   respjson.Field
		ExpiresIn   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OAuth2-style token response for M2M tokens

func (TokenResponse) RawJSON

func (r TokenResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TokenResponse) UnmarshalJSON

func (r *TokenResponse) UnmarshalJSON(data []byte) error

type URL

type URL struct {
	// URL of the credential (must be a valid URL)
	Identifier string `json:"identifier" api:"required" format:"uri"`
	// Any of "url".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Identifier  respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	BaseFields
}

URL-based application credential

func (URL) RawJSON

func (r URL) RawJSON() string

Returns the unmodified JSON received from the API

func (*URL) UnmarshalJSON

func (r *URL) UnmarshalJSON(data []byte) error

type User

type User struct {
	// Unique identifier of the user
	ID string `json:"id" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Email address of the user
	Email string `json:"email" api:"required" format:"email"`
	// Whether the email address has been verified
	EmailVerified bool `json:"email_verified" api:"required"`
	// Organization that owns this user
	OrganizationID string `json:"organization_id" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Zone this user belongs to
	ZoneID string `json:"zone_id" api:"required"`
	// Date when the user was last authenticated
	AuthenticatedAt string `json:"authenticated_at"`
	// Issuer identifier of the identity provider
	Issuer string `json:"issuer"`
	// Reference to the identity provider. This field is undefined when the source
	// identity provider is deleted but the user is not deleted.
	ProviderID string `json:"provider_id"`
	// Subject identifier from the identity provider
	Subject string `json:"subject"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		Email           respjson.Field
		EmailVerified   respjson.Field
		OrganizationID  respjson.Field
		UpdatedAt       respjson.Field
		ZoneID          respjson.Field
		AuthenticatedAt respjson.Field
		Issuer          respjson.Field
		ProviderID      respjson.Field
		Subject         respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An authenticated user entity

func (User) RawJSON

func (r User) RawJSON() string

Returns the unmodified JSON received from the API

func (*User) UnmarshalJSON

func (r *User) UnmarshalJSON(data []byte) error

type UserAgent

type UserAgent struct {
	// Unique identifier of the user agent
	ID string `json:"id" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// User agent identifier (serves as OAuth client_id). Format: ua:{sha256_hash}
	Identifier string `json:"identifier" api:"required"`
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Organization that owns this user agent
	OrganizationID string `json:"organization_id" api:"required"`
	// URL-safe identifier, unique within the zone
	Slug string `json:"slug" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Zone this user agent belongs to
	ZoneID string `json:"zone_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		CreatedAt      respjson.Field
		Identifier     respjson.Field
		Name           respjson.Field
		OrganizationID respjson.Field
		Slug           respjson.Field
		UpdatedAt      respjson.Field
		ZoneID         respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A User Agent represents a user agent (browser, desktop app, CLI tool) that can initiate user sessions via OAuth 2.0 Dynamic Client Registration.

func (UserAgent) RawJSON

func (r UserAgent) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserAgent) UnmarshalJSON

func (r *UserAgent) UnmarshalJSON(data []byte) error

type Zone

type Zone struct {
	// Unique identifier of the zone
	ID string `json:"id" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Organization that owns this zone
	OrganizationID string `json:"organization_id" api:"required"`
	// Protocol configuration for a zone
	Protocols ZoneProtocols `json:"protocols" api:"required"`
	// URL-safe identifier, unique within the zone
	Slug string `json:"slug" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Application ID configured as the default MCP Gateway for the zone
	DefaultMcpGatewayApplicationID string `json:"default_mcp_gateway_application_id"`
	// Human-readable description
	Description string `json:"description" api:"nullable"`
	// AWS KMS configuration for zone encryption. When not specified, the default
	// Keycard Cloud encryption key will be used.
	EncryptionKey EncryptionKeyAwsKmsConfig `json:"encryption_key"`
	// Login flow style for the zone. 'default' uses standard authentication,
	// 'identifier_first' uses identifier-based provider routing.
	//
	// Any of "default", "identifier_first".
	LoginFlow ZoneLoginFlow `json:"login_flow"`
	// Permissions granted to the authenticated principal. Only populated when
	// expand[]=permissions query parameter is provided. Keys are resource types,
	// values are objects mapping action names to boolean values.
	Permissions map[string]map[string]bool `json:"permissions"`
	// Whether the zone requires an invitation for email/password registration, only
	// applies when user_identity_provider_id is not set
	RequiresInvitation bool `json:"requires_invitation"`
	// Provider ID configured for user login
	UserIdentityProviderID string `json:"user_identity_provider_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                             respjson.Field
		CreatedAt                      respjson.Field
		Name                           respjson.Field
		OrganizationID                 respjson.Field
		Protocols                      respjson.Field
		Slug                           respjson.Field
		UpdatedAt                      respjson.Field
		DefaultMcpGatewayApplicationID respjson.Field
		Description                    respjson.Field
		EncryptionKey                  respjson.Field
		LoginFlow                      respjson.Field
		Permissions                    respjson.Field
		RequiresInvitation             respjson.Field
		UserIdentityProviderID         respjson.Field
		ExtraFields                    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A zone for organizing resources within an organization

func (Zone) RawJSON

func (r Zone) RawJSON() string

Returns the unmodified JSON received from the API

func (*Zone) UnmarshalJSON

func (r *Zone) UnmarshalJSON(data []byte) error

type ZoneApplicationCredentialDeleteParams

type ZoneApplicationCredentialDeleteParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneApplicationCredentialGetParams

type ZoneApplicationCredentialGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneApplicationCredentialListParams

type ZoneApplicationCredentialListParams struct {
	// Cursor for forward pagination
	After         param.Opt[string] `query:"after,omitzero" json:"-"`
	ApplicationID param.Opt[string] `query:"applicationId,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]                               `query:"limit,omitzero" json:"-"`
	Slug   param.Opt[string]                              `query:"slug,omitzero" json:"-"`
	Expand ZoneApplicationCredentialListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneApplicationCredentialListParams) URLQuery

func (r ZoneApplicationCredentialListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneApplicationCredentialListParams's query parameters as `url.Values`.

type ZoneApplicationCredentialListParamsExpandString

type ZoneApplicationCredentialListParamsExpandString string
const (
	ZoneApplicationCredentialListParamsExpandStringTotalCount ZoneApplicationCredentialListParamsExpandString = "total_count"
)

type ZoneApplicationCredentialListParamsExpandUnion

type ZoneApplicationCredentialListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneApplicationCredentialListsExpandString)
	OfZoneApplicationCredentialListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneApplicationCredentialListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneApplicationCredentialListResponse

type ZoneApplicationCredentialListResponse struct {
	Items []CredentialUnion `json:"items" api:"required"`
	// Pagination information
	PageInfo PageInfoPagination `json:"page_info" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneApplicationCredentialListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneApplicationCredentialListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationCredentialListResponse) UnmarshalJSON

func (r *ZoneApplicationCredentialListResponse) UnmarshalJSON(data []byte) error

type ZoneApplicationCredentialListResponsePagination

type ZoneApplicationCredentialListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneApplicationCredentialListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationCredentialListResponsePagination) UnmarshalJSON

type ZoneApplicationCredentialNewParams

type ZoneApplicationCredentialNewParams struct {

	// This field is a request body variant, only one variant field can be set. Schema
	// for creating a token application credential
	OfApplicationCredentialCreateToken *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken `json:",inline"`
	// This field is a request body variant, only one variant field can be set. Schema
	// for creating a password application credential
	OfApplicationCredentialCreatePassword *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword `json:",inline"`
	// This field is a request body variant, only one variant field can be set. Schema
	// for creating a public key application credential
	OfApplicationCredentialCreatePublicKey *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey `json:",inline"`
	// This field is a request body variant, only one variant field can be set. Schema
	// for creating a URL application credential
	OfApplicationCredentialCreateURL *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL `json:",inline"`
	// This field is a request body variant, only one variant field can be set. Schema
	// for creating a public application credential
	OfApplicationCredentialCreatePublic *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic `json:",inline"`
	// contains filtered or unexported fields
}

func (ZoneApplicationCredentialNewParams) MarshalJSON

func (u ZoneApplicationCredentialNewParams) MarshalJSON() ([]byte, error)

func (*ZoneApplicationCredentialNewParams) UnmarshalJSON

func (r *ZoneApplicationCredentialNewParams) UnmarshalJSON(data []byte) error

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword struct {
	// ID of the application this credential belongs to
	ApplicationID string `json:"application_id" api:"required"`
	// Any of "password".
	Type string `json:"type,omitzero" api:"required"`
	// Username for password credential, also used as OAuth 2.0 client ID
	// (auto-generated if not provided)
	Identifier param.Opt[string] `json:"identifier,omitzero"`
	// contains filtered or unexported fields
}

Schema for creating a password application credential

The properties ApplicationID, Type are required.

func (ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword) MarshalJSON

func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword) UnmarshalJSON

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic struct {
	// ID of the application this credential belongs to
	ApplicationID string `json:"application_id" api:"required"`
	// Any of "public".
	Type string `json:"type,omitzero" api:"required"`
	// Identifier for public credential, also used as OAuth 2.0 client ID
	// (auto-generated if not provided)
	Identifier param.Opt[string] `json:"identifier,omitzero"`
	// contains filtered or unexported fields
}

Schema for creating a public application credential

The properties ApplicationID, Type are required.

func (ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic) MarshalJSON

func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic) UnmarshalJSON

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey struct {
	// ID of the application this credential belongs to
	ApplicationID string `json:"application_id" api:"required"`
	// JWKS URI to retrieve public keys from
	JwksUri string `json:"jwks_uri" api:"required" format:"uri"`
	// Any of "public-key".
	Type string `json:"type,omitzero" api:"required"`
	// Client ID for public key credential, also used as OAuth 2.0 client ID
	// (auto-generated if not provided)
	Identifier param.Opt[string] `json:"identifier,omitzero"`
	// contains filtered or unexported fields
}

Schema for creating a public key application credential

The properties ApplicationID, JwksUri, Type are required.

func (ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey) MarshalJSON

func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey) UnmarshalJSON

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken struct {
	// ID of the application this credential belongs to
	ApplicationID string `json:"application_id" api:"required"`
	// ID of the provider issuing tokens this credential verifies
	ProviderID string `json:"provider_id" api:"required"`
	// Any of "token".
	Type string `json:"type,omitzero" api:"required"`
	// Subject identifier for the token. When omitted, any token from the provider is
	// accepted without checking application-specific claims.
	Subject param.Opt[string] `json:"subject,omitzero"`
	// contains filtered or unexported fields
}

Schema for creating a token application credential

The properties ApplicationID, ProviderID, Type are required.

func (ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken) MarshalJSON

func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken) UnmarshalJSON

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL

type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL struct {
	// ID of the application this credential belongs to
	ApplicationID string `json:"application_id" api:"required"`
	// URL of the credential (must be a valid URL)
	Identifier string `json:"identifier" api:"required" format:"uri"`
	// Any of "url".
	Type string `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Schema for creating a URL application credential

The properties ApplicationID, Identifier, Type are required.

func (ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL) MarshalJSON

func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL) UnmarshalJSON

type ZoneApplicationCredentialNewResponseUnion

type ZoneApplicationCredentialNewResponseUnion struct {
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	ID string `json:"id"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	ApplicationID string `json:"application_id"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	CreatedAt time.Time `json:"created_at"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	OrganizationID string `json:"organization_id"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	Slug string `json:"slug"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	UpdatedAt time.Time `json:"updated_at"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	ZoneID string `json:"zone_id"`
	// This field is from variant [Token], [Password], [PublicKey], [URL], [Public].
	Application Application `json:"application"`
	Identifier  string      `json:"identifier"`
	// This field is from variant [Token].
	ProviderID string `json:"provider_id"`
	Type       string `json:"type"`
	// This field is from variant [Token].
	Provider Provider `json:"provider"`
	// This field is from variant [Token].
	Subject string `json:"subject"`
	// This field is from variant [Password].
	Password string `json:"password"`
	// This field is from variant [PublicKey].
	JwksUri string `json:"jwks_uri"`
	JSON    struct {
		ID             respjson.Field
		ApplicationID  respjson.Field
		CreatedAt      respjson.Field
		OrganizationID respjson.Field
		Slug           respjson.Field
		UpdatedAt      respjson.Field
		ZoneID         respjson.Field
		Application    respjson.Field
		Identifier     respjson.Field
		ProviderID     respjson.Field
		Type           respjson.Field
		Provider       respjson.Field
		Subject        respjson.Field
		Password       respjson.Field
		JwksUri        respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ZoneApplicationCredentialNewResponseUnion contains all possible properties and values from Token, Password, PublicKey, URL, Public.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPassword

func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPassword() (v Password)

func (ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPublic

func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPublic() (v Public)

func (ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPublicKey

func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPublicKey() (v PublicKey)

func (ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialToken

func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialToken() (v Token)

func (ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialURL

func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialURL() (v URL)

func (ZoneApplicationCredentialNewResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationCredentialNewResponseUnion) UnmarshalJSON

func (r *ZoneApplicationCredentialNewResponseUnion) UnmarshalJSON(data []byte) error

type ZoneApplicationCredentialService

type ZoneApplicationCredentialService struct {
	Options []option.RequestOption
}

ZoneApplicationCredentialService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneApplicationCredentialService method instead.

func NewZoneApplicationCredentialService

func NewZoneApplicationCredentialService(opts ...option.RequestOption) (r ZoneApplicationCredentialService)

NewZoneApplicationCredentialService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneApplicationCredentialService) Delete

Permanently deletes an application credential

func (*ZoneApplicationCredentialService) Get

Returns details of a specific application credential by ID

func (*ZoneApplicationCredentialService) List

Returns a list of application credentials in the specified zone

func (*ZoneApplicationCredentialService) New

Creates a new application credential

func (*ZoneApplicationCredentialService) Update

Updates an application credential's configuration

type ZoneApplicationCredentialUpdateParams

type ZoneApplicationCredentialUpdateParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`

	// This field is a request body variant, only one variant field can be set. Schema
	// for updating a token credential
	OfTokenCredentialUpdate *ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate `json:",inline"`
	// This field is a request body variant, only one variant field can be set. Schema
	// for updating a password credential
	OfPasswordCredentialUpdate *ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate `json:",inline"`
	// This field is a request body variant, only one variant field can be set. Schema
	// for updating a public key credential
	OfPublicKeyCredentialUpdate *ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate `json:",inline"`
	// This field is a request body variant, only one variant field can be set. Schema
	// for updating a URL credential
	OfURLCredentialUpdate *ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate `json:",inline"`
	// This field is a request body variant, only one variant field can be set. Schema
	// for updating a public credential
	OfPublicCredentialUpdate *ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate `json:",inline"`
	// contains filtered or unexported fields
}

func (ZoneApplicationCredentialUpdateParams) MarshalJSON

func (u ZoneApplicationCredentialUpdateParams) MarshalJSON() ([]byte, error)

func (*ZoneApplicationCredentialUpdateParams) UnmarshalJSON

func (r *ZoneApplicationCredentialUpdateParams) UnmarshalJSON(data []byte) error

type ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate

type ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate struct {
	// Any of "password".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Schema for updating a password credential

func (ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate) MarshalJSON

func (*ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate) UnmarshalJSON

type ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate

type ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate struct {
	// Identifier for public credential, also used as OAuth 2.0 client ID
	Identifier param.Opt[string] `json:"identifier,omitzero"`
	// Any of "public".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Schema for updating a public credential

func (ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate) MarshalJSON

func (*ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate) UnmarshalJSON

type ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate

type ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate struct {
	// Any of "public-key".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Schema for updating a public key credential

func (ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate) MarshalJSON

func (*ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate) UnmarshalJSON

type ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate

type ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate struct {
	// Subject identifier for the token. Set to null to unset, which allows any token
	// from the provider to be accepted without checking application-specific claims.
	Subject param.Opt[string] `json:"subject,omitzero"`
	// Any of "token".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Schema for updating a token credential

func (ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate) MarshalJSON

func (*ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate) UnmarshalJSON

type ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate

type ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate struct {
	// URL of the credential (must be a valid URL)
	Identifier param.Opt[string] `json:"identifier,omitzero" format:"uri"`
	// Any of "url".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Schema for updating a URL credential

func (ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate) MarshalJSON

func (*ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate) UnmarshalJSON

type ZoneApplicationDeleteParams

type ZoneApplicationDeleteParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneApplicationDependencyAddParams

type ZoneApplicationDependencyAddParams struct {
	ZoneID        string   `path:"zoneId" api:"required" json:"-"`
	ID            string   `path:"id" api:"required" json:"-"`
	WhenAccessing []string `query:"when_accessing,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneApplicationDependencyAddParams) URLQuery

func (r ZoneApplicationDependencyAddParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneApplicationDependencyAddParams's query parameters as `url.Values`.

type ZoneApplicationDependencyGetParams

type ZoneApplicationDependencyGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	ID     string `path:"id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneApplicationDependencyListParams

type ZoneApplicationDependencyListParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of items to return
	Limit         param.Opt[int64]                               `query:"limit,omitzero" json:"-"`
	WhenAccessing param.Opt[string]                              `query:"when_accessing,omitzero" json:"-"`
	Expand        ZoneApplicationDependencyListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneApplicationDependencyListParams) URLQuery

func (r ZoneApplicationDependencyListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneApplicationDependencyListParams's query parameters as `url.Values`.

type ZoneApplicationDependencyListParamsExpandString

type ZoneApplicationDependencyListParamsExpandString string
const (
	ZoneApplicationDependencyListParamsExpandStringTotalCount ZoneApplicationDependencyListParamsExpandString = "total_count"
)

type ZoneApplicationDependencyListParamsExpandUnion

type ZoneApplicationDependencyListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneApplicationDependencyListsExpandString)
	OfZoneApplicationDependencyListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneApplicationDependencyListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneApplicationDependencyListResponse

type ZoneApplicationDependencyListResponse struct {
	Items []Resource `json:"items" api:"required"`
	// Pagination information
	PageInfo PageInfoPagination `json:"page_info" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneApplicationDependencyListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneApplicationDependencyListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationDependencyListResponse) UnmarshalJSON

func (r *ZoneApplicationDependencyListResponse) UnmarshalJSON(data []byte) error

type ZoneApplicationDependencyListResponsePagination

type ZoneApplicationDependencyListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneApplicationDependencyListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationDependencyListResponsePagination) UnmarshalJSON

type ZoneApplicationDependencyRemoveParams

type ZoneApplicationDependencyRemoveParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	ID     string `path:"id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneApplicationDependencyService

type ZoneApplicationDependencyService struct {
	Options []option.RequestOption
}

ZoneApplicationDependencyService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneApplicationDependencyService method instead.

func NewZoneApplicationDependencyService

func NewZoneApplicationDependencyService(opts ...option.RequestOption) (r ZoneApplicationDependencyService)

NewZoneApplicationDependencyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneApplicationDependencyService) Add

Adds a resource dependency to an application

func (*ZoneApplicationDependencyService) Get

Retrieves a specific resource dependency of an application

func (*ZoneApplicationDependencyService) List

Returns resource dependencies for an application

func (*ZoneApplicationDependencyService) Remove

Removes a resource dependency from an application

type ZoneApplicationGetParams

type ZoneApplicationGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneApplicationListCredentialsParams

type ZoneApplicationListCredentialsParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]                                `query:"limit,omitzero" json:"-"`
	Expand ZoneApplicationListCredentialsParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneApplicationListCredentialsParams) URLQuery

func (r ZoneApplicationListCredentialsParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneApplicationListCredentialsParams's query parameters as `url.Values`.

type ZoneApplicationListCredentialsParamsExpandString

type ZoneApplicationListCredentialsParamsExpandString string
const (
	ZoneApplicationListCredentialsParamsExpandStringTotalCount ZoneApplicationListCredentialsParamsExpandString = "total_count"
)

type ZoneApplicationListCredentialsParamsExpandUnion

type ZoneApplicationListCredentialsParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneApplicationListCredentialssExpandString)
	OfZoneApplicationListCredentialssExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneApplicationListCredentialssExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneApplicationListCredentialsResponse

type ZoneApplicationListCredentialsResponse struct {
	Items []CredentialUnion `json:"items" api:"required"`
	// Pagination information
	PageInfo PageInfoPagination `json:"page_info" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneApplicationListCredentialsResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneApplicationListCredentialsResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationListCredentialsResponse) UnmarshalJSON

func (r *ZoneApplicationListCredentialsResponse) UnmarshalJSON(data []byte) error

type ZoneApplicationListCredentialsResponsePagination

type ZoneApplicationListCredentialsResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneApplicationListCredentialsResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationListCredentialsResponsePagination) UnmarshalJSON

type ZoneApplicationListParams

type ZoneApplicationListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before     param.Opt[string] `query:"before,omitzero" json:"-"`
	Cursor     param.Opt[string] `query:"cursor,omitzero" json:"-"`
	Identifier param.Opt[string] `query:"identifier,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]                     `query:"limit,omitzero" json:"-"`
	Slug   param.Opt[string]                    `query:"slug,omitzero" json:"-"`
	Expand ZoneApplicationListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// Filter by traits (OR matching - returns applications with any of the specified
	// traits)
	Traits []ApplicationTrait `query:"traits,omitzero" json:"-"`
	// Filter by traits (AND matching - returns applications with all of the specified
	// traits)
	TraitsAll []ApplicationTrait `query:"traits[all],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneApplicationListParams) URLQuery

func (r ZoneApplicationListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneApplicationListParams's query parameters as `url.Values`.

type ZoneApplicationListParamsExpandString

type ZoneApplicationListParamsExpandString string
const (
	ZoneApplicationListParamsExpandStringTotalCount ZoneApplicationListParamsExpandString = "total_count"
)

type ZoneApplicationListParamsExpandUnion

type ZoneApplicationListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneApplicationListsExpandString)
	OfZoneApplicationListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneApplicationListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneApplicationListResourcesParams

type ZoneApplicationListResourcesParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]                              `query:"limit,omitzero" json:"-"`
	Expand ZoneApplicationListResourcesParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneApplicationListResourcesParams) URLQuery

func (r ZoneApplicationListResourcesParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneApplicationListResourcesParams's query parameters as `url.Values`.

type ZoneApplicationListResourcesParamsExpandString

type ZoneApplicationListResourcesParamsExpandString string
const (
	ZoneApplicationListResourcesParamsExpandStringTotalCount ZoneApplicationListResourcesParamsExpandString = "total_count"
)

type ZoneApplicationListResourcesParamsExpandUnion

type ZoneApplicationListResourcesParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneApplicationListResourcessExpandString)
	OfZoneApplicationListResourcessExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneApplicationListResourcessExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneApplicationListResourcesResponse

type ZoneApplicationListResourcesResponse struct {
	Items []Resource `json:"items" api:"required"`
	// Pagination information
	PageInfo PageInfoPagination `json:"page_info" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneApplicationListResourcesResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneApplicationListResourcesResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationListResourcesResponse) UnmarshalJSON

func (r *ZoneApplicationListResourcesResponse) UnmarshalJSON(data []byte) error

type ZoneApplicationListResourcesResponsePagination

type ZoneApplicationListResourcesResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneApplicationListResourcesResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationListResourcesResponsePagination) UnmarshalJSON

type ZoneApplicationListResponse

type ZoneApplicationListResponse struct {
	Items []Application `json:"items" api:"required"`
	// Pagination information
	PageInfo PageInfoPagination `json:"page_info" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneApplicationListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneApplicationListResponse) RawJSON

func (r ZoneApplicationListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneApplicationListResponse) UnmarshalJSON

func (r *ZoneApplicationListResponse) UnmarshalJSON(data []byte) error

type ZoneApplicationListResponsePagination

type ZoneApplicationListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneApplicationListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneApplicationListResponsePagination) UnmarshalJSON

func (r *ZoneApplicationListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneApplicationNewParams

type ZoneApplicationNewParams struct {
	// User specified identifier, unique within the zone
	Identifier string `json:"identifier" api:"required"`
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Human-readable description
	Description param.Opt[string] `json:"description,omitzero"`
	// Dependencies of the application
	Dependencies []ZoneApplicationNewParamsDependency `json:"dependencies,omitzero"`
	// Entity metadata
	Metadata MetadataParam `json:"metadata,omitzero"`
	// Protocol-specific configuration for application creation
	Protocols ZoneApplicationNewParamsProtocols `json:"protocols,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneApplicationNewParams) MarshalJSON

func (r ZoneApplicationNewParams) MarshalJSON() (data []byte, err error)

func (*ZoneApplicationNewParams) UnmarshalJSON

func (r *ZoneApplicationNewParams) UnmarshalJSON(data []byte) error

type ZoneApplicationNewParamsDependency

type ZoneApplicationNewParamsDependency struct {
	// Resource identifier
	ID   string            `json:"id" api:"required"`
	Type param.Opt[string] `json:"type,omitzero"`
	// contains filtered or unexported fields
}

The property ID is required.

func (ZoneApplicationNewParamsDependency) MarshalJSON

func (r ZoneApplicationNewParamsDependency) MarshalJSON() (data []byte, err error)

func (*ZoneApplicationNewParamsDependency) UnmarshalJSON

func (r *ZoneApplicationNewParamsDependency) UnmarshalJSON(data []byte) error

type ZoneApplicationNewParamsProtocols

type ZoneApplicationNewParamsProtocols struct {
	// OAuth 2.0 protocol configuration for application creation
	Oauth2 ZoneApplicationNewParamsProtocolsOauth2 `json:"oauth2,omitzero"`
	// contains filtered or unexported fields
}

Protocol-specific configuration for application creation

func (ZoneApplicationNewParamsProtocols) MarshalJSON

func (r ZoneApplicationNewParamsProtocols) MarshalJSON() (data []byte, err error)

func (*ZoneApplicationNewParamsProtocols) UnmarshalJSON

func (r *ZoneApplicationNewParamsProtocols) UnmarshalJSON(data []byte) error

type ZoneApplicationNewParamsProtocolsOauth2

type ZoneApplicationNewParamsProtocolsOauth2 struct {
	// OAuth 2.0 post-logout redirect URIs for this application
	PostLogoutRedirectUris []string `json:"post_logout_redirect_uris,omitzero" format:"uri"`
	// OAuth 2.0 redirect URIs for this application
	RedirectUris []string `json:"redirect_uris,omitzero" format:"uri"`
	// contains filtered or unexported fields
}

OAuth 2.0 protocol configuration for application creation

func (ZoneApplicationNewParamsProtocolsOauth2) MarshalJSON

func (r ZoneApplicationNewParamsProtocolsOauth2) MarshalJSON() (data []byte, err error)

func (*ZoneApplicationNewParamsProtocolsOauth2) UnmarshalJSON

func (r *ZoneApplicationNewParamsProtocolsOauth2) UnmarshalJSON(data []byte) error

type ZoneApplicationService

type ZoneApplicationService struct {
	Options      []option.RequestOption
	Dependencies ZoneApplicationDependencyService
}

ZoneApplicationService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneApplicationService method instead.

func NewZoneApplicationService

func NewZoneApplicationService(opts ...option.RequestOption) (r ZoneApplicationService)

NewZoneApplicationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneApplicationService) Delete

Permanently deletes an application

func (*ZoneApplicationService) Get

Returns details of a specific Application by ID

func (*ZoneApplicationService) List

Returns a list of applications in the specified zone

func (*ZoneApplicationService) ListCredentials

Returns a list of application credentials for a specific application

func (*ZoneApplicationService) ListResources

Returns a list of resources provided by an application

func (*ZoneApplicationService) New

Creates a new Application - a software system with an identity that can access Resources

func (*ZoneApplicationService) Update

Updates an Application's configuration and metadata

type ZoneApplicationUpdateParams

type ZoneApplicationUpdateParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// Human-readable description
	Description param.Opt[string] `json:"description,omitzero"`
	// User specified identifier, unique within the zone
	Identifier param.Opt[string] `json:"identifier,omitzero"`
	// Human-readable name
	Name param.Opt[string] `json:"name,omitzero"`
	// Entity metadata (set to null or {} to remove metadata)
	Metadata MetadataUpdateParam `json:"metadata,omitzero"`
	// Protocol-specific configuration for application update
	Protocols ZoneApplicationUpdateParamsProtocols `json:"protocols,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneApplicationUpdateParams) MarshalJSON

func (r ZoneApplicationUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZoneApplicationUpdateParams) UnmarshalJSON

func (r *ZoneApplicationUpdateParams) UnmarshalJSON(data []byte) error

type ZoneApplicationUpdateParamsProtocols

type ZoneApplicationUpdateParamsProtocols struct {
	// OAuth 2.0 protocol configuration for application update
	Oauth2 ZoneApplicationUpdateParamsProtocolsOauth2 `json:"oauth2,omitzero"`
	// contains filtered or unexported fields
}

Protocol-specific configuration for application update

func (ZoneApplicationUpdateParamsProtocols) MarshalJSON

func (r ZoneApplicationUpdateParamsProtocols) MarshalJSON() (data []byte, err error)

func (*ZoneApplicationUpdateParamsProtocols) UnmarshalJSON

func (r *ZoneApplicationUpdateParamsProtocols) UnmarshalJSON(data []byte) error

type ZoneApplicationUpdateParamsProtocolsOauth2

type ZoneApplicationUpdateParamsProtocolsOauth2 struct {
	// OAuth 2.0 post-logout redirect URIs for this application (set to null or [] to
	// unset)
	PostLogoutRedirectUris []string `json:"post_logout_redirect_uris,omitzero" format:"uri"`
	// OAuth 2.0 redirect URIs for this application (set to null or [] to unset)
	RedirectUris []string `json:"redirect_uris,omitzero" format:"uri"`
	// contains filtered or unexported fields
}

OAuth 2.0 protocol configuration for application update

func (ZoneApplicationUpdateParamsProtocolsOauth2) MarshalJSON

func (r ZoneApplicationUpdateParamsProtocolsOauth2) MarshalJSON() (data []byte, err error)

func (*ZoneApplicationUpdateParamsProtocolsOauth2) UnmarshalJSON

func (r *ZoneApplicationUpdateParamsProtocolsOauth2) UnmarshalJSON(data []byte) error

type ZoneDelegatedGrantDeleteParams

type ZoneDelegatedGrantDeleteParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneDelegatedGrantGetParams

type ZoneDelegatedGrantGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneDelegatedGrantListParams

type ZoneDelegatedGrantListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by resource ID
	ResourceID param.Opt[string] `query:"resource_id,omitzero" json:"-"`
	// Filter by user ID
	UserID param.Opt[string] `query:"user_id,omitzero" json:"-"`
	// Any of "true".
	Active ZoneDelegatedGrantListParamsActive      `query:"active,omitzero" json:"-"`
	Expand ZoneDelegatedGrantListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// Any of "active", "expired", "revoked".
	Status ZoneDelegatedGrantListParamsStatus `query:"status,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneDelegatedGrantListParams) URLQuery

func (r ZoneDelegatedGrantListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneDelegatedGrantListParams's query parameters as `url.Values`.

type ZoneDelegatedGrantListParamsActive

type ZoneDelegatedGrantListParamsActive string
const (
	ZoneDelegatedGrantListParamsActiveTrue ZoneDelegatedGrantListParamsActive = "true"
)

type ZoneDelegatedGrantListParamsExpandString

type ZoneDelegatedGrantListParamsExpandString string
const (
	ZoneDelegatedGrantListParamsExpandStringTotalCount ZoneDelegatedGrantListParamsExpandString = "total_count"
)

type ZoneDelegatedGrantListParamsExpandUnion

type ZoneDelegatedGrantListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneDelegatedGrantListsExpandString)
	OfZoneDelegatedGrantListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneDelegatedGrantListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneDelegatedGrantListParamsStatus

type ZoneDelegatedGrantListParamsStatus string
const (
	ZoneDelegatedGrantListParamsStatusActive  ZoneDelegatedGrantListParamsStatus = "active"
	ZoneDelegatedGrantListParamsStatusExpired ZoneDelegatedGrantListParamsStatus = "expired"
	ZoneDelegatedGrantListParamsStatusRevoked ZoneDelegatedGrantListParamsStatus = "revoked"
)

type ZoneDelegatedGrantListResponse

type ZoneDelegatedGrantListResponse struct {
	Items []Grant `json:"items" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneDelegatedGrantListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneDelegatedGrantListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneDelegatedGrantListResponse) UnmarshalJSON

func (r *ZoneDelegatedGrantListResponse) UnmarshalJSON(data []byte) error

type ZoneDelegatedGrantListResponsePagination

type ZoneDelegatedGrantListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneDelegatedGrantListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneDelegatedGrantListResponsePagination) UnmarshalJSON

func (r *ZoneDelegatedGrantListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneDelegatedGrantService

type ZoneDelegatedGrantService struct {
	Options []option.RequestOption
}

ZoneDelegatedGrantService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneDelegatedGrantService method instead.

func NewZoneDelegatedGrantService

func NewZoneDelegatedGrantService(opts ...option.RequestOption) (r ZoneDelegatedGrantService)

NewZoneDelegatedGrantService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneDelegatedGrantService) Delete

Permanently revokes a delegated grant, removing the user's access to the protected resource

func (*ZoneDelegatedGrantService) Get

Returns details of a specific delegated grant by grant ID

func (*ZoneDelegatedGrantService) List

Returns a list of delegated grants in the specified zone. Can be filtered by user, resource, or status.

func (*ZoneDelegatedGrantService) Update

Revokes an active delegated grant

type ZoneDelegatedGrantUpdateParams

type ZoneDelegatedGrantUpdateParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// Any of "revoked".
	Status ZoneDelegatedGrantUpdateParamsStatus `json:"status,omitzero" api:"required"`
	// contains filtered or unexported fields
}

func (ZoneDelegatedGrantUpdateParams) MarshalJSON

func (r ZoneDelegatedGrantUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZoneDelegatedGrantUpdateParams) UnmarshalJSON

func (r *ZoneDelegatedGrantUpdateParams) UnmarshalJSON(data []byte) error

type ZoneDelegatedGrantUpdateParamsStatus

type ZoneDelegatedGrantUpdateParamsStatus string
const (
	ZoneDelegatedGrantUpdateParamsStatusRevoked ZoneDelegatedGrantUpdateParamsStatus = "revoked"
)

type ZoneGetParams

type ZoneGetParams struct {
	Expand ZoneGetParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneGetParams) URLQuery

func (r ZoneGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneGetParams's query parameters as `url.Values`.

type ZoneGetParamsExpandString

type ZoneGetParamsExpandString string
const (
	ZoneGetParamsExpandStringPermissions ZoneGetParamsExpandString = "permissions"
)

type ZoneGetParamsExpandUnion

type ZoneGetParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneGetsExpandString)
	OfZoneGetsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneGetsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneListParams

type ZoneListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]          `query:"limit,omitzero" json:"-"`
	Slug   param.Opt[string]         `query:"slug,omitzero" json:"-"`
	Expand ZoneListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneListParams) URLQuery

func (r ZoneListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneListParams's query parameters as `url.Values`.

type ZoneListParamsExpandString

type ZoneListParamsExpandString string
const (
	ZoneListParamsExpandStringTotalCount  ZoneListParamsExpandString = "total_count"
	ZoneListParamsExpandStringPermissions ZoneListParamsExpandString = "permissions"
)

type ZoneListParamsExpandUnion

type ZoneListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneListsExpandString)
	OfZoneListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneListResponse

type ZoneListResponse struct {
	Items []Zone `json:"items" api:"required"`
	// Pagination information
	PageInfo PageInfoPagination `json:"page_info" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneListResponse) RawJSON

func (r ZoneListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneListResponse) UnmarshalJSON

func (r *ZoneListResponse) UnmarshalJSON(data []byte) error

type ZoneListResponsePagination

type ZoneListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneListResponsePagination) RawJSON

func (r ZoneListResponsePagination) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneListResponsePagination) UnmarshalJSON

func (r *ZoneListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneListSessionResourceAccessParams

type ZoneListSessionResourceAccessParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by resource ID
	ResourceID param.Opt[string] `query:"resource_id,omitzero" json:"-"`
	// Include resource access from descendant sessions. When true (default),
	// aggregates access from the session and all its descendants. When false, returns
	// only direct access for the session.
	RollupChildren param.Opt[bool] `query:"rollup_children,omitzero" json:"-"`
	// Filter by session ID
	SessionID param.Opt[string] `query:"session_id,omitzero" json:"-"`
	// Filter by user ID
	UserID param.Opt[string]                              `query:"user_id,omitzero" json:"-"`
	Expand ZoneListSessionResourceAccessParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneListSessionResourceAccessParams) URLQuery

func (r ZoneListSessionResourceAccessParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneListSessionResourceAccessParams's query parameters as `url.Values`.

type ZoneListSessionResourceAccessParamsExpandString

type ZoneListSessionResourceAccessParamsExpandString string
const (
	ZoneListSessionResourceAccessParamsExpandStringTotalCount ZoneListSessionResourceAccessParamsExpandString = "total_count"
)

type ZoneListSessionResourceAccessParamsExpandUnion

type ZoneListSessionResourceAccessParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneListSessionResourceAccesssExpandString)
	OfZoneListSessionResourceAccesssExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneListSessionResourceAccesssExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneListSessionResourceAccessResponse

type ZoneListSessionResourceAccessResponse struct {
	Items []ZoneListSessionResourceAccessResponseItem `json:"items" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneListSessionResourceAccessResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneListSessionResourceAccessResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneListSessionResourceAccessResponse) UnmarshalJSON

func (r *ZoneListSessionResourceAccessResponse) UnmarshalJSON(data []byte) error

type ZoneListSessionResourceAccessResponseItem

type ZoneListSessionResourceAccessResponseItem struct {
	// When access first occurred
	FirstAccessedAt time.Time `json:"first_accessed_at" api:"required" format:"date-time"`
	// When access most recently occurred
	LastAccessedAt time.Time `json:"last_accessed_at" api:"required" format:"date-time"`
	// Organization ID
	OrganizationID string `json:"organization_id" api:"required"`
	// Resource ID
	ResourceID string `json:"resource_id" api:"required"`
	// Session ID
	SessionID string `json:"session_id" api:"required"`
	// Total number of access events for this session-resource pair
	TotalAccessCount int64 `json:"total_access_count" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstAccessedAt  respjson.Field
		LastAccessedAt   respjson.Field
		OrganizationID   respjson.Field
		ResourceID       respjson.Field
		SessionID        respjson.Field
		TotalAccessCount respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Aggregated record of session-resource access events

func (ZoneListSessionResourceAccessResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneListSessionResourceAccessResponseItem) UnmarshalJSON

func (r *ZoneListSessionResourceAccessResponseItem) UnmarshalJSON(data []byte) error

type ZoneListSessionResourceAccessResponsePagination

type ZoneListSessionResourceAccessResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneListSessionResourceAccessResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneListSessionResourceAccessResponsePagination) UnmarshalJSON

type ZoneLoginFlow

type ZoneLoginFlow string

Login flow style for the zone. 'default' uses standard authentication, 'identifier_first' uses identifier-based provider routing.

const (
	ZoneLoginFlowDefault         ZoneLoginFlow = "default"
	ZoneLoginFlowIdentifierFirst ZoneLoginFlow = "identifier_first"
)

type ZoneMember

type ZoneMember struct {
	// Unique identifier of the zone member
	ID string `json:"id" api:"required"`
	// HAL-format hypermedia links for zone member resources
	Links ZoneMember_Links `json:"_links" api:"required"`
	// Entity creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Organization ID that owns the zone
	OrganizationID string `json:"organization_id" api:"required"`
	// Organization user ID of the zone member
	OrganizationUserID string `json:"organization_user_id" api:"required"`
	// Zone role type. zone_manager has full management access, zone_viewer has
	// read-only access.
	//
	// Any of "zone_manager", "zone_viewer".
	Role ZoneRole `json:"role" api:"required"`
	// Entity update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Zone ID the organization user is a member of
	ZoneID string `json:"zone_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Links              respjson.Field
		CreatedAt          respjson.Field
		OrganizationID     respjson.Field
		OrganizationUserID respjson.Field
		Role               respjson.Field
		UpdatedAt          respjson.Field
		ZoneID             respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Represents an organization user's membership in a zone with an assigned role

func (ZoneMember) RawJSON

func (r ZoneMember) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneMember) UnmarshalJSON

func (r *ZoneMember) UnmarshalJSON(data []byte) error

type ZoneMemberAddParams

type ZoneMemberAddParams struct {
	// Organization user ID to add to the zone
	OrganizationUserID string `json:"organization_user_id" api:"required"`
	// Zone role type. zone_manager has full management access, zone_viewer has
	// read-only access.
	//
	// Any of "zone_manager", "zone_viewer".
	Role ZoneRole `json:"role,omitzero" api:"required"`
	// contains filtered or unexported fields
}

func (ZoneMemberAddParams) MarshalJSON

func (r ZoneMemberAddParams) MarshalJSON() (data []byte, err error)

func (*ZoneMemberAddParams) UnmarshalJSON

func (r *ZoneMemberAddParams) UnmarshalJSON(data []byte) error

type ZoneMemberDeleteParams

type ZoneMemberDeleteParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneMemberGetParams

type ZoneMemberGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneMemberListParams

type ZoneMemberListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of members to return
	Limit  param.Opt[int64]                `query:"limit,omitzero" json:"-"`
	Expand ZoneMemberListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// Filter members by role
	//
	// Any of "zone_manager", "zone_viewer".
	Role ZoneMemberListParamsRole `query:"role,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneMemberListParams) URLQuery

func (r ZoneMemberListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneMemberListParams's query parameters as `url.Values`.

type ZoneMemberListParamsExpandString

type ZoneMemberListParamsExpandString string
const (
	ZoneMemberListParamsExpandStringTotalCount ZoneMemberListParamsExpandString = "total_count"
)

type ZoneMemberListParamsExpandUnion

type ZoneMemberListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneMemberListsExpandString)
	OfZoneMemberListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneMemberListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneMemberListParamsRole

type ZoneMemberListParamsRole string

Filter members by role

const (
	ZoneMemberListParamsRoleZoneManager ZoneMemberListParamsRole = "zone_manager"
	ZoneMemberListParamsRoleZoneViewer  ZoneMemberListParamsRole = "zone_viewer"
)

type ZoneMemberListResponse

type ZoneMemberListResponse struct {
	Items []ZoneMember `json:"items" api:"required"`
	// Pagination information
	PageInfo PageInfoPagination `json:"page_info" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneMemberListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneMemberListResponse) RawJSON

func (r ZoneMemberListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneMemberListResponse) UnmarshalJSON

func (r *ZoneMemberListResponse) UnmarshalJSON(data []byte) error

type ZoneMemberListResponsePagination

type ZoneMemberListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneMemberListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneMemberListResponsePagination) UnmarshalJSON

func (r *ZoneMemberListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneMemberService

type ZoneMemberService struct {
	Options []option.RequestOption
}

ZoneMemberService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneMemberService method instead.

func NewZoneMemberService

func NewZoneMemberService(opts ...option.RequestOption) (r ZoneMemberService)

NewZoneMemberService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneMemberService) Add

func (r *ZoneMemberService) Add(ctx context.Context, zoneID string, body ZoneMemberAddParams, opts ...option.RequestOption) (res *ZoneMember, err error)

Adds an organization user to a zone with the specified role.

func (*ZoneMemberService) Delete

func (r *ZoneMemberService) Delete(ctx context.Context, organizationUserID string, body ZoneMemberDeleteParams, opts ...option.RequestOption) (err error)

Removes an organization user's membership from a zone. Only organization administrators can perform this action.

func (*ZoneMemberService) Get

func (r *ZoneMemberService) Get(ctx context.Context, organizationUserID string, query ZoneMemberGetParams, opts ...option.RequestOption) (res *ZoneMember, err error)

Returns detailed information about a specific organization user in a zone.

func (*ZoneMemberService) List

Lists all organization users in a zone with their roles and metadata. Supports cursor-based pagination.

func (*ZoneMemberService) Update

func (r *ZoneMemberService) Update(ctx context.Context, organizationUserID string, params ZoneMemberUpdateParams, opts ...option.RequestOption) (res *ZoneMember, err error)

Updates the role of an existing zone member. Only organization administrators can perform this action.

type ZoneMemberUpdateParams

type ZoneMemberUpdateParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// Zone role type. zone_manager has full management access, zone_viewer has
	// read-only access.
	//
	// Any of "zone_manager", "zone_viewer".
	Role ZoneRole `json:"role,omitzero" api:"required"`
	// contains filtered or unexported fields
}

func (ZoneMemberUpdateParams) MarshalJSON

func (r ZoneMemberUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZoneMemberUpdateParams) UnmarshalJSON

func (r *ZoneMemberUpdateParams) UnmarshalJSON(data []byte) error
type ZoneMember_Links struct {
	OrganizationUser ZoneMember_LinksOrganizationUser `json:"organization_user" api:"required"`
	Self             ZoneMember_LinksSelf             `json:"self" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		OrganizationUser respjson.Field
		Self             respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

HAL-format hypermedia links for zone member resources

func (ZoneMember_Links) RawJSON

func (r ZoneMember_Links) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneMember_Links) UnmarshalJSON

func (r *ZoneMember_Links) UnmarshalJSON(data []byte) error

type ZoneMember_LinksOrganizationUser

type ZoneMember_LinksOrganizationUser struct {
	// Link to the user resource
	Href string `json:"href" api:"required" format:"uri-reference"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneMember_LinksOrganizationUser) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneMember_LinksOrganizationUser) UnmarshalJSON

func (r *ZoneMember_LinksOrganizationUser) UnmarshalJSON(data []byte) error

type ZoneMember_LinksSelf

type ZoneMember_LinksSelf struct {
	// Link to this zone member resource
	Href string `json:"href" api:"required" format:"uri-reference"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneMember_LinksSelf) RawJSON

func (r ZoneMember_LinksSelf) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneMember_LinksSelf) UnmarshalJSON

func (r *ZoneMember_LinksSelf) UnmarshalJSON(data []byte) error

type ZoneNewParams

type ZoneNewParams struct {
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Human-readable description
	Description param.Opt[string] `json:"description,omitzero"`
	// Assign a default MCP Gateway application to the zone
	DefaultMcpGatewayApplication param.Opt[bool] `json:"default_mcp_gateway_application,omitzero"`
	// Whether the zone requires an invitation for email/password registration, only
	// applies when user_identity_provider_id is not set. Defaults to true.
	RequiresInvitation param.Opt[bool] `json:"requires_invitation,omitzero"`
	// AWS KMS configuration for zone encryption. When not specified, the default
	// Keycard Cloud encryption key will be used.
	EncryptionKey EncryptionKeyAwsKmsConfigParam `json:"encryption_key,omitzero"`
	// Login flow style for the zone. 'default' uses standard authentication,
	// 'identifier_first' uses identifier-based provider routing.
	//
	// Any of "default", "identifier_first".
	LoginFlow ZoneNewParamsLoginFlow `json:"login_flow,omitzero"`
	// Protocol configuration for zone creation
	Protocols ZoneNewParamsProtocols `json:"protocols,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneNewParams) MarshalJSON

func (r ZoneNewParams) MarshalJSON() (data []byte, err error)

func (*ZoneNewParams) UnmarshalJSON

func (r *ZoneNewParams) UnmarshalJSON(data []byte) error

type ZoneNewParamsLoginFlow

type ZoneNewParamsLoginFlow string

Login flow style for the zone. 'default' uses standard authentication, 'identifier_first' uses identifier-based provider routing.

const (
	ZoneNewParamsLoginFlowDefault         ZoneNewParamsLoginFlow = "default"
	ZoneNewParamsLoginFlowIdentifierFirst ZoneNewParamsLoginFlow = "identifier_first"
)

type ZoneNewParamsProtocols

type ZoneNewParamsProtocols struct {
	// OAuth 2.0 protocol configuration for zone creation
	Oauth2 ZoneNewParamsProtocolsOauth2 `json:"oauth2,omitzero"`
	// contains filtered or unexported fields
}

Protocol configuration for zone creation

func (ZoneNewParamsProtocols) MarshalJSON

func (r ZoneNewParamsProtocols) MarshalJSON() (data []byte, err error)

func (*ZoneNewParamsProtocols) UnmarshalJSON

func (r *ZoneNewParamsProtocols) UnmarshalJSON(data []byte) error

type ZoneNewParamsProtocolsOauth2

type ZoneNewParamsProtocolsOauth2 struct {
	// Whether Dynamic Client Registration is enabled
	DcrEnabled param.Opt[bool] `json:"dcr_enabled,omitzero"`
	// Whether PKCE is required for authorization code flows
	PkceRequired param.Opt[bool] `json:"pkce_required,omitzero"`
	// contains filtered or unexported fields
}

OAuth 2.0 protocol configuration for zone creation

func (ZoneNewParamsProtocolsOauth2) MarshalJSON

func (r ZoneNewParamsProtocolsOauth2) MarshalJSON() (data []byte, err error)

func (*ZoneNewParamsProtocolsOauth2) UnmarshalJSON

func (r *ZoneNewParamsProtocolsOauth2) UnmarshalJSON(data []byte) error

type ZonePolicyArchiveParams added in v0.6.0

type ZonePolicyArchiveParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZonePolicyGetParams added in v0.6.0

type ZonePolicyGetParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZonePolicyListParams added in v0.6.0

type ZonePolicyListParams struct {
	// Return items after this cursor (forward pagination). Use after_cursor from a
	// previous response. Mutually exclusive with before.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Return items before this cursor (backward pagination). Use before_cursor from a
	// previous response. Mutually exclusive with after.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Opt-in to additional response fields
	//
	// Any of "total_count".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Sort direction. Default is desc (newest first).
	//
	// Any of "asc", "desc".
	Order ZonePolicyListParamsOrder `query:"order,omitzero" json:"-"`
	// Field to sort by.
	//
	// Any of "created_at".
	Sort ZonePolicyListParamsSort `query:"sort,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicyListParams) URLQuery added in v0.6.0

func (r ZonePolicyListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZonePolicyListParams's query parameters as `url.Values`.

type ZonePolicyListParamsOrder added in v0.6.0

type ZonePolicyListParamsOrder string

Sort direction. Default is desc (newest first).

const (
	ZonePolicyListParamsOrderAsc  ZonePolicyListParamsOrder = "asc"
	ZonePolicyListParamsOrderDesc ZonePolicyListParamsOrder = "desc"
)

type ZonePolicyListParamsSort added in v0.6.0

type ZonePolicyListParamsSort string

Field to sort by.

const (
	ZonePolicyListParamsSortCreatedAt ZonePolicyListParamsSort = "created_at"
)

type ZonePolicyListResponse added in v0.6.0

type ZonePolicyListResponse struct {
	Items      []Policy                         `json:"items" api:"required"`
	Pagination ZonePolicyListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicyListResponse) RawJSON added in v0.6.0

func (r ZonePolicyListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZonePolicyListResponse) UnmarshalJSON added in v0.6.0

func (r *ZonePolicyListResponse) UnmarshalJSON(data []byte) error

type ZonePolicyListResponsePagination added in v0.6.0

type ZonePolicyListResponsePagination struct {
	// Cursor of the last item on the current page. Pass to after for the next page.
	// Null when there is no next page.
	AfterCursor string `json:"after_cursor" api:"required"`
	// Cursor of the first item on the current page. Pass to before for the previous
	// page. Null when there is no previous page.
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the current filters. Only included when
	// expand=total_count is requested.
	TotalCount int64 `json:"total_count" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicyListResponsePagination) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicyListResponsePagination) UnmarshalJSON added in v0.6.0

func (r *ZonePolicyListResponsePagination) UnmarshalJSON(data []byte) error

type ZonePolicyNewParams added in v0.6.0

type ZonePolicyNewParams struct {
	Name             string            `json:"name" api:"required"`
	Description      param.Opt[string] `json:"description,omitzero"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicyNewParams) MarshalJSON added in v0.6.0

func (r ZonePolicyNewParams) MarshalJSON() (data []byte, err error)

func (*ZonePolicyNewParams) UnmarshalJSON added in v0.6.0

func (r *ZonePolicyNewParams) UnmarshalJSON(data []byte) error

type ZonePolicySchemaGetParams added in v0.6.0

type ZonePolicySchemaGetParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Schema representation format. `cedar` returns human-readable Cedar syntax in
	// `cedar_schema`, `json` returns Cedar JSON schema object in `cedar_schema_json`.
	//
	// Any of "cedar", "json".
	Format ZonePolicySchemaGetParamsFormat `query:"format,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicySchemaGetParams) URLQuery added in v0.6.0

func (r ZonePolicySchemaGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZonePolicySchemaGetParams's query parameters as `url.Values`.

type ZonePolicySchemaGetParamsFormat added in v0.6.0

type ZonePolicySchemaGetParamsFormat string

Schema representation format. `cedar` returns human-readable Cedar syntax in `cedar_schema`, `json` returns Cedar JSON schema object in `cedar_schema_json`.

const (
	ZonePolicySchemaGetParamsFormatCedar ZonePolicySchemaGetParamsFormat = "cedar"
	ZonePolicySchemaGetParamsFormatJson  ZonePolicySchemaGetParamsFormat = "json"
)

type ZonePolicySchemaListParams added in v0.6.0

type ZonePolicySchemaListParams struct {
	// Return items after this cursor (forward pagination). Use after_cursor from a
	// previous response. Mutually exclusive with before.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Return items before this cursor (backward pagination). Use before_cursor from a
	// previous response. Mutually exclusive with after.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Filter schemas by default status. When `true`, returns only the zone's default
	// schema. When `false`, returns only non-default schemas. Omit to return all
	// schemas.
	IsDefault param.Opt[bool] `query:"is_default,omitzero" json:"-"`
	// Maximum number of items to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Opt-in to additional response fields
	//
	// Any of "total_count".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Schema representation format. `cedar` returns human-readable Cedar syntax in
	// `cedar_schema`, `json` returns Cedar JSON schema object in `cedar_schema_json`.
	//
	// Any of "cedar", "json".
	Format ZonePolicySchemaListParamsFormat `query:"format,omitzero" json:"-"`
	// Sort direction. Default is desc (newest first).
	//
	// Any of "asc", "desc".
	Order ZonePolicySchemaListParamsOrder `query:"order,omitzero" json:"-"`
	// Field to sort by.
	//
	// Any of "created_at".
	Sort ZonePolicySchemaListParamsSort `query:"sort,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicySchemaListParams) URLQuery added in v0.6.0

func (r ZonePolicySchemaListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZonePolicySchemaListParams's query parameters as `url.Values`.

type ZonePolicySchemaListParamsFormat added in v0.6.0

type ZonePolicySchemaListParamsFormat string

Schema representation format. `cedar` returns human-readable Cedar syntax in `cedar_schema`, `json` returns Cedar JSON schema object in `cedar_schema_json`.

const (
	ZonePolicySchemaListParamsFormatCedar ZonePolicySchemaListParamsFormat = "cedar"
	ZonePolicySchemaListParamsFormatJson  ZonePolicySchemaListParamsFormat = "json"
)

type ZonePolicySchemaListParamsOrder added in v0.6.0

type ZonePolicySchemaListParamsOrder string

Sort direction. Default is desc (newest first).

const (
	ZonePolicySchemaListParamsOrderAsc  ZonePolicySchemaListParamsOrder = "asc"
	ZonePolicySchemaListParamsOrderDesc ZonePolicySchemaListParamsOrder = "desc"
)

type ZonePolicySchemaListParamsSort added in v0.6.0

type ZonePolicySchemaListParamsSort string

Field to sort by.

const (
	ZonePolicySchemaListParamsSortCreatedAt ZonePolicySchemaListParamsSort = "created_at"
)

type ZonePolicySchemaListResponse added in v0.6.0

type ZonePolicySchemaListResponse struct {
	Items      []SchemaVersionWithZoneInfo            `json:"items" api:"required"`
	Pagination ZonePolicySchemaListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicySchemaListResponse) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicySchemaListResponse) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySchemaListResponse) UnmarshalJSON(data []byte) error

type ZonePolicySchemaListResponsePagination added in v0.6.0

type ZonePolicySchemaListResponsePagination struct {
	// Cursor of the last item on the current page. Pass to after for the next page.
	// Null when there is no next page.
	AfterCursor string `json:"after_cursor" api:"required"`
	// Cursor of the first item on the current page. Pass to before for the previous
	// page. Null when there is no previous page.
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the current filters. Only included when
	// expand=total_count is requested.
	TotalCount int64 `json:"total_count" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicySchemaListResponsePagination) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicySchemaListResponsePagination) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySchemaListResponsePagination) UnmarshalJSON(data []byte) error

type ZonePolicySchemaService added in v0.6.0

type ZonePolicySchemaService struct {
	Options []option.RequestOption
}

Zone-scoped Cedar schema management

ZonePolicySchemaService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZonePolicySchemaService method instead.

func NewZonePolicySchemaService added in v0.6.0

func NewZonePolicySchemaService(opts ...option.RequestOption) (r ZonePolicySchemaService)

NewZonePolicySchemaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZonePolicySchemaService) Get added in v0.6.0

Get a policy schema by version

func (*ZonePolicySchemaService) List added in v0.6.0

List policy schemas

func (*ZonePolicySchemaService) SetDefault added in v0.6.0

Set the default policy schema for a zone

type ZonePolicySchemaSetDefaultParams added in v0.6.0

type ZonePolicySchemaSetDefaultParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	Body             any
	// contains filtered or unexported fields
}

func (ZonePolicySchemaSetDefaultParams) MarshalJSON added in v0.6.0

func (r ZonePolicySchemaSetDefaultParams) MarshalJSON() (data []byte, err error)

func (*ZonePolicySchemaSetDefaultParams) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySchemaSetDefaultParams) UnmarshalJSON(data []byte) error

type ZonePolicyService added in v0.6.0

type ZonePolicyService struct {
	Options []option.RequestOption
	// Immutable policy version snapshots
	Versions ZonePolicyVersionService
}

Policy CRUD operations

ZonePolicyService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZonePolicyService method instead.

func NewZonePolicyService added in v0.6.0

func NewZonePolicyService(opts ...option.RequestOption) (r ZonePolicyService)

NewZonePolicyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZonePolicyService) Archive added in v0.6.0

func (r *ZonePolicyService) Archive(ctx context.Context, policyID string, params ZonePolicyArchiveParams, opts ...option.RequestOption) (res *Policy, err error)

Archive a policy

func (*ZonePolicyService) Get added in v0.6.0

func (r *ZonePolicyService) Get(ctx context.Context, policyID string, params ZonePolicyGetParams, opts ...option.RequestOption) (res *Policy, err error)

Get a policy by ID

func (*ZonePolicyService) List added in v0.6.0

List policies in a zone

func (*ZonePolicyService) New added in v0.6.0

func (r *ZonePolicyService) New(ctx context.Context, zoneID string, params ZonePolicyNewParams, opts ...option.RequestOption) (res *Policy, err error)

Create a new policy

func (*ZonePolicyService) Update added in v0.6.0

func (r *ZonePolicyService) Update(ctx context.Context, policyID string, params ZonePolicyUpdateParams, opts ...option.RequestOption) (res *Policy, err error)

Update a policy

type ZonePolicySetArchiveParams added in v0.6.0

type ZonePolicySetArchiveParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	IfMatch          param.Opt[string] `header:"If-Match,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZonePolicySetGetParams added in v0.6.0

type ZonePolicySetGetParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZonePolicySetListParams added in v0.6.0

type ZonePolicySetListParams struct {
	// Return items after this cursor (forward pagination). Use after_cursor from a
	// previous response. Mutually exclusive with before.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Return items before this cursor (backward pagination). Use before_cursor from a
	// previous response. Mutually exclusive with after.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Opt-in to additional response fields
	//
	// Any of "total_count".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Sort direction. Default is desc (newest first).
	//
	// Any of "asc", "desc".
	Order ZonePolicySetListParamsOrder `query:"order,omitzero" json:"-"`
	// Field to sort by.
	//
	// Any of "created_at".
	Sort ZonePolicySetListParamsSort `query:"sort,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicySetListParams) URLQuery added in v0.6.0

func (r ZonePolicySetListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZonePolicySetListParams's query parameters as `url.Values`.

type ZonePolicySetListParamsOrder added in v0.6.0

type ZonePolicySetListParamsOrder string

Sort direction. Default is desc (newest first).

const (
	ZonePolicySetListParamsOrderAsc  ZonePolicySetListParamsOrder = "asc"
	ZonePolicySetListParamsOrderDesc ZonePolicySetListParamsOrder = "desc"
)

type ZonePolicySetListParamsSort added in v0.6.0

type ZonePolicySetListParamsSort string

Field to sort by.

const (
	ZonePolicySetListParamsSortCreatedAt ZonePolicySetListParamsSort = "created_at"
)

type ZonePolicySetListResponse added in v0.6.0

type ZonePolicySetListResponse struct {
	Items      []PolicySetWithBinding              `json:"items" api:"required"`
	Pagination ZonePolicySetListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicySetListResponse) RawJSON added in v0.6.0

func (r ZonePolicySetListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZonePolicySetListResponse) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetListResponse) UnmarshalJSON(data []byte) error

type ZonePolicySetListResponsePagination added in v0.6.0

type ZonePolicySetListResponsePagination struct {
	// Cursor of the last item on the current page. Pass to after for the next page.
	// Null when there is no next page.
	AfterCursor string `json:"after_cursor" api:"required"`
	// Cursor of the first item on the current page. Pass to before for the previous
	// page. Null when there is no previous page.
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the current filters. Only included when
	// expand=total_count is requested.
	TotalCount int64 `json:"total_count" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicySetListResponsePagination) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicySetListResponsePagination) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetListResponsePagination) UnmarshalJSON(data []byte) error

type ZonePolicySetNewParams added in v0.6.0

type ZonePolicySetNewParams struct {
	Name             string            `json:"name" api:"required"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Any of "zone", "resource", "user", "session".
	ScopeType ZonePolicySetNewParamsScopeType `json:"scope_type,omitzero"`
	// contains filtered or unexported fields
}

func (ZonePolicySetNewParams) MarshalJSON added in v0.6.0

func (r ZonePolicySetNewParams) MarshalJSON() (data []byte, err error)

func (*ZonePolicySetNewParams) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetNewParams) UnmarshalJSON(data []byte) error

type ZonePolicySetNewParamsScopeType added in v0.6.0

type ZonePolicySetNewParamsScopeType string
const (
	ZonePolicySetNewParamsScopeTypeZone     ZonePolicySetNewParamsScopeType = "zone"
	ZonePolicySetNewParamsScopeTypeResource ZonePolicySetNewParamsScopeType = "resource"
	ZonePolicySetNewParamsScopeTypeUser     ZonePolicySetNewParamsScopeType = "user"
	ZonePolicySetNewParamsScopeTypeSession  ZonePolicySetNewParamsScopeType = "session"
)

type ZonePolicySetService added in v0.6.0

type ZonePolicySetService struct {
	Options []option.RequestOption
	// Immutable policy set manifest snapshots
	Versions ZonePolicySetVersionService
}

Policy set CRUD and binding management

ZonePolicySetService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZonePolicySetService method instead.

func NewZonePolicySetService added in v0.6.0

func NewZonePolicySetService(opts ...option.RequestOption) (r ZonePolicySetService)

NewZonePolicySetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZonePolicySetService) Archive added in v0.6.0

func (r *ZonePolicySetService) Archive(ctx context.Context, policySetID string, params ZonePolicySetArchiveParams, opts ...option.RequestOption) (res *PolicySetWithBinding, err error)

Archive a policy set

func (*ZonePolicySetService) Get added in v0.6.0

func (r *ZonePolicySetService) Get(ctx context.Context, policySetID string, params ZonePolicySetGetParams, opts ...option.RequestOption) (res *PolicySetWithBinding, err error)

Returns the policy set with current binding information.

func (*ZonePolicySetService) List added in v0.6.0

List policy sets in a zone

func (*ZonePolicySetService) New added in v0.6.0

Creates an unbound policy set. Use updatePolicySet to bind after creating a version.

func (*ZonePolicySetService) Update added in v0.6.0

func (r *ZonePolicySetService) Update(ctx context.Context, policySetID string, params ZonePolicySetUpdateParams, opts ...option.RequestOption) (res *PolicySetWithBinding, err error)

Update metadata or manage binding. Set active=true to bind, active=false to unbind.

type ZonePolicySetUpdateParams added in v0.6.0

type ZonePolicySetUpdateParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	Name             param.Opt[string] `json:"name,omitzero"`
	IfMatch          param.Opt[string] `header:"If-Match,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicySetUpdateParams) MarshalJSON added in v0.6.0

func (r ZonePolicySetUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZonePolicySetUpdateParams) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetUpdateParams) UnmarshalJSON(data []byte) error

type ZonePolicySetVersionArchiveParams added in v0.6.0

type ZonePolicySetVersionArchiveParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	PolicySetID      string            `path:"policy_set_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZonePolicySetVersionGetParams added in v0.6.0

type ZonePolicySetVersionGetParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	PolicySetID      string            `path:"policy_set_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZonePolicySetVersionListParams added in v0.6.0

type ZonePolicySetVersionListParams struct {
	ZoneID string `path:"zone_id" api:"required" json:"-"`
	// Return items after this cursor (forward pagination). Use after_cursor from a
	// previous response. Mutually exclusive with before.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Return items before this cursor (backward pagination). Use before_cursor from a
	// previous response. Mutually exclusive with after.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Opt-in to additional response fields
	//
	// Any of "total_count".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Sort direction. Default is desc (newest first).
	//
	// Any of "asc", "desc".
	Order ZonePolicySetVersionListParamsOrder `query:"order,omitzero" json:"-"`
	// Field to sort by.
	//
	// Any of "created_at".
	Sort ZonePolicySetVersionListParamsSort `query:"sort,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicySetVersionListParams) URLQuery added in v0.6.0

func (r ZonePolicySetVersionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZonePolicySetVersionListParams's query parameters as `url.Values`.

type ZonePolicySetVersionListParamsOrder added in v0.6.0

type ZonePolicySetVersionListParamsOrder string

Sort direction. Default is desc (newest first).

const (
	ZonePolicySetVersionListParamsOrderAsc  ZonePolicySetVersionListParamsOrder = "asc"
	ZonePolicySetVersionListParamsOrderDesc ZonePolicySetVersionListParamsOrder = "desc"
)

type ZonePolicySetVersionListParamsSort added in v0.6.0

type ZonePolicySetVersionListParamsSort string

Field to sort by.

const (
	ZonePolicySetVersionListParamsSortCreatedAt ZonePolicySetVersionListParamsSort = "created_at"
)

type ZonePolicySetVersionListPoliciesParams added in v0.6.0

type ZonePolicySetVersionListPoliciesParams struct {
	ZoneID      string `path:"zone_id" api:"required" json:"-"`
	PolicySetID string `path:"policy_set_id" api:"required" json:"-"`
	// Return items after this cursor (forward pagination). Use after_cursor from a
	// previous response. Mutually exclusive with before.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Return items before this cursor (backward pagination). Use before_cursor from a
	// previous response. Mutually exclusive with after.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Opt-in to additional response fields
	//
	// Any of "total_count".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Policy representation format. `json` returns cedar_json, `cedar` returns
	// cedar_raw.
	//
	// Any of "cedar", "json".
	Format ZonePolicySetVersionListPoliciesParamsFormat `query:"format,omitzero" json:"-"`
	// Sort direction. Default is desc (newest first).
	//
	// Any of "asc", "desc".
	Order ZonePolicySetVersionListPoliciesParamsOrder `query:"order,omitzero" json:"-"`
	// Field to sort by.
	//
	// Any of "created_at".
	Sort ZonePolicySetVersionListPoliciesParamsSort `query:"sort,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicySetVersionListPoliciesParams) URLQuery added in v0.6.0

URLQuery serializes ZonePolicySetVersionListPoliciesParams's query parameters as `url.Values`.

type ZonePolicySetVersionListPoliciesParamsFormat added in v0.6.0

type ZonePolicySetVersionListPoliciesParamsFormat string

Policy representation format. `json` returns cedar_json, `cedar` returns cedar_raw.

const (
	ZonePolicySetVersionListPoliciesParamsFormatCedar ZonePolicySetVersionListPoliciesParamsFormat = "cedar"
	ZonePolicySetVersionListPoliciesParamsFormatJson  ZonePolicySetVersionListPoliciesParamsFormat = "json"
)

type ZonePolicySetVersionListPoliciesParamsOrder added in v0.6.0

type ZonePolicySetVersionListPoliciesParamsOrder string

Sort direction. Default is desc (newest first).

const (
	ZonePolicySetVersionListPoliciesParamsOrderAsc  ZonePolicySetVersionListPoliciesParamsOrder = "asc"
	ZonePolicySetVersionListPoliciesParamsOrderDesc ZonePolicySetVersionListPoliciesParamsOrder = "desc"
)

type ZonePolicySetVersionListPoliciesParamsSort added in v0.6.0

type ZonePolicySetVersionListPoliciesParamsSort string

Field to sort by.

const (
	ZonePolicySetVersionListPoliciesParamsSortCreatedAt ZonePolicySetVersionListPoliciesParamsSort = "created_at"
)

type ZonePolicySetVersionListPoliciesResponse added in v0.6.0

type ZonePolicySetVersionListPoliciesResponse struct {
	Items      []PolicyVersion                                    `json:"items" api:"required"`
	Pagination ZonePolicySetVersionListPoliciesResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicySetVersionListPoliciesResponse) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicySetVersionListPoliciesResponse) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetVersionListPoliciesResponse) UnmarshalJSON(data []byte) error

type ZonePolicySetVersionListPoliciesResponsePagination added in v0.6.0

type ZonePolicySetVersionListPoliciesResponsePagination struct {
	// Cursor of the last item on the current page. Pass to after for the next page.
	// Null when there is no next page.
	AfterCursor string `json:"after_cursor" api:"required"`
	// Cursor of the first item on the current page. Pass to before for the previous
	// page. Null when there is no previous page.
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the current filters. Only included when
	// expand=total_count is requested.
	TotalCount int64 `json:"total_count" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicySetVersionListPoliciesResponsePagination) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicySetVersionListPoliciesResponsePagination) UnmarshalJSON added in v0.6.0

type ZonePolicySetVersionListResponse added in v0.6.0

type ZonePolicySetVersionListResponse struct {
	Items      []PolicySetVersion                         `json:"items" api:"required"`
	Pagination ZonePolicySetVersionListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicySetVersionListResponse) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicySetVersionListResponse) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetVersionListResponse) UnmarshalJSON(data []byte) error

type ZonePolicySetVersionListResponsePagination added in v0.6.0

type ZonePolicySetVersionListResponsePagination struct {
	// Cursor of the last item on the current page. Pass to after for the next page.
	// Null when there is no next page.
	AfterCursor string `json:"after_cursor" api:"required"`
	// Cursor of the first item on the current page. Pass to before for the previous
	// page. Null when there is no previous page.
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the current filters. Only included when
	// expand=total_count is requested.
	TotalCount int64 `json:"total_count" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicySetVersionListResponsePagination) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicySetVersionListResponsePagination) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetVersionListResponsePagination) UnmarshalJSON(data []byte) error

type ZonePolicySetVersionNewParams added in v0.6.0

type ZonePolicySetVersionNewParams struct {
	ZoneID           string                 `path:"zone_id" api:"required" json:"-"`
	Manifest         PolicySetManifestParam `json:"manifest,omitzero" api:"required"`
	SchemaVersion    string                 `json:"schema_version" api:"required"`
	XAPIVersion      param.Opt[string]      `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string]      `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicySetVersionNewParams) MarshalJSON added in v0.6.0

func (r ZonePolicySetVersionNewParams) MarshalJSON() (data []byte, err error)

func (*ZonePolicySetVersionNewParams) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetVersionNewParams) UnmarshalJSON(data []byte) error

type ZonePolicySetVersionService added in v0.6.0

type ZonePolicySetVersionService struct {
	Options []option.RequestOption
}

Immutable policy set manifest snapshots

ZonePolicySetVersionService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZonePolicySetVersionService method instead.

func NewZonePolicySetVersionService added in v0.6.0

func NewZonePolicySetVersionService(opts ...option.RequestOption) (r ZonePolicySetVersionService)

NewZonePolicySetVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZonePolicySetVersionService) Archive added in v0.6.0

Archive a policy set version

func (*ZonePolicySetVersionService) Get added in v0.6.0

Get a specific policy set version

func (*ZonePolicySetVersionService) List added in v0.6.0

List versions of a policy set

func (*ZonePolicySetVersionService) ListPolicies added in v0.6.0

Returns the policy versions referenced by this policy set version's manifest as a paginated list.

func (*ZonePolicySetVersionService) New added in v0.6.0

Validates the manifest, computes SHA, and creates an immutable version snapshot.

func (*ZonePolicySetVersionService) Update added in v0.6.0

Set active=true to bind this version as the active zone policy set.

type ZonePolicySetVersionUpdateParams added in v0.6.0

type ZonePolicySetVersionUpdateParams struct {
	ZoneID      string `path:"zone_id" api:"required" json:"-"`
	PolicySetID string `path:"policy_set_id" api:"required" json:"-"`
	// Must be true. Binds this version as the active zone policy set.
	//
	// Any of true.
	Active           bool              `json:"active,omitzero" api:"required"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicySetVersionUpdateParams) MarshalJSON added in v0.6.0

func (r ZonePolicySetVersionUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZonePolicySetVersionUpdateParams) UnmarshalJSON added in v0.6.0

func (r *ZonePolicySetVersionUpdateParams) UnmarshalJSON(data []byte) error

type ZonePolicyUpdateParams added in v0.6.0

type ZonePolicyUpdateParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	Description      param.Opt[string] `json:"description,omitzero"`
	Name             param.Opt[string] `json:"name,omitzero"`
	IfMatch          param.Opt[string] `header:"If-Match,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicyUpdateParams) MarshalJSON added in v0.6.0

func (r ZonePolicyUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZonePolicyUpdateParams) UnmarshalJSON added in v0.6.0

func (r *ZonePolicyUpdateParams) UnmarshalJSON(data []byte) error

type ZonePolicyVersionArchiveParams added in v0.6.0

type ZonePolicyVersionArchiveParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	PolicyID         string            `path:"policy_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZonePolicyVersionGetParams added in v0.6.0

type ZonePolicyVersionGetParams struct {
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	PolicyID         string            `path:"policy_id" api:"required" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Policy representation format. `json` returns cedar_json, `cedar` returns
	// cedar_raw.
	//
	// Any of "cedar", "json".
	Format ZonePolicyVersionGetParamsFormat `query:"format,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicyVersionGetParams) URLQuery added in v0.6.0

func (r ZonePolicyVersionGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZonePolicyVersionGetParams's query parameters as `url.Values`.

type ZonePolicyVersionGetParamsFormat added in v0.6.0

type ZonePolicyVersionGetParamsFormat string

Policy representation format. `json` returns cedar_json, `cedar` returns cedar_raw.

const (
	ZonePolicyVersionGetParamsFormatCedar ZonePolicyVersionGetParamsFormat = "cedar"
	ZonePolicyVersionGetParamsFormatJson  ZonePolicyVersionGetParamsFormat = "json"
)

type ZonePolicyVersionListParams added in v0.6.0

type ZonePolicyVersionListParams struct {
	ZoneID string `path:"zone_id" api:"required" json:"-"`
	// Return items after this cursor (forward pagination). Use after_cursor from a
	// previous response. Mutually exclusive with before.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Return items before this cursor (backward pagination). Use before_cursor from a
	// previous response. Mutually exclusive with after.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit            param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Opt-in to additional response fields
	//
	// Any of "total_count".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Policy representation format. `json` returns cedar_json, `cedar` returns
	// cedar_raw.
	//
	// Any of "cedar", "json".
	Format ZonePolicyVersionListParamsFormat `query:"format,omitzero" json:"-"`
	// Sort direction. Default is desc (newest first).
	//
	// Any of "asc", "desc".
	Order ZonePolicyVersionListParamsOrder `query:"order,omitzero" json:"-"`
	// Field to sort by.
	//
	// Any of "created_at".
	Sort ZonePolicyVersionListParamsSort `query:"sort,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZonePolicyVersionListParams) URLQuery added in v0.6.0

func (r ZonePolicyVersionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZonePolicyVersionListParams's query parameters as `url.Values`.

type ZonePolicyVersionListParamsFormat added in v0.6.0

type ZonePolicyVersionListParamsFormat string

Policy representation format. `json` returns cedar_json, `cedar` returns cedar_raw.

const (
	ZonePolicyVersionListParamsFormatCedar ZonePolicyVersionListParamsFormat = "cedar"
	ZonePolicyVersionListParamsFormatJson  ZonePolicyVersionListParamsFormat = "json"
)

type ZonePolicyVersionListParamsOrder added in v0.6.0

type ZonePolicyVersionListParamsOrder string

Sort direction. Default is desc (newest first).

const (
	ZonePolicyVersionListParamsOrderAsc  ZonePolicyVersionListParamsOrder = "asc"
	ZonePolicyVersionListParamsOrderDesc ZonePolicyVersionListParamsOrder = "desc"
)

type ZonePolicyVersionListParamsSort added in v0.6.0

type ZonePolicyVersionListParamsSort string

Field to sort by.

const (
	ZonePolicyVersionListParamsSortCreatedAt ZonePolicyVersionListParamsSort = "created_at"
)

type ZonePolicyVersionListResponse added in v0.6.0

type ZonePolicyVersionListResponse struct {
	Items      []PolicyVersion                         `json:"items" api:"required"`
	Pagination ZonePolicyVersionListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicyVersionListResponse) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicyVersionListResponse) UnmarshalJSON added in v0.6.0

func (r *ZonePolicyVersionListResponse) UnmarshalJSON(data []byte) error

type ZonePolicyVersionListResponsePagination added in v0.6.0

type ZonePolicyVersionListResponsePagination struct {
	// Cursor of the last item on the current page. Pass to after for the next page.
	// Null when there is no next page.
	AfterCursor string `json:"after_cursor" api:"required"`
	// Cursor of the first item on the current page. Pass to before for the previous
	// page. Null when there is no previous page.
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the current filters. Only included when
	// expand=total_count is requested.
	TotalCount int64 `json:"total_count" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZonePolicyVersionListResponsePagination) RawJSON added in v0.6.0

Returns the unmodified JSON received from the API

func (*ZonePolicyVersionListResponsePagination) UnmarshalJSON added in v0.6.0

func (r *ZonePolicyVersionListResponsePagination) UnmarshalJSON(data []byte) error

type ZonePolicyVersionNewParams added in v0.6.0

type ZonePolicyVersionNewParams struct {
	ZoneID        string `path:"zone_id" api:"required" json:"-"`
	SchemaVersion string `json:"schema_version" api:"required"`
	// Cedar policy in human-readable Cedar syntax. Mutually exclusive with cedar_json.
	CedarRaw         param.Opt[string] `json:"cedar_raw,omitzero"`
	XAPIVersion      param.Opt[string] `header:"X-API-Version,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// Cedar policy in JSON representation. Mutually exclusive with cedar_raw.
	CedarJson any `json:"cedar_json,omitzero"`
	// contains filtered or unexported fields
}

func (ZonePolicyVersionNewParams) MarshalJSON added in v0.6.0

func (r ZonePolicyVersionNewParams) MarshalJSON() (data []byte, err error)

func (*ZonePolicyVersionNewParams) UnmarshalJSON added in v0.6.0

func (r *ZonePolicyVersionNewParams) UnmarshalJSON(data []byte) error

type ZonePolicyVersionService added in v0.6.0

type ZonePolicyVersionService struct {
	Options []option.RequestOption
}

Immutable policy version snapshots

ZonePolicyVersionService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZonePolicyVersionService method instead.

func NewZonePolicyVersionService added in v0.6.0

func NewZonePolicyVersionService(opts ...option.RequestOption) (r ZonePolicyVersionService)

NewZonePolicyVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZonePolicyVersionService) Archive added in v0.6.0

Archive a policy version

func (*ZonePolicyVersionService) Get added in v0.6.0

Get a specific policy version

func (*ZonePolicyVersionService) List added in v0.6.0

List versions of a policy

func (*ZonePolicyVersionService) New added in v0.6.0

Create a new immutable policy version

type ZoneProtocols

type ZoneProtocols struct {
	// OAuth 2.0 protocol configuration for a zone
	Oauth2 ZoneProtocolsOauth2 `json:"oauth2" api:"required"`
	// OpenID Connect protocol configuration for a zone
	Openid ZoneProtocolsOpenid `json:"openid" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Oauth2      respjson.Field
		Openid      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Protocol configuration for a zone

func (ZoneProtocols) RawJSON

func (r ZoneProtocols) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneProtocols) UnmarshalJSON

func (r *ZoneProtocols) UnmarshalJSON(data []byte) error

type ZoneProtocolsOauth2

type ZoneProtocolsOauth2 struct {
	// OAuth 2.0 authorization endpoint
	AuthorizationEndpoint string `json:"authorization_endpoint" api:"required" format:"uri"`
	// OAuth 2.0 Authorization Server Metadata endpoint
	// (.well-known/oauth-authorization-server)
	AuthorizationServerMetadata string `json:"authorization_server_metadata" api:"required" format:"uri"`
	// Whether Dynamic Client Registration is enabled
	DcrEnabled bool `json:"dcr_enabled" api:"required"`
	// OAuth 2.0 issuer identifier
	Issuer string `json:"issuer" api:"required" format:"uri"`
	// JSON Web Key Set endpoint
	JwksUri string `json:"jwks_uri" api:"required" format:"uri"`
	// Whether PKCE is required for authorization code flows
	PkceRequired bool `json:"pkce_required" api:"required"`
	// OAuth 2.0 redirect URI for this zone
	RedirectUri string `json:"redirect_uri" api:"required" format:"uri"`
	// OAuth 2.0 Dynamic Client Registration endpoint
	RegistrationEndpoint string `json:"registration_endpoint" api:"required" format:"uri"`
	// OAuth 2.0 token endpoint
	TokenEndpoint string `json:"token_endpoint" api:"required" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AuthorizationEndpoint       respjson.Field
		AuthorizationServerMetadata respjson.Field
		DcrEnabled                  respjson.Field
		Issuer                      respjson.Field
		JwksUri                     respjson.Field
		PkceRequired                respjson.Field
		RedirectUri                 respjson.Field
		RegistrationEndpoint        respjson.Field
		TokenEndpoint               respjson.Field
		ExtraFields                 map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OAuth 2.0 protocol configuration for a zone

func (ZoneProtocolsOauth2) RawJSON

func (r ZoneProtocolsOauth2) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneProtocolsOauth2) UnmarshalJSON

func (r *ZoneProtocolsOauth2) UnmarshalJSON(data []byte) error

type ZoneProtocolsOpenid

type ZoneProtocolsOpenid struct {
	// OpenID Connect Provider Configuration endpoint
	// (.well-known/openid-configuration)
	ProviderConfiguration string `json:"provider_configuration" api:"required" format:"uri"`
	// OpenID Connect UserInfo endpoint
	UserinfoEndpoint string `json:"userinfo_endpoint" api:"required" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ProviderConfiguration respjson.Field
		UserinfoEndpoint      respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpenID Connect protocol configuration for a zone

func (ZoneProtocolsOpenid) RawJSON

func (r ZoneProtocolsOpenid) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneProtocolsOpenid) UnmarshalJSON

func (r *ZoneProtocolsOpenid) UnmarshalJSON(data []byte) error

type ZoneProviderDeleteParams

type ZoneProviderDeleteParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneProviderGetParams

type ZoneProviderGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneProviderListParams

type ZoneProviderListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before     param.Opt[string] `query:"before,omitzero" json:"-"`
	Cursor     param.Opt[string] `query:"cursor,omitzero" json:"-"`
	Identifier param.Opt[string] `query:"identifier,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]                  `query:"limit,omitzero" json:"-"`
	Slug   param.Opt[string]                 `query:"slug,omitzero" json:"-"`
	Expand ZoneProviderListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// Any of "external", "keycard-vault", "keycard-sts".
	Type ZoneProviderListParamsType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneProviderListParams) URLQuery

func (r ZoneProviderListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneProviderListParams's query parameters as `url.Values`.

type ZoneProviderListParamsExpandString

type ZoneProviderListParamsExpandString string
const (
	ZoneProviderListParamsExpandStringTotalCount ZoneProviderListParamsExpandString = "total_count"
)

type ZoneProviderListParamsExpandUnion

type ZoneProviderListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneProviderListsExpandString)
	OfZoneProviderListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneProviderListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneProviderListParamsType

type ZoneProviderListParamsType string
const (
	ZoneProviderListParamsTypeExternal     ZoneProviderListParamsType = "external"
	ZoneProviderListParamsTypeKeycardVault ZoneProviderListParamsType = "keycard-vault"
	ZoneProviderListParamsTypeKeycardSts   ZoneProviderListParamsType = "keycard-sts"
)

type ZoneProviderListResponse

type ZoneProviderListResponse struct {
	Items []Provider `json:"items" api:"required"`
	// Pagination information
	PageInfo PageInfoPagination `json:"page_info" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneProviderListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		PageInfo    respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneProviderListResponse) RawJSON

func (r ZoneProviderListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneProviderListResponse) UnmarshalJSON

func (r *ZoneProviderListResponse) UnmarshalJSON(data []byte) error

type ZoneProviderListResponsePagination

type ZoneProviderListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneProviderListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneProviderListResponsePagination) UnmarshalJSON

func (r *ZoneProviderListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneProviderNewParams

type ZoneProviderNewParams struct {
	// User specified identifier, unique within the zone
	Identifier string `json:"identifier" api:"required"`
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Human-readable description
	Description param.Opt[string] `json:"description,omitzero"`
	// OAuth 2.0 client identifier
	ClientID param.Opt[string] `json:"client_id,omitzero"`
	// OAuth 2.0 client secret (will be encrypted and stored securely)
	ClientSecret param.Opt[string] `json:"client_secret,omitzero"`
	// Provider metadata
	Metadata any `json:"metadata,omitzero"`
	// Protocol-specific configuration for provider creation
	Protocols ZoneProviderNewParamsProtocols `json:"protocols,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneProviderNewParams) MarshalJSON

func (r ZoneProviderNewParams) MarshalJSON() (data []byte, err error)

func (*ZoneProviderNewParams) UnmarshalJSON

func (r *ZoneProviderNewParams) UnmarshalJSON(data []byte) error

type ZoneProviderNewParamsProtocols

type ZoneProviderNewParamsProtocols struct {
	// OAuth 2.0 protocol configuration for provider creation
	Oauth2 ZoneProviderNewParamsProtocolsOauth2 `json:"oauth2,omitzero"`
	// OpenID Connect protocol configuration for provider creation
	Openid ZoneProviderNewParamsProtocolsOpenid `json:"openid,omitzero"`
	// contains filtered or unexported fields
}

Protocol-specific configuration for provider creation

func (ZoneProviderNewParamsProtocols) MarshalJSON

func (r ZoneProviderNewParamsProtocols) MarshalJSON() (data []byte, err error)

func (*ZoneProviderNewParamsProtocols) UnmarshalJSON

func (r *ZoneProviderNewParamsProtocols) UnmarshalJSON(data []byte) error

type ZoneProviderNewParamsProtocolsOauth2

type ZoneProviderNewParamsProtocolsOauth2 struct {
	AuthorizationEndpoint param.Opt[string] `json:"authorization_endpoint,omitzero" format:"uri"`
	// Whether to include the resource parameter in authorization requests.
	AuthorizationResourceEnabled param.Opt[bool] `json:"authorization_resource_enabled,omitzero"`
	// The resource parameter value to include in authorization requests. Defaults to
	// "resource" when authorization_resource_enabled is true.
	AuthorizationResourceParameter param.Opt[string] `json:"authorization_resource_parameter,omitzero"`
	// OIDC issuer URL for discovery and token validation. When omitted, the provider
	// identifier is used as the issuer. New clients should always set this explicitly.
	Issuer               param.Opt[string] `json:"issuer,omitzero" format:"uri"`
	JwksUri              param.Opt[string] `json:"jwks_uri,omitzero" format:"uri"`
	RegistrationEndpoint param.Opt[string] `json:"registration_endpoint,omitzero" format:"uri"`
	// The query parameter name for scopes in authorization requests. Defaults to
	// "scope". Slack v2 uses "user_scope".
	ScopeParameter param.Opt[string] `json:"scope_parameter,omitzero"`
	// The separator character for scope values. Defaults to " " (space). Slack v2 uses
	// ",".
	ScopeSeparator param.Opt[string] `json:"scope_separator,omitzero"`
	TokenEndpoint  param.Opt[string] `json:"token_endpoint,omitzero" format:"uri"`
	// Dot-separated path to the access token in the token response body. Defaults to
	// "access_token". Slack v2 uses "authed_user.access_token".
	TokenResponseAccessTokenPointer param.Opt[string] `json:"token_response_access_token_pointer,omitzero"`
	// Custom query parameters appended to authorization redirect URLs. Use for
	// non-standard providers (e.g. Google prompt=consent, access_type=offline).
	AuthorizationParameters       map[string]string `json:"authorization_parameters,omitzero"`
	CodeChallengeMethodsSupported []string          `json:"code_challenge_methods_supported,omitzero"`
	ScopesSupported               []string          `json:"scopes_supported,omitzero"`
	// contains filtered or unexported fields
}

OAuth 2.0 protocol configuration for provider creation

func (ZoneProviderNewParamsProtocolsOauth2) MarshalJSON

func (r ZoneProviderNewParamsProtocolsOauth2) MarshalJSON() (data []byte, err error)

func (*ZoneProviderNewParamsProtocolsOauth2) UnmarshalJSON

func (r *ZoneProviderNewParamsProtocolsOauth2) UnmarshalJSON(data []byte) error

type ZoneProviderNewParamsProtocolsOpenid

type ZoneProviderNewParamsProtocolsOpenid struct {
	UserinfoEndpoint param.Opt[string] `json:"userinfo_endpoint,omitzero" format:"uri"`
	// contains filtered or unexported fields
}

OpenID Connect protocol configuration for provider creation

func (ZoneProviderNewParamsProtocolsOpenid) MarshalJSON

func (r ZoneProviderNewParamsProtocolsOpenid) MarshalJSON() (data []byte, err error)

func (*ZoneProviderNewParamsProtocolsOpenid) UnmarshalJSON

func (r *ZoneProviderNewParamsProtocolsOpenid) UnmarshalJSON(data []byte) error

type ZoneProviderService

type ZoneProviderService struct {
	Options []option.RequestOption
}

ZoneProviderService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneProviderService method instead.

func NewZoneProviderService

func NewZoneProviderService(opts ...option.RequestOption) (r ZoneProviderService)

NewZoneProviderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneProviderService) Delete

Permanently deletes a provider

func (*ZoneProviderService) Get

Returns details of a specific Provider by ID

func (*ZoneProviderService) List

Returns a list of providers in the specified zone

func (*ZoneProviderService) New

func (r *ZoneProviderService) New(ctx context.Context, zoneID string, body ZoneProviderNewParams, opts ...option.RequestOption) (res *Provider, err error)

Creates a new Provider - a system that supplies access to Resources and allows actors to authenticate

func (*ZoneProviderService) Update

func (r *ZoneProviderService) Update(ctx context.Context, id string, params ZoneProviderUpdateParams, opts ...option.RequestOption) (res *Provider, err error)

Updates a Provider's configuration and metadata

type ZoneProviderUpdateParams

type ZoneProviderUpdateParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// OAuth 2.0 client identifier. Set to null to remove.
	ClientID param.Opt[string] `json:"client_id,omitzero"`
	// OAuth 2.0 client secret (will be encrypted and stored securely). Set to null to
	// remove.
	ClientSecret param.Opt[string] `json:"client_secret,omitzero"`
	// Human-readable description
	Description param.Opt[string] `json:"description,omitzero"`
	// User specified identifier, unique within the zone
	Identifier param.Opt[string] `json:"identifier,omitzero"`
	// Human-readable name
	Name param.Opt[string] `json:"name,omitzero"`
	// Provider metadata. Set to null to remove all metadata.
	Metadata any `json:"metadata,omitzero"`
	// Protocol-specific configuration. Set to null to remove all protocols.
	Protocols ZoneProviderUpdateParamsProtocols `json:"protocols,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneProviderUpdateParams) MarshalJSON

func (r ZoneProviderUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZoneProviderUpdateParams) UnmarshalJSON

func (r *ZoneProviderUpdateParams) UnmarshalJSON(data []byte) error

type ZoneProviderUpdateParamsProtocols

type ZoneProviderUpdateParamsProtocols struct {
	// OAuth 2.0 protocol configuration. Set to null to remove all OAuth2 config.
	Oauth2 ZoneProviderUpdateParamsProtocolsOauth2 `json:"oauth2,omitzero"`
	// OpenID Connect protocol configuration. Set to null to remove all OpenID config.
	Openid ZoneProviderUpdateParamsProtocolsOpenid `json:"openid,omitzero"`
	// contains filtered or unexported fields
}

Protocol-specific configuration. Set to null to remove all protocols.

func (ZoneProviderUpdateParamsProtocols) MarshalJSON

func (r ZoneProviderUpdateParamsProtocols) MarshalJSON() (data []byte, err error)

func (*ZoneProviderUpdateParamsProtocols) UnmarshalJSON

func (r *ZoneProviderUpdateParamsProtocols) UnmarshalJSON(data []byte) error

type ZoneProviderUpdateParamsProtocolsOauth2

type ZoneProviderUpdateParamsProtocolsOauth2 struct {
	AuthorizationEndpoint param.Opt[string] `json:"authorization_endpoint,omitzero" format:"uri"`
	// Whether to include the resource parameter in authorization requests. Set to null
	// to unset.
	AuthorizationResourceEnabled param.Opt[bool] `json:"authorization_resource_enabled,omitzero"`
	// The resource parameter value to include in authorization requests. Defaults to
	// "resource" when authorization_resource_enabled is true. Set to null to unset.
	AuthorizationResourceParameter param.Opt[string] `json:"authorization_resource_parameter,omitzero"`
	JwksUri                        param.Opt[string] `json:"jwks_uri,omitzero" format:"uri"`
	RegistrationEndpoint           param.Opt[string] `json:"registration_endpoint,omitzero" format:"uri"`
	// The query parameter name for scopes in authorization requests. Defaults to
	// "scope". Set to null to unset.
	ScopeParameter param.Opt[string] `json:"scope_parameter,omitzero"`
	// The separator character for scope values. Defaults to " " (space). Set to null
	// to unset.
	ScopeSeparator param.Opt[string] `json:"scope_separator,omitzero"`
	TokenEndpoint  param.Opt[string] `json:"token_endpoint,omitzero" format:"uri"`
	// Dot-separated path to the access token in the token response body. Defaults to
	// "access_token". Set to null to unset.
	TokenResponseAccessTokenPointer param.Opt[string] `json:"token_response_access_token_pointer,omitzero"`
	// OIDC issuer URL for discovery and token validation. Cannot be set to null.
	Issuer param.Opt[string] `json:"issuer,omitzero" format:"uri"`
	// Custom query parameters appended to authorization redirect URLs. Set to null to
	// unset.
	AuthorizationParameters       map[string]string `json:"authorization_parameters,omitzero"`
	CodeChallengeMethodsSupported []string          `json:"code_challenge_methods_supported,omitzero"`
	ScopesSupported               []string          `json:"scopes_supported,omitzero"`
	// contains filtered or unexported fields
}

OAuth 2.0 protocol configuration. Set to null to remove all OAuth2 config.

func (ZoneProviderUpdateParamsProtocolsOauth2) MarshalJSON

func (r ZoneProviderUpdateParamsProtocolsOauth2) MarshalJSON() (data []byte, err error)

func (*ZoneProviderUpdateParamsProtocolsOauth2) UnmarshalJSON

func (r *ZoneProviderUpdateParamsProtocolsOauth2) UnmarshalJSON(data []byte) error

type ZoneProviderUpdateParamsProtocolsOpenid

type ZoneProviderUpdateParamsProtocolsOpenid struct {
	UserinfoEndpoint param.Opt[string] `json:"userinfo_endpoint,omitzero" format:"uri"`
	// contains filtered or unexported fields
}

OpenID Connect protocol configuration. Set to null to remove all OpenID config.

func (ZoneProviderUpdateParamsProtocolsOpenid) MarshalJSON

func (r ZoneProviderUpdateParamsProtocolsOpenid) MarshalJSON() (data []byte, err error)

func (*ZoneProviderUpdateParamsProtocolsOpenid) UnmarshalJSON

func (r *ZoneProviderUpdateParamsProtocolsOpenid) UnmarshalJSON(data []byte) error

type ZoneResourceDeleteParams

type ZoneResourceDeleteParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneResourceGetParams

type ZoneResourceGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneResourceListParams

type ZoneResourceListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Filter resources by credential provider ID
	CredentialProviderID param.Opt[string] `query:"credentialProviderId,omitzero" json:"-"`
	// Filter resources by identifier
	Identifier param.Opt[string] `query:"identifier,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]                  `query:"limit,omitzero" json:"-"`
	Slug   param.Opt[string]                 `query:"slug,omitzero" json:"-"`
	Expand ZoneResourceListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneResourceListParams) URLQuery

func (r ZoneResourceListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneResourceListParams's query parameters as `url.Values`.

type ZoneResourceListParamsExpandString

type ZoneResourceListParamsExpandString string
const (
	ZoneResourceListParamsExpandStringTotalCount ZoneResourceListParamsExpandString = "total_count"
)

type ZoneResourceListParamsExpandUnion

type ZoneResourceListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneResourceListsExpandString)
	OfZoneResourceListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneResourceListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneResourceListResponse

type ZoneResourceListResponse struct {
	Items []Resource `json:"items" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneResourceListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneResourceListResponse) RawJSON

func (r ZoneResourceListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneResourceListResponse) UnmarshalJSON

func (r *ZoneResourceListResponse) UnmarshalJSON(data []byte) error

type ZoneResourceListResponsePagination

type ZoneResourceListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneResourceListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneResourceListResponsePagination) UnmarshalJSON

func (r *ZoneResourceListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneResourceNewParams

type ZoneResourceNewParams struct {
	// User specified identifier, unique within the zone
	Identifier string `json:"identifier" api:"required"`
	// Human-readable name
	Name string `json:"name" api:"required"`
	// Human-readable description
	Description param.Opt[string] `json:"description,omitzero"`
	// ID of the application that provides this resource
	ApplicationID param.Opt[string] `json:"application_id,omitzero"`
	// ID of the credential provider to associate with the resource
	CredentialProviderID param.Opt[string] `json:"credential_provider_id,omitzero"`
	// The expected type of client for this credential. Native clients must use
	// localhost URLs for redirect_uris or URIs with custom schemes. Web clients must
	// use https URLs and must not use localhost as the hostname.
	//
	// Any of "native", "web".
	ApplicationType ZoneResourceNewParamsApplicationType `json:"application_type,omitzero"`
	// Entity metadata
	Metadata MetadataParam `json:"metadata,omitzero"`
	// Scopes supported by the resource
	Scopes []string `json:"scopes,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneResourceNewParams) MarshalJSON

func (r ZoneResourceNewParams) MarshalJSON() (data []byte, err error)

func (*ZoneResourceNewParams) UnmarshalJSON

func (r *ZoneResourceNewParams) UnmarshalJSON(data []byte) error

type ZoneResourceNewParamsApplicationType

type ZoneResourceNewParamsApplicationType string

The expected type of client for this credential. Native clients must use localhost URLs for redirect_uris or URIs with custom schemes. Web clients must use https URLs and must not use localhost as the hostname.

const (
	ZoneResourceNewParamsApplicationTypeNative ZoneResourceNewParamsApplicationType = "native"
	ZoneResourceNewParamsApplicationTypeWeb    ZoneResourceNewParamsApplicationType = "web"
)

type ZoneResourceService

type ZoneResourceService struct {
	Options []option.RequestOption
}

ZoneResourceService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneResourceService method instead.

func NewZoneResourceService

func NewZoneResourceService(opts ...option.RequestOption) (r ZoneResourceService)

NewZoneResourceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneResourceService) Delete

Permanently deletes a Resource

func (*ZoneResourceService) Get

Returns details of a specific Resource by ID

func (*ZoneResourceService) List

Returns a list of resources in the specified zone

func (*ZoneResourceService) New

func (r *ZoneResourceService) New(ctx context.Context, zoneID string, body ZoneResourceNewParams, opts ...option.RequestOption) (res *Resource, err error)

Creates a new Resource - a system that exposes protected information or functionality requiring authentication

func (*ZoneResourceService) Update

func (r *ZoneResourceService) Update(ctx context.Context, id string, params ZoneResourceUpdateParams, opts ...option.RequestOption) (res *Resource, err error)

Updates a Resource's configuration and metadata

type ZoneResourceUpdateParams

type ZoneResourceUpdateParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// ID of the application that provides this resource (set to null to unset)
	ApplicationID param.Opt[string] `json:"application_id,omitzero"`
	// ID of the credential provider to associate with the resource (set to null to
	// unset)
	CredentialProviderID param.Opt[string] `json:"credential_provider_id,omitzero"`
	// Human-readable description
	Description param.Opt[string] `json:"description,omitzero"`
	// User specified identifier, unique within the zone
	Identifier param.Opt[string] `json:"identifier,omitzero"`
	// Human-readable name
	Name param.Opt[string] `json:"name,omitzero"`
	// Entity metadata (set to null or {} to remove metadata)
	Metadata MetadataUpdateParam `json:"metadata,omitzero"`
	// Scopes supported by the resource (set to null to unset)
	Scopes []string `json:"scopes,omitzero"`
	// The expected type of client for this credential. Native clients must use
	// localhost URLs for redirect_uris or URIs with custom schemes. Web clients must
	// use https URLs and must not use localhost as the hostname.
	//
	// Any of "native", "web".
	ApplicationType ZoneResourceUpdateParamsApplicationType `json:"application_type,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneResourceUpdateParams) MarshalJSON

func (r ZoneResourceUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZoneResourceUpdateParams) UnmarshalJSON

func (r *ZoneResourceUpdateParams) UnmarshalJSON(data []byte) error

type ZoneResourceUpdateParamsApplicationType

type ZoneResourceUpdateParamsApplicationType string

The expected type of client for this credential. Native clients must use localhost URLs for redirect_uris or URIs with custom schemes. Web clients must use https URLs and must not use localhost as the hostname.

const (
	ZoneResourceUpdateParamsApplicationTypeNative ZoneResourceUpdateParamsApplicationType = "native"
	ZoneResourceUpdateParamsApplicationTypeWeb    ZoneResourceUpdateParamsApplicationType = "web"
)

type ZoneRole

type ZoneRole string

Zone role type. zone_manager has full management access, zone_viewer has read-only access.

const (
	ZoneRoleZoneManager ZoneRole = "zone_manager"
	ZoneRoleZoneViewer  ZoneRole = "zone_viewer"
)

type ZoneSecretDeleteParams

type ZoneSecretDeleteParams struct {
	// A globally unique opaque identifier
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZoneSecretGetParams

type ZoneSecretGetParams struct {
	// A globally unique opaque identifier
	ZoneID           string            `path:"zone_id" api:"required" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// contains filtered or unexported fields
}

type ZoneSecretGetResponse

type ZoneSecretGetResponse struct {
	// A globally unique opaque identifier
	ID        string                         `json:"id" api:"required"`
	CreatedAt time.Time                      `json:"created_at" api:"required" format:"date-time"`
	Data      ZoneSecretGetResponseDataUnion `json:"data" api:"required"`
	// A globally unique opaque identifier
	EntityID string `json:"entity_id" api:"required"`
	// A name for the entity to be displayed in UI
	Name      string    `json:"name" api:"required"`
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	Version   int64     `json:"version" api:"required"`
	// A globally unique opaque identifier
	ZoneID string `json:"zone_id" api:"required"`
	// A description of the entity
	Description string `json:"description"`
	// A JSON object containing arbitrary metadata. Metadata will not be encrypted.
	Metadata any `json:"metadata"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Data        respjson.Field
		EntityID    respjson.Field
		Name        respjson.Field
		UpdatedAt   respjson.Field
		Version     respjson.Field
		ZoneID      respjson.Field
		Description respjson.Field
		Metadata    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneSecretGetResponse) RawJSON

func (r ZoneSecretGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneSecretGetResponse) UnmarshalJSON

func (r *ZoneSecretGetResponse) UnmarshalJSON(data []byte) error

type ZoneSecretGetResponseDataUnion

type ZoneSecretGetResponseDataUnion struct {
	// This field is from variant [SecretTokenFields].
	Token string `json:"token"`
	// Any of "token", "password".
	Type string `json:"type"`
	// This field is from variant [SecretPasswordFields].
	Password string `json:"password"`
	// This field is from variant [SecretPasswordFields].
	Username string `json:"username"`
	JSON     struct {
		Token    respjson.Field
		Type     respjson.Field
		Password respjson.Field
		Username respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ZoneSecretGetResponseDataUnion contains all possible properties and values from SecretTokenFields, SecretPasswordFields.

Use the ZoneSecretGetResponseDataUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ZoneSecretGetResponseDataUnion) AsAny

func (u ZoneSecretGetResponseDataUnion) AsAny() anyZoneSecretGetResponseData

Use the following switch statement to find the correct variant

switch variant := ZoneSecretGetResponseDataUnion.AsAny().(type) {
case keycard.SecretTokenFields:
case keycard.SecretPasswordFields:
default:
  fmt.Errorf("no variant present")
}

func (ZoneSecretGetResponseDataUnion) AsPassword

func (ZoneSecretGetResponseDataUnion) AsToken

func (ZoneSecretGetResponseDataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneSecretGetResponseDataUnion) UnmarshalJSON

func (r *ZoneSecretGetResponseDataUnion) UnmarshalJSON(data []byte) error

type ZoneSecretListParams

type ZoneSecretListParams struct {
	// The entity to list all secrets for
	EntityID         param.Opt[string] `query:"entity_id,omitzero" json:"-"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// The type of secrets to list
	//
	// Any of "token", "password".
	Type ZoneSecretListParamsType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneSecretListParams) URLQuery

func (r ZoneSecretListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneSecretListParams's query parameters as `url.Values`.

type ZoneSecretListParamsType

type ZoneSecretListParamsType string

The type of secrets to list

const (
	ZoneSecretListParamsTypeToken    ZoneSecretListParamsType = "token"
	ZoneSecretListParamsTypePassword ZoneSecretListParamsType = "password"
)

type ZoneSecretNewParams

type ZoneSecretNewParams struct {
	Data ZoneSecretNewParamsDataUnion `json:"data,omitzero" api:"required"`
	// A globally unique opaque identifier
	EntityID string `json:"entity_id" api:"required"`
	// A name for the entity to be displayed in UI
	Name string `json:"name" api:"required"`
	// A description of the entity
	Description param.Opt[string] `json:"description,omitzero"`
	// Optional zone ID. This field is provided for API compatibility but is ignored
	// during processing. The zone ID is derived from the path parameter
	// (/zones/{zone_id}/secrets) and takes precedence.
	ZoneID           param.Opt[string] `json:"zone_id,omitzero"`
	XClientRequestID param.Opt[string] `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	// A JSON object containing arbitrary metadata. Metadata will not be encrypted.
	Metadata any `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneSecretNewParams) MarshalJSON

func (r ZoneSecretNewParams) MarshalJSON() (data []byte, err error)

func (*ZoneSecretNewParams) UnmarshalJSON

func (r *ZoneSecretNewParams) UnmarshalJSON(data []byte) error

type ZoneSecretNewParamsDataUnion

type ZoneSecretNewParamsDataUnion struct {
	OfToken    *SecretTokenFieldsParam    `json:",omitzero,inline"`
	OfPassword *SecretPasswordFieldsParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ZoneSecretNewParamsDataUnion) MarshalJSON

func (u ZoneSecretNewParamsDataUnion) MarshalJSON() ([]byte, error)

func (*ZoneSecretNewParamsDataUnion) UnmarshalJSON

func (u *ZoneSecretNewParamsDataUnion) UnmarshalJSON(data []byte) error

type ZoneSecretService

type ZoneSecretService struct {
	Options []option.RequestOption
}

ZoneSecretService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneSecretService method instead.

func NewZoneSecretService

func NewZoneSecretService(opts ...option.RequestOption) (r ZoneSecretService)

NewZoneSecretService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneSecretService) Delete

func (r *ZoneSecretService) Delete(ctx context.Context, id string, params ZoneSecretDeleteParams, opts ...option.RequestOption) (err error)

func (*ZoneSecretService) Get

func (*ZoneSecretService) List

func (r *ZoneSecretService) List(ctx context.Context, zoneID string, params ZoneSecretListParams, opts ...option.RequestOption) (res *[]Secret, err error)

func (*ZoneSecretService) New

func (r *ZoneSecretService) New(ctx context.Context, zoneID string, params ZoneSecretNewParams, opts ...option.RequestOption) (res *Secret, err error)

func (*ZoneSecretService) Update

func (r *ZoneSecretService) Update(ctx context.Context, id string, params ZoneSecretUpdateParams, opts ...option.RequestOption) (res *Secret, err error)

type ZoneSecretUpdateParams

type ZoneSecretUpdateParams struct {
	// A globally unique opaque identifier
	ZoneID string `path:"zone_id" api:"required" json:"-"`
	// A description of the entity
	Description param.Opt[string] `json:"description,omitzero"`
	// A name for the entity to be displayed in UI
	Name             param.Opt[string]               `json:"name,omitzero"`
	XClientRequestID param.Opt[string]               `header:"X-Client-Request-ID,omitzero" format:"uuid" json:"-"`
	Data             ZoneSecretUpdateParamsDataUnion `json:"data,omitzero"`
	// A JSON object containing arbitrary metadata. Metadata will not be encrypted.
	Metadata any `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneSecretUpdateParams) MarshalJSON

func (r ZoneSecretUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZoneSecretUpdateParams) UnmarshalJSON

func (r *ZoneSecretUpdateParams) UnmarshalJSON(data []byte) error

type ZoneSecretUpdateParamsDataUnion

type ZoneSecretUpdateParamsDataUnion struct {
	OfToken    *SecretTokenFieldsParam    `json:",omitzero,inline"`
	OfPassword *SecretPasswordFieldsParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ZoneSecretUpdateParamsDataUnion) MarshalJSON

func (u ZoneSecretUpdateParamsDataUnion) MarshalJSON() ([]byte, error)

func (*ZoneSecretUpdateParamsDataUnion) UnmarshalJSON

func (u *ZoneSecretUpdateParamsDataUnion) UnmarshalJSON(data []byte) error

type ZoneService

type ZoneService struct {
	Options                []option.RequestOption
	Applications           ZoneApplicationService
	ApplicationCredentials ZoneApplicationCredentialService
	DelegatedGrants        ZoneDelegatedGrantService
	Providers              ZoneProviderService
	Resources              ZoneResourceService
	Sessions               ZoneSessionService
	UserAgents             ZoneUserAgentService
	Users                  ZoneUserService
	Members                ZoneMemberService
	Secrets                ZoneSecretService
	// Zone-scoped Cedar schema management
	PolicySchemas ZonePolicySchemaService
	// Policy CRUD operations
	Policies ZonePolicyService
	// Policy set CRUD and binding management
	PolicySets ZonePolicySetService
}

ZoneService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneService method instead.

func NewZoneService

func NewZoneService(opts ...option.RequestOption) (r ZoneService)

NewZoneService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneService) Delete

func (r *ZoneService) Delete(ctx context.Context, zoneID string, opts ...option.RequestOption) (err error)

Permanently deletes a zone and all its associated resources

func (*ZoneService) Get

func (r *ZoneService) Get(ctx context.Context, zoneID string, query ZoneGetParams, opts ...option.RequestOption) (res *Zone, err error)

Returns details of a specific zone by ID

func (*ZoneService) List

func (r *ZoneService) List(ctx context.Context, query ZoneListParams, opts ...option.RequestOption) (res *ZoneListResponse, err error)

Returns a list of zones for the authenticated organization

func (*ZoneService) ListSessionResourceAccess

func (r *ZoneService) ListSessionResourceAccess(ctx context.Context, zoneID string, query ZoneListSessionResourceAccessParams, opts ...option.RequestOption) (res *ZoneListSessionResourceAccessResponse, err error)

Returns aggregated access records per session-resource pair. By default (rollup_children=true), includes access from descendant sessions. Set rollup_children=false to return only direct session access. At least one of user_id, session_id, or resource_id must be provided.

func (*ZoneService) New

func (r *ZoneService) New(ctx context.Context, body ZoneNewParams, opts ...option.RequestOption) (res *Zone, err error)

Creates a new zone for the authenticated organization. A zone is an isolated environment for IAM resources.

func (*ZoneService) Update

func (r *ZoneService) Update(ctx context.Context, zoneID string, body ZoneUpdateParams, opts ...option.RequestOption) (res *Zone, err error)

Updates a zone's configuration (partial update)

type ZoneSessionDeleteParams

type ZoneSessionDeleteParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneSessionGetParams

type ZoneSessionGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneSessionListParams

type ZoneSessionListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by user ID
	UserID param.Opt[string] `query:"user_id,omitzero" json:"-"`
	// Any of "true".
	Active ZoneSessionListParamsActive      `query:"active,omitzero" json:"-"`
	Expand ZoneSessionListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// Include nested sessions. When false (default), only returns entry sessions
	// (direct children of root user sessions). When true, returns all sessions with an
	// initiator, including nested sessions.
	//
	// Any of "true".
	IncludeNested ZoneSessionListParamsIncludeNested `query:"include_nested,omitzero" json:"-"`
	// Any of "user", "application".
	SessionType ZoneSessionListParamsSessionType `query:"session_type,omitzero" json:"-"`
	// Any of "active", "expired", "revoked".
	Status ZoneSessionListParamsStatus `query:"status,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneSessionListParams) URLQuery

func (r ZoneSessionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneSessionListParams's query parameters as `url.Values`.

type ZoneSessionListParamsActive

type ZoneSessionListParamsActive string
const (
	ZoneSessionListParamsActiveTrue ZoneSessionListParamsActive = "true"
)

type ZoneSessionListParamsExpandString

type ZoneSessionListParamsExpandString string
const (
	ZoneSessionListParamsExpandStringTotalCount ZoneSessionListParamsExpandString = "total_count"
)

type ZoneSessionListParamsExpandUnion

type ZoneSessionListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneSessionListsExpandString)
	OfZoneSessionListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneSessionListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneSessionListParamsIncludeNested

type ZoneSessionListParamsIncludeNested string

Include nested sessions. When false (default), only returns entry sessions (direct children of root user sessions). When true, returns all sessions with an initiator, including nested sessions.

const (
	ZoneSessionListParamsIncludeNestedTrue ZoneSessionListParamsIncludeNested = "true"
)

type ZoneSessionListParamsSessionType

type ZoneSessionListParamsSessionType string
const (
	ZoneSessionListParamsSessionTypeUser        ZoneSessionListParamsSessionType = "user"
	ZoneSessionListParamsSessionTypeApplication ZoneSessionListParamsSessionType = "application"
)

type ZoneSessionListParamsStatus

type ZoneSessionListParamsStatus string
const (
	ZoneSessionListParamsStatusActive  ZoneSessionListParamsStatus = "active"
	ZoneSessionListParamsStatusExpired ZoneSessionListParamsStatus = "expired"
	ZoneSessionListParamsStatusRevoked ZoneSessionListParamsStatus = "revoked"
)

type ZoneSessionListResponse

type ZoneSessionListResponse struct {
	Items []SessionUnion `json:"items" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneSessionListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneSessionListResponse) RawJSON

func (r ZoneSessionListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneSessionListResponse) UnmarshalJSON

func (r *ZoneSessionListResponse) UnmarshalJSON(data []byte) error

type ZoneSessionListResponsePagination

type ZoneSessionListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneSessionListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneSessionListResponsePagination) UnmarshalJSON

func (r *ZoneSessionListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneSessionService

type ZoneSessionService struct {
	Options []option.RequestOption
}

ZoneSessionService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneSessionService method instead.

func NewZoneSessionService

func NewZoneSessionService(opts ...option.RequestOption) (r ZoneSessionService)

NewZoneSessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneSessionService) Delete

Permanently deletes a session, effectively logging out the user or application

func (*ZoneSessionService) Get

Returns details of a specific session by session ID

func (*ZoneSessionService) List

Returns sessions in the specified zone. By default, returns entry sessions (app user sessions with an initiator that are roots or direct children of a root user session). Use include_nested=true to include nested sessions. Can be filtered by session type, status, and user.

func (*ZoneSessionService) Update

func (r *ZoneSessionService) Update(ctx context.Context, id string, params ZoneSessionUpdateParams, opts ...option.RequestOption) (res *SessionUnion, err error)

Revokes an active session

type ZoneSessionUpdateParams

type ZoneSessionUpdateParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// Any of "revoked".
	Status ZoneSessionUpdateParamsStatus `json:"status,omitzero" api:"required"`
	// contains filtered or unexported fields
}

func (ZoneSessionUpdateParams) MarshalJSON

func (r ZoneSessionUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZoneSessionUpdateParams) UnmarshalJSON

func (r *ZoneSessionUpdateParams) UnmarshalJSON(data []byte) error

type ZoneSessionUpdateParamsStatus

type ZoneSessionUpdateParamsStatus string
const (
	ZoneSessionUpdateParamsStatusRevoked ZoneSessionUpdateParamsStatus = "revoked"
)

type ZoneUpdateParams

type ZoneUpdateParams struct {
	// Application ID configured as the default MCP Gateway for the zone (set to null
	// to unset)
	DefaultMcpGatewayApplicationID param.Opt[string] `json:"default_mcp_gateway_application_id,omitzero"`
	// Human-readable description
	Description param.Opt[string] `json:"description,omitzero"`
	// Provider ID to configure for user login (set to null to unset)
	UserIdentityProviderID param.Opt[string] `json:"user_identity_provider_id,omitzero"`
	// Human-readable name
	Name param.Opt[string] `json:"name,omitzero"`
	// Whether the zone requires an invitation for email/password registration, only
	// applies when user_identity_provider_id is not set
	RequiresInvitation param.Opt[bool] `json:"requires_invitation,omitzero"`
	// AWS KMS configuration for zone encryption update (set to null to remove
	// customer-managed key and revert to default)
	EncryptionKey ZoneUpdateParamsEncryptionKey `json:"encryption_key,omitzero"`
	// Login flow style for the zone. 'default' uses standard authentication,
	// 'identifier_first' uses identifier-based provider routing. Set to null to reset
	// to 'default'.
	//
	// Any of "default", "identifier_first".
	LoginFlow ZoneUpdateParamsLoginFlow `json:"login_flow,omitzero"`
	// Protocol configuration update for a zone (partial update)
	Protocols ZoneUpdateParamsProtocols `json:"protocols,omitzero"`
	// contains filtered or unexported fields
}

func (ZoneUpdateParams) MarshalJSON

func (r ZoneUpdateParams) MarshalJSON() (data []byte, err error)

func (*ZoneUpdateParams) UnmarshalJSON

func (r *ZoneUpdateParams) UnmarshalJSON(data []byte) error

type ZoneUpdateParamsEncryptionKey

type ZoneUpdateParamsEncryptionKey struct {
	// AWS KMS Key ARN for encrypting the zone's data
	Arn string `json:"arn" api:"required"`
	// Any of "aws".
	Type string `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

AWS KMS configuration for zone encryption update (set to null to remove customer-managed key and revert to default)

The properties Arn, Type are required.

func (ZoneUpdateParamsEncryptionKey) MarshalJSON

func (r ZoneUpdateParamsEncryptionKey) MarshalJSON() (data []byte, err error)

func (*ZoneUpdateParamsEncryptionKey) UnmarshalJSON

func (r *ZoneUpdateParamsEncryptionKey) UnmarshalJSON(data []byte) error

type ZoneUpdateParamsLoginFlow

type ZoneUpdateParamsLoginFlow string

Login flow style for the zone. 'default' uses standard authentication, 'identifier_first' uses identifier-based provider routing. Set to null to reset to 'default'.

const (
	ZoneUpdateParamsLoginFlowDefault         ZoneUpdateParamsLoginFlow = "default"
	ZoneUpdateParamsLoginFlowIdentifierFirst ZoneUpdateParamsLoginFlow = "identifier_first"
)

type ZoneUpdateParamsProtocols

type ZoneUpdateParamsProtocols struct {
	// OAuth 2.0 protocol configuration update for a zone (partial update)
	Oauth2 ZoneUpdateParamsProtocolsOauth2 `json:"oauth2,omitzero"`
	// contains filtered or unexported fields
}

Protocol configuration update for a zone (partial update)

func (ZoneUpdateParamsProtocols) MarshalJSON

func (r ZoneUpdateParamsProtocols) MarshalJSON() (data []byte, err error)

func (*ZoneUpdateParamsProtocols) UnmarshalJSON

func (r *ZoneUpdateParamsProtocols) UnmarshalJSON(data []byte) error

type ZoneUpdateParamsProtocolsOauth2

type ZoneUpdateParamsProtocolsOauth2 struct {
	// Whether Dynamic Client Registration is enabled
	DcrEnabled param.Opt[bool] `json:"dcr_enabled,omitzero"`
	// Whether PKCE is required for authorization code flows
	PkceRequired param.Opt[bool] `json:"pkce_required,omitzero"`
	// contains filtered or unexported fields
}

OAuth 2.0 protocol configuration update for a zone (partial update)

func (ZoneUpdateParamsProtocolsOauth2) MarshalJSON

func (r ZoneUpdateParamsProtocolsOauth2) MarshalJSON() (data []byte, err error)

func (*ZoneUpdateParamsProtocolsOauth2) UnmarshalJSON

func (r *ZoneUpdateParamsProtocolsOauth2) UnmarshalJSON(data []byte) error

type ZoneUserAgentGetParams

type ZoneUserAgentGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneUserAgentListParams

type ZoneUserAgentListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]                   `query:"limit,omitzero" json:"-"`
	Expand ZoneUserAgentListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneUserAgentListParams) URLQuery

func (r ZoneUserAgentListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneUserAgentListParams's query parameters as `url.Values`.

type ZoneUserAgentListParamsExpandString

type ZoneUserAgentListParamsExpandString string
const (
	ZoneUserAgentListParamsExpandStringTotalCount ZoneUserAgentListParamsExpandString = "total_count"
)

type ZoneUserAgentListParamsExpandUnion

type ZoneUserAgentListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneUserAgentListsExpandString)
	OfZoneUserAgentListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneUserAgentListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneUserAgentListResponse

type ZoneUserAgentListResponse struct {
	Items []UserAgent `json:"items" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneUserAgentListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneUserAgentListResponse) RawJSON

func (r ZoneUserAgentListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneUserAgentListResponse) UnmarshalJSON

func (r *ZoneUserAgentListResponse) UnmarshalJSON(data []byte) error

type ZoneUserAgentListResponsePagination

type ZoneUserAgentListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneUserAgentListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneUserAgentListResponsePagination) UnmarshalJSON

func (r *ZoneUserAgentListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneUserAgentService

type ZoneUserAgentService struct {
	Options []option.RequestOption
}

ZoneUserAgentService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneUserAgentService method instead.

func NewZoneUserAgentService

func NewZoneUserAgentService(opts ...option.RequestOption) (r ZoneUserAgentService)

NewZoneUserAgentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneUserAgentService) Get

Returns details of a specific user agent by user agent ID

func (*ZoneUserAgentService) List

Returns a list of user agents in the specified zone. User agents represent client software (browsers, desktop apps, CLI tools) registered via OAuth 2.0 Dynamic Client Registration.

type ZoneUserGetParams

type ZoneUserGetParams struct {
	ZoneID string `path:"zoneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type ZoneUserListParams

type ZoneUserListParams struct {
	// Cursor for forward pagination
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit  param.Opt[int64]              `query:"limit,omitzero" json:"-"`
	Expand ZoneUserListParamsExpandUnion `query:"expand[],omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ZoneUserListParams) URLQuery

func (r ZoneUserListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ZoneUserListParams's query parameters as `url.Values`.

type ZoneUserListParamsExpandString

type ZoneUserListParamsExpandString string
const (
	ZoneUserListParamsExpandStringTotalCount ZoneUserListParamsExpandString = "total_count"
)

type ZoneUserListParamsExpandUnion

type ZoneUserListParamsExpandUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfZoneUserListsExpandString)
	OfZoneUserListsExpandString         param.Opt[string] `query:",omitzero,inline"`
	OfZoneUserListsExpandArrayItemArray []string          `query:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

type ZoneUserListResponse

type ZoneUserListResponse struct {
	Items []User `json:"items" api:"required"`
	// Cursor-based pagination metadata
	Pagination ZoneUserListResponsePagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ZoneUserListResponse) RawJSON

func (r ZoneUserListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ZoneUserListResponse) UnmarshalJSON

func (r *ZoneUserListResponse) UnmarshalJSON(data []byte) error

type ZoneUserListResponsePagination

type ZoneUserListResponsePagination struct {
	// An opaque cursor used for paginating through a list of results
	AfterCursor string `json:"after_cursor" api:"required"`
	// An opaque cursor used for paginating through a list of results
	BeforeCursor string `json:"before_cursor" api:"required"`
	// Total number of items matching the query. Only included when
	// expand[]=total_count is requested.
	TotalCount int64 `json:"total_count"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AfterCursor  respjson.Field
		BeforeCursor respjson.Field
		TotalCount   respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cursor-based pagination metadata

func (ZoneUserListResponsePagination) RawJSON

Returns the unmodified JSON received from the API

func (*ZoneUserListResponsePagination) UnmarshalJSON

func (r *ZoneUserListResponsePagination) UnmarshalJSON(data []byte) error

type ZoneUserService

type ZoneUserService struct {
	Options []option.RequestOption
}

ZoneUserService contains methods and other services that help with interacting with the keycard-api API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewZoneUserService method instead.

func NewZoneUserService

func NewZoneUserService(opts ...option.RequestOption) (r ZoneUserService)

NewZoneUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ZoneUserService) Get

func (r *ZoneUserService) Get(ctx context.Context, id string, query ZoneUserGetParams, opts ...option.RequestOption) (res *User, err error)

Returns details of a specific user by user ID

func (*ZoneUserService) List

func (r *ZoneUserService) List(ctx context.Context, zoneID string, query ZoneUserListParams, opts ...option.RequestOption) (res *ZoneUserListResponse, err error)

Returns a list of users in the specified zone. Can be filtered by email address.

Directories

Path Synopsis
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package json implements encoding and decoding of JSON as defined in RFC 7159.
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
packages
shared

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL