Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type Application
- type ApplicationOwnerType
- type ApplicationProtocols
- type ApplicationProtocolsOauth2
- type ApplicationTrait
- type Attestation
- type BaseFields
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type CredentialUnion
- func (u CredentialUnion) AsApplicationCredentialPassword() (v Password)
- func (u CredentialUnion) AsApplicationCredentialPublic() (v Public)
- func (u CredentialUnion) AsApplicationCredentialPublicKey() (v PublicKey)
- func (u CredentialUnion) AsApplicationCredentialToken() (v Token)
- func (u CredentialUnion) AsApplicationCredentialURL() (v URL)
- func (u CredentialUnion) RawJSON() string
- func (r *CredentialUnion) UnmarshalJSON(data []byte) error
- type EncryptionKeyAwsKmsConfig
- type EncryptionKeyAwsKmsConfigParam
- type EncryptionKeyAwsKmsConfigType
- type Error
- type Grant
- type GrantStatus
- type Invitation
- type InvitationAcceptParams
- type InvitationAcceptResponse
- type InvitationGetParams
- type InvitationGetResponse
- type InvitationService
- type InvitationStatus
- type Metadata
- type MetadataParam
- type MetadataUpdateParam
- type Organization
- type OrganizationExchangeTokenParams
- type OrganizationGetParams
- type OrganizationInvitationDeleteParams
- type OrganizationInvitationListParams
- type OrganizationInvitationListResponse
- type OrganizationInvitationNewParams
- type OrganizationInvitationService
- func (r *OrganizationInvitationService) Delete(ctx context.Context, invitationID string, ...) (err error)
- func (r *OrganizationInvitationService) List(ctx context.Context, organizationID string, ...) (res *OrganizationInvitationListResponse, err error)
- func (r *OrganizationInvitationService) New(ctx context.Context, organizationID string, ...) (res *Invitation, err error)
- type OrganizationListIdentitiesParams
- type OrganizationListIdentitiesResponse
- type OrganizationListIdentitiesResponseItem
- type OrganizationListIdentitiesResponseItemStatus
- type OrganizationListParams
- type OrganizationListResponse
- type OrganizationListRolesParams
- type OrganizationListRolesResponse
- type OrganizationListRolesResponseItem
- type OrganizationNewParams
- type OrganizationRole
- type OrganizationSSOConnectionDisableParams
- type OrganizationSSOConnectionEnableParams
- type OrganizationSSOConnectionGetParams
- type OrganizationSSOConnectionService
- func (r *OrganizationSSOConnectionService) Disable(ctx context.Context, organizationID string, ...) (err error)
- func (r *OrganizationSSOConnectionService) Enable(ctx context.Context, organizationID string, ...) (res *SSOConnection, err error)
- func (r *OrganizationSSOConnectionService) Get(ctx context.Context, organizationID string, ...) (res *SSOConnection, err error)
- func (r *OrganizationSSOConnectionService) Update(ctx context.Context, organizationID string, ...) (res *SSOConnection, err error)
- type OrganizationSSOConnectionUpdateParams
- type OrganizationService
- func (r *OrganizationService) ExchangeToken(ctx context.Context, organizationID string, ...) (res *TokenResponse, err error)
- func (r *OrganizationService) Get(ctx context.Context, organizationID string, params OrganizationGetParams, ...) (res *Organization, err error)
- func (r *OrganizationService) List(ctx context.Context, params OrganizationListParams, ...) (res *OrganizationListResponse, err error)
- func (r *OrganizationService) ListIdentities(ctx context.Context, organizationID string, ...) (res *OrganizationListIdentitiesResponse, err error)
- func (r *OrganizationService) ListRoles(ctx context.Context, organizationID string, params OrganizationListRolesParams, ...) (res *OrganizationListRolesResponse, err error)
- func (r *OrganizationService) New(ctx context.Context, params OrganizationNewParams, ...) (res *Organization, err error)
- func (r *OrganizationService) Update(ctx context.Context, organizationID string, params OrganizationUpdateParams, ...) (res *Organization, err error)
- type OrganizationServiceAccountCredentialDeleteParams
- type OrganizationServiceAccountCredentialGetParams
- type OrganizationServiceAccountCredentialListParams
- type OrganizationServiceAccountCredentialListResponse
- type OrganizationServiceAccountCredentialNewParams
- type OrganizationServiceAccountCredentialNewResponse
- type OrganizationServiceAccountCredentialService
- func (r *OrganizationServiceAccountCredentialService) Delete(ctx context.Context, credentialID string, ...) (err error)
- func (r *OrganizationServiceAccountCredentialService) Get(ctx context.Context, credentialID string, ...) (res *ServiceAccountCredential, err error)
- func (r *OrganizationServiceAccountCredentialService) List(ctx context.Context, serviceAccountID string, ...) (res *OrganizationServiceAccountCredentialListResponse, err error)
- func (r *OrganizationServiceAccountCredentialService) New(ctx context.Context, serviceAccountID string, ...) (res *OrganizationServiceAccountCredentialNewResponse, err error)
- func (r *OrganizationServiceAccountCredentialService) Update(ctx context.Context, credentialID string, ...) (res *ServiceAccountCredential, err error)
- type OrganizationServiceAccountCredentialUpdateParams
- type OrganizationServiceAccountDeleteParams
- type OrganizationServiceAccountGetParams
- type OrganizationServiceAccountListParams
- type OrganizationServiceAccountListResponse
- type OrganizationServiceAccountNewParams
- type OrganizationServiceAccountService
- func (r *OrganizationServiceAccountService) Delete(ctx context.Context, serviceAccountID string, ...) (err error)
- func (r *OrganizationServiceAccountService) Get(ctx context.Context, serviceAccountID string, ...) (res *ServiceAccount, err error)
- func (r *OrganizationServiceAccountService) List(ctx context.Context, organizationID string, ...) (res *OrganizationServiceAccountListResponse, err error)
- func (r *OrganizationServiceAccountService) New(ctx context.Context, organizationID string, ...) (res *ServiceAccount, err error)
- func (r *OrganizationServiceAccountService) Update(ctx context.Context, serviceAccountID string, ...) (res *ServiceAccount, err error)
- type OrganizationServiceAccountUpdateParams
- type OrganizationStatus
- type OrganizationUpdateParams
- type OrganizationUser
- type OrganizationUserDeleteParams
- type OrganizationUserGetParams
- type OrganizationUserListParams
- type OrganizationUserListResponse
- type OrganizationUserService
- func (r *OrganizationUserService) Delete(ctx context.Context, userID string, params OrganizationUserDeleteParams, ...) (err error)
- func (r *OrganizationUserService) Get(ctx context.Context, userID string, params OrganizationUserGetParams, ...) (res *OrganizationUser, err error)
- func (r *OrganizationUserService) List(ctx context.Context, organizationID string, params OrganizationUserListParams, ...) (res *OrganizationUserListResponse, err error)
- func (r *OrganizationUserService) Update(ctx context.Context, userID string, params OrganizationUserUpdateParams, ...) (res *OrganizationUser, err error)
- type OrganizationUserUpdateParams
- type PageInfoCursor
- type PageInfoPagination
- type Password
- type Policy
- type PolicyOwnerType
- type PolicySet
- type PolicySetManifest
- type PolicySetManifestEntry
- type PolicySetManifestEntryParam
- type PolicySetManifestParam
- type PolicySetOwnerType
- type PolicySetScopeType
- type PolicySetVersion
- type PolicySetWithBinding
- type PolicyVersion
- type Provider
- type ProviderOwnerType
- type ProviderProtocols
- type ProviderProtocolsOauth2
- type ProviderProtocolsOpenid
- type ProviderType
- type Public
- type PublicKey
- type Resource
- type ResourceApplicationType
- type ResourceOwnerType
- type RoleScope
- type SSOConnection
- type SSOConnectionProtocol
- type SSOConnectionProtocolOauth2
- type SSOConnectionProtocolOauth2Param
- type SSOConnectionProtocolOpenid
- type SSOConnectionProtocolOpenidParam
- type SSOConnectionProtocolParam
- type SchemaVersion
- type SchemaVersionStatus
- type SchemaVersionWithZoneInfo
- type Secret
- type SecretPasswordFields
- type SecretPasswordFieldsParam
- type SecretPasswordFieldsType
- type SecretTokenFields
- type SecretTokenFieldsParam
- type SecretTokenFieldsType
- type SecretType
- type ServiceAccount
- type ServiceAccountCredential
- type SessionApplicationSessionType
- type SessionApplicationSessionTypeMetadata
- type SessionUnion
- type SessionUnionMetadata
- type SessionUserSessionType
- type SessionUserSessionTypeMetadata
- type Token
- type TokenResponse
- type URL
- type User
- type UserAgent
- type Zone
- type ZoneApplicationCredentialDeleteParams
- type ZoneApplicationCredentialGetParams
- type ZoneApplicationCredentialListParams
- type ZoneApplicationCredentialListParamsExpandString
- type ZoneApplicationCredentialListParamsExpandUnion
- type ZoneApplicationCredentialListResponse
- type ZoneApplicationCredentialListResponsePagination
- type ZoneApplicationCredentialNewParams
- type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword
- type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic
- type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey
- type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken
- type ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL
- type ZoneApplicationCredentialNewResponseUnion
- func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPassword() (v Password)
- func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPublic() (v Public)
- func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialPublicKey() (v PublicKey)
- func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialToken() (v Token)
- func (u ZoneApplicationCredentialNewResponseUnion) AsApplicationCredentialURL() (v URL)
- func (u ZoneApplicationCredentialNewResponseUnion) RawJSON() string
- func (r *ZoneApplicationCredentialNewResponseUnion) UnmarshalJSON(data []byte) error
- type ZoneApplicationCredentialService
- func (r *ZoneApplicationCredentialService) Delete(ctx context.Context, id string, body ZoneApplicationCredentialDeleteParams, ...) (err error)
- func (r *ZoneApplicationCredentialService) Get(ctx context.Context, id string, query ZoneApplicationCredentialGetParams, ...) (res *CredentialUnion, err error)
- func (r *ZoneApplicationCredentialService) List(ctx context.Context, zoneID string, query ZoneApplicationCredentialListParams, ...) (res *ZoneApplicationCredentialListResponse, err error)
- func (r *ZoneApplicationCredentialService) New(ctx context.Context, zoneID string, body ZoneApplicationCredentialNewParams, ...) (res *ZoneApplicationCredentialNewResponseUnion, err error)
- func (r *ZoneApplicationCredentialService) Update(ctx context.Context, id string, params ZoneApplicationCredentialUpdateParams, ...) (res *CredentialUnion, err error)
- type ZoneApplicationCredentialUpdateParams
- type ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate
- type ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate
- type ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate
- type ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate
- type ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate
- type ZoneApplicationDeleteParams
- type ZoneApplicationDependencyAddParams
- type ZoneApplicationDependencyGetParams
- type ZoneApplicationDependencyListParams
- type ZoneApplicationDependencyListParamsExpandString
- type ZoneApplicationDependencyListParamsExpandUnion
- type ZoneApplicationDependencyListResponse
- type ZoneApplicationDependencyListResponsePagination
- type ZoneApplicationDependencyRemoveParams
- type ZoneApplicationDependencyService
- func (r *ZoneApplicationDependencyService) Add(ctx context.Context, dependencyID string, ...) (err error)
- func (r *ZoneApplicationDependencyService) Get(ctx context.Context, dependencyID string, ...) (res *Resource, err error)
- func (r *ZoneApplicationDependencyService) List(ctx context.Context, id string, params ZoneApplicationDependencyListParams, ...) (res *ZoneApplicationDependencyListResponse, err error)
- func (r *ZoneApplicationDependencyService) Remove(ctx context.Context, dependencyID string, ...) (err error)
- type ZoneApplicationGetParams
- type ZoneApplicationListCredentialsParams
- type ZoneApplicationListCredentialsParamsExpandString
- type ZoneApplicationListCredentialsParamsExpandUnion
- type ZoneApplicationListCredentialsResponse
- type ZoneApplicationListCredentialsResponsePagination
- type ZoneApplicationListParams
- type ZoneApplicationListParamsExpandString
- type ZoneApplicationListParamsExpandUnion
- type ZoneApplicationListResourcesParams
- type ZoneApplicationListResourcesParamsExpandString
- type ZoneApplicationListResourcesParamsExpandUnion
- type ZoneApplicationListResourcesResponse
- type ZoneApplicationListResourcesResponsePagination
- type ZoneApplicationListResponse
- type ZoneApplicationListResponsePagination
- type ZoneApplicationNewParams
- type ZoneApplicationNewParamsDependency
- type ZoneApplicationNewParamsProtocols
- type ZoneApplicationNewParamsProtocolsOauth2
- type ZoneApplicationService
- func (r *ZoneApplicationService) Delete(ctx context.Context, id string, body ZoneApplicationDeleteParams, ...) (err error)
- func (r *ZoneApplicationService) Get(ctx context.Context, id string, query ZoneApplicationGetParams, ...) (res *Application, err error)
- func (r *ZoneApplicationService) List(ctx context.Context, zoneID string, query ZoneApplicationListParams, ...) (res *ZoneApplicationListResponse, err error)
- func (r *ZoneApplicationService) ListCredentials(ctx context.Context, id string, params ZoneApplicationListCredentialsParams, ...) (res *ZoneApplicationListCredentialsResponse, err error)
- func (r *ZoneApplicationService) ListResources(ctx context.Context, id string, params ZoneApplicationListResourcesParams, ...) (res *ZoneApplicationListResourcesResponse, err error)
- func (r *ZoneApplicationService) New(ctx context.Context, zoneID string, body ZoneApplicationNewParams, ...) (res *Application, err error)
- func (r *ZoneApplicationService) Update(ctx context.Context, id string, params ZoneApplicationUpdateParams, ...) (res *Application, err error)
- type ZoneApplicationUpdateParams
- type ZoneApplicationUpdateParamsProtocols
- type ZoneApplicationUpdateParamsProtocolsOauth2
- type ZoneDelegatedGrantDeleteParams
- type ZoneDelegatedGrantGetParams
- type ZoneDelegatedGrantListParams
- type ZoneDelegatedGrantListParamsActive
- type ZoneDelegatedGrantListParamsExpandString
- type ZoneDelegatedGrantListParamsExpandUnion
- type ZoneDelegatedGrantListParamsStatus
- type ZoneDelegatedGrantListResponse
- type ZoneDelegatedGrantListResponsePagination
- type ZoneDelegatedGrantService
- func (r *ZoneDelegatedGrantService) Delete(ctx context.Context, id string, body ZoneDelegatedGrantDeleteParams, ...) (err error)
- func (r *ZoneDelegatedGrantService) Get(ctx context.Context, id string, query ZoneDelegatedGrantGetParams, ...) (res *Grant, err error)
- func (r *ZoneDelegatedGrantService) List(ctx context.Context, zoneID string, query ZoneDelegatedGrantListParams, ...) (res *ZoneDelegatedGrantListResponse, err error)
- func (r *ZoneDelegatedGrantService) Update(ctx context.Context, id string, params ZoneDelegatedGrantUpdateParams, ...) (res *Grant, err error)
- type ZoneDelegatedGrantUpdateParams
- type ZoneDelegatedGrantUpdateParamsStatus
- type ZoneGetParams
- type ZoneGetParamsExpandString
- type ZoneGetParamsExpandUnion
- type ZoneListParams
- type ZoneListParamsExpandString
- type ZoneListParamsExpandUnion
- type ZoneListResponse
- type ZoneListResponsePagination
- type ZoneListSessionResourceAccessParams
- type ZoneListSessionResourceAccessParamsExpandString
- type ZoneListSessionResourceAccessParamsExpandUnion
- type ZoneListSessionResourceAccessResponse
- type ZoneListSessionResourceAccessResponseItem
- type ZoneListSessionResourceAccessResponsePagination
- type ZoneLoginFlow
- type ZoneMember
- type ZoneMemberAddParams
- type ZoneMemberDeleteParams
- type ZoneMemberGetParams
- type ZoneMemberListParams
- type ZoneMemberListParamsExpandString
- type ZoneMemberListParamsExpandUnion
- type ZoneMemberListParamsRole
- type ZoneMemberListResponse
- type ZoneMemberListResponsePagination
- type ZoneMemberService
- func (r *ZoneMemberService) Add(ctx context.Context, zoneID string, body ZoneMemberAddParams, ...) (res *ZoneMember, err error)
- func (r *ZoneMemberService) Delete(ctx context.Context, organizationUserID string, body ZoneMemberDeleteParams, ...) (err error)
- func (r *ZoneMemberService) Get(ctx context.Context, organizationUserID string, query ZoneMemberGetParams, ...) (res *ZoneMember, err error)
- func (r *ZoneMemberService) List(ctx context.Context, zoneID string, query ZoneMemberListParams, ...) (res *ZoneMemberListResponse, err error)
- func (r *ZoneMemberService) Update(ctx context.Context, organizationUserID string, params ZoneMemberUpdateParams, ...) (res *ZoneMember, err error)
- type ZoneMemberUpdateParams
- type ZoneMember_Links
- type ZoneMember_LinksOrganizationUser
- type ZoneMember_LinksSelf
- type ZoneNewParams
- type ZoneNewParamsLoginFlow
- type ZoneNewParamsProtocols
- type ZoneNewParamsProtocolsOauth2
- type ZonePolicyArchiveParams
- type ZonePolicyGetParams
- type ZonePolicyListParams
- type ZonePolicyListParamsOrder
- type ZonePolicyListParamsSort
- type ZonePolicyListResponse
- type ZonePolicyListResponsePagination
- type ZonePolicyNewParams
- type ZonePolicySchemaGetParams
- type ZonePolicySchemaGetParamsFormat
- type ZonePolicySchemaListParams
- type ZonePolicySchemaListParamsFormat
- type ZonePolicySchemaListParamsOrder
- type ZonePolicySchemaListParamsSort
- type ZonePolicySchemaListResponse
- type ZonePolicySchemaListResponsePagination
- type ZonePolicySchemaService
- func (r *ZonePolicySchemaService) Get(ctx context.Context, version string, params ZonePolicySchemaGetParams, ...) (res *SchemaVersionWithZoneInfo, err error)
- func (r *ZonePolicySchemaService) List(ctx context.Context, zoneID string, params ZonePolicySchemaListParams, ...) (res *ZonePolicySchemaListResponse, err error)
- func (r *ZonePolicySchemaService) SetDefault(ctx context.Context, version string, params ZonePolicySchemaSetDefaultParams, ...) (res *SchemaVersionWithZoneInfo, err error)
- type ZonePolicySchemaSetDefaultParams
- type ZonePolicyService
- func (r *ZonePolicyService) Archive(ctx context.Context, policyID string, params ZonePolicyArchiveParams, ...) (res *Policy, err error)
- func (r *ZonePolicyService) Get(ctx context.Context, policyID string, params ZonePolicyGetParams, ...) (res *Policy, err error)
- func (r *ZonePolicyService) List(ctx context.Context, zoneID string, params ZonePolicyListParams, ...) (res *ZonePolicyListResponse, err error)
- func (r *ZonePolicyService) New(ctx context.Context, zoneID string, params ZonePolicyNewParams, ...) (res *Policy, err error)
- func (r *ZonePolicyService) Update(ctx context.Context, policyID string, params ZonePolicyUpdateParams, ...) (res *Policy, err error)
- type ZonePolicySetArchiveParams
- type ZonePolicySetGetParams
- type ZonePolicySetListParams
- type ZonePolicySetListParamsOrder
- type ZonePolicySetListParamsSort
- type ZonePolicySetListResponse
- type ZonePolicySetListResponsePagination
- type ZonePolicySetNewParams
- type ZonePolicySetNewParamsScopeType
- type ZonePolicySetService
- func (r *ZonePolicySetService) Archive(ctx context.Context, policySetID string, params ZonePolicySetArchiveParams, ...) (res *PolicySetWithBinding, err error)
- func (r *ZonePolicySetService) Get(ctx context.Context, policySetID string, params ZonePolicySetGetParams, ...) (res *PolicySetWithBinding, err error)
- func (r *ZonePolicySetService) List(ctx context.Context, zoneID string, params ZonePolicySetListParams, ...) (res *ZonePolicySetListResponse, err error)
- func (r *ZonePolicySetService) New(ctx context.Context, zoneID string, params ZonePolicySetNewParams, ...) (res *PolicySetWithBinding, err error)
- func (r *ZonePolicySetService) Update(ctx context.Context, policySetID string, params ZonePolicySetUpdateParams, ...) (res *PolicySetWithBinding, err error)
- type ZonePolicySetUpdateParams
- type ZonePolicySetVersionArchiveParams
- type ZonePolicySetVersionGetParams
- type ZonePolicySetVersionListParams
- type ZonePolicySetVersionListParamsOrder
- type ZonePolicySetVersionListParamsSort
- type ZonePolicySetVersionListPoliciesParams
- type ZonePolicySetVersionListPoliciesParamsFormat
- type ZonePolicySetVersionListPoliciesParamsOrder
- type ZonePolicySetVersionListPoliciesParamsSort
- type ZonePolicySetVersionListPoliciesResponse
- type ZonePolicySetVersionListPoliciesResponsePagination
- type ZonePolicySetVersionListResponse
- type ZonePolicySetVersionListResponsePagination
- type ZonePolicySetVersionNewParams
- type ZonePolicySetVersionService
- func (r *ZonePolicySetVersionService) Archive(ctx context.Context, versionID string, ...) (res *PolicySetVersion, err error)
- func (r *ZonePolicySetVersionService) Get(ctx context.Context, versionID string, params ZonePolicySetVersionGetParams, ...) (res *PolicySetVersion, err error)
- func (r *ZonePolicySetVersionService) List(ctx context.Context, policySetID string, params ZonePolicySetVersionListParams, ...) (res *ZonePolicySetVersionListResponse, err error)
- func (r *ZonePolicySetVersionService) ListPolicies(ctx context.Context, versionID string, ...) (res *ZonePolicySetVersionListPoliciesResponse, err error)
- func (r *ZonePolicySetVersionService) New(ctx context.Context, policySetID string, params ZonePolicySetVersionNewParams, ...) (res *PolicySetVersion, err error)
- func (r *ZonePolicySetVersionService) Update(ctx context.Context, versionID string, params ZonePolicySetVersionUpdateParams, ...) (res *PolicySetVersion, err error)
- type ZonePolicySetVersionUpdateParams
- type ZonePolicyUpdateParams
- type ZonePolicyVersionArchiveParams
- type ZonePolicyVersionGetParams
- type ZonePolicyVersionGetParamsFormat
- type ZonePolicyVersionListParams
- type ZonePolicyVersionListParamsFormat
- type ZonePolicyVersionListParamsOrder
- type ZonePolicyVersionListParamsSort
- type ZonePolicyVersionListResponse
- type ZonePolicyVersionListResponsePagination
- type ZonePolicyVersionNewParams
- type ZonePolicyVersionService
- func (r *ZonePolicyVersionService) Archive(ctx context.Context, versionID string, params ZonePolicyVersionArchiveParams, ...) (res *PolicyVersion, err error)
- func (r *ZonePolicyVersionService) Get(ctx context.Context, versionID string, params ZonePolicyVersionGetParams, ...) (res *PolicyVersion, err error)
- func (r *ZonePolicyVersionService) List(ctx context.Context, policyID string, params ZonePolicyVersionListParams, ...) (res *ZonePolicyVersionListResponse, err error)
- func (r *ZonePolicyVersionService) New(ctx context.Context, policyID string, params ZonePolicyVersionNewParams, ...) (res *PolicyVersion, err error)
- type ZoneProtocols
- type ZoneProtocolsOauth2
- type ZoneProtocolsOpenid
- type ZoneProviderDeleteParams
- type ZoneProviderGetParams
- type ZoneProviderListParams
- type ZoneProviderListParamsExpandString
- type ZoneProviderListParamsExpandUnion
- type ZoneProviderListParamsType
- type ZoneProviderListResponse
- type ZoneProviderListResponsePagination
- type ZoneProviderNewParams
- type ZoneProviderNewParamsProtocols
- type ZoneProviderNewParamsProtocolsOauth2
- type ZoneProviderNewParamsProtocolsOpenid
- type ZoneProviderService
- func (r *ZoneProviderService) Delete(ctx context.Context, id string, body ZoneProviderDeleteParams, ...) (err error)
- func (r *ZoneProviderService) Get(ctx context.Context, id string, query ZoneProviderGetParams, ...) (res *Provider, err error)
- func (r *ZoneProviderService) List(ctx context.Context, zoneID string, query ZoneProviderListParams, ...) (res *ZoneProviderListResponse, err error)
- func (r *ZoneProviderService) New(ctx context.Context, zoneID string, body ZoneProviderNewParams, ...) (res *Provider, err error)
- func (r *ZoneProviderService) Update(ctx context.Context, id string, params ZoneProviderUpdateParams, ...) (res *Provider, err error)
- type ZoneProviderUpdateParams
- type ZoneProviderUpdateParamsProtocols
- type ZoneProviderUpdateParamsProtocolsOauth2
- type ZoneProviderUpdateParamsProtocolsOpenid
- type ZoneResourceDeleteParams
- type ZoneResourceGetParams
- type ZoneResourceListParams
- type ZoneResourceListParamsExpandString
- type ZoneResourceListParamsExpandUnion
- type ZoneResourceListResponse
- type ZoneResourceListResponsePagination
- type ZoneResourceNewParams
- type ZoneResourceNewParamsApplicationType
- type ZoneResourceService
- func (r *ZoneResourceService) Delete(ctx context.Context, id string, body ZoneResourceDeleteParams, ...) (err error)
- func (r *ZoneResourceService) Get(ctx context.Context, id string, query ZoneResourceGetParams, ...) (res *Resource, err error)
- func (r *ZoneResourceService) List(ctx context.Context, zoneID string, query ZoneResourceListParams, ...) (res *ZoneResourceListResponse, err error)
- func (r *ZoneResourceService) New(ctx context.Context, zoneID string, body ZoneResourceNewParams, ...) (res *Resource, err error)
- func (r *ZoneResourceService) Update(ctx context.Context, id string, params ZoneResourceUpdateParams, ...) (res *Resource, err error)
- type ZoneResourceUpdateParams
- type ZoneResourceUpdateParamsApplicationType
- type ZoneRole
- type ZoneSecretDeleteParams
- type ZoneSecretGetParams
- type ZoneSecretGetResponse
- type ZoneSecretGetResponseDataUnion
- func (u ZoneSecretGetResponseDataUnion) AsAny() anyZoneSecretGetResponseData
- func (u ZoneSecretGetResponseDataUnion) AsPassword() (v SecretPasswordFields)
- func (u ZoneSecretGetResponseDataUnion) AsToken() (v SecretTokenFields)
- func (u ZoneSecretGetResponseDataUnion) RawJSON() string
- func (r *ZoneSecretGetResponseDataUnion) UnmarshalJSON(data []byte) error
- type ZoneSecretListParams
- type ZoneSecretListParamsType
- type ZoneSecretNewParams
- type ZoneSecretNewParamsDataUnion
- type ZoneSecretService
- func (r *ZoneSecretService) Delete(ctx context.Context, id string, params ZoneSecretDeleteParams, ...) (err error)
- func (r *ZoneSecretService) Get(ctx context.Context, id string, params ZoneSecretGetParams, ...) (res *ZoneSecretGetResponse, err error)
- func (r *ZoneSecretService) List(ctx context.Context, zoneID string, params ZoneSecretListParams, ...) (res *[]Secret, err error)
- func (r *ZoneSecretService) New(ctx context.Context, zoneID string, params ZoneSecretNewParams, ...) (res *Secret, err error)
- func (r *ZoneSecretService) Update(ctx context.Context, id string, params ZoneSecretUpdateParams, ...) (res *Secret, err error)
- type ZoneSecretUpdateParams
- type ZoneSecretUpdateParamsDataUnion
- type ZoneService
- func (r *ZoneService) Delete(ctx context.Context, zoneID string, opts ...option.RequestOption) (err error)
- func (r *ZoneService) Get(ctx context.Context, zoneID string, query ZoneGetParams, ...) (res *Zone, err error)
- func (r *ZoneService) List(ctx context.Context, query ZoneListParams, opts ...option.RequestOption) (res *ZoneListResponse, err error)
- func (r *ZoneService) ListSessionResourceAccess(ctx context.Context, zoneID string, query ZoneListSessionResourceAccessParams, ...) (res *ZoneListSessionResourceAccessResponse, err error)
- func (r *ZoneService) New(ctx context.Context, body ZoneNewParams, opts ...option.RequestOption) (res *Zone, err error)
- func (r *ZoneService) Update(ctx context.Context, zoneID string, body ZoneUpdateParams, ...) (res *Zone, err error)
- type ZoneSessionDeleteParams
- type ZoneSessionGetParams
- type ZoneSessionListParams
- type ZoneSessionListParamsActive
- type ZoneSessionListParamsExpandString
- type ZoneSessionListParamsExpandUnion
- type ZoneSessionListParamsIncludeNested
- type ZoneSessionListParamsSessionType
- type ZoneSessionListParamsStatus
- type ZoneSessionListResponse
- type ZoneSessionListResponsePagination
- type ZoneSessionService
- func (r *ZoneSessionService) Delete(ctx context.Context, id string, body ZoneSessionDeleteParams, ...) (err error)
- func (r *ZoneSessionService) Get(ctx context.Context, id string, query ZoneSessionGetParams, ...) (res *SessionUnion, err error)
- func (r *ZoneSessionService) List(ctx context.Context, zoneID string, query ZoneSessionListParams, ...) (res *ZoneSessionListResponse, err error)
- func (r *ZoneSessionService) Update(ctx context.Context, id string, params ZoneSessionUpdateParams, ...) (res *SessionUnion, err error)
- type ZoneSessionUpdateParams
- type ZoneSessionUpdateParamsStatus
- type ZoneUpdateParams
- type ZoneUpdateParamsEncryptionKey
- type ZoneUpdateParamsLoginFlow
- type ZoneUpdateParamsProtocols
- type ZoneUpdateParamsProtocolsOauth2
- type ZoneUserAgentGetParams
- type ZoneUserAgentListParams
- type ZoneUserAgentListParamsExpandString
- type ZoneUserAgentListParamsExpandUnion
- type ZoneUserAgentListResponse
- type ZoneUserAgentListResponsePagination
- type ZoneUserAgentService
- type ZoneUserGetParams
- type ZoneUserListParams
- type ZoneUserListParamsExpandString
- type ZoneUserListParamsExpandUnion
- type ZoneUserListResponse
- type ZoneUserListResponsePagination
- type ZoneUserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 Opt ¶
func Opt[T comparable](v T) param.Opt[T]
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.
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 ¶
func (r EncryptionKeyAwsKmsConfig) ToParam() EncryptionKeyAwsKmsConfigParam
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 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) UnmarshalJSON ¶
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 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 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 ¶
func (r *InvitationService) Accept(ctx context.Context, token string, body InvitationAcceptParams, opts ...option.RequestOption) (res *InvitationAcceptResponse, err error)
Accept and consume an invitation token to join the organization
func (*InvitationService) Get ¶
func (r *InvitationService) Get(ctx context.Context, token string, query InvitationGetParams, opts ...option.RequestOption) (res *InvitationGetResponse, err error)
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) 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 ¶
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 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 ¶
func (r OrganizationInvitationListResponse) RawJSON() string
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 ¶
func (r *OrganizationInvitationService) Delete(ctx context.Context, invitationID string, params OrganizationInvitationDeleteParams, opts ...option.RequestOption) (err error)
Delete an invitation
func (*OrganizationInvitationService) List ¶
func (r *OrganizationInvitationService) List(ctx context.Context, organizationID string, params OrganizationInvitationListParams, opts ...option.RequestOption) (res *OrganizationInvitationListResponse, err error)
List invitations for an organization
func (*OrganizationInvitationService) New ¶
func (r *OrganizationInvitationService) New(ctx context.Context, organizationID string, params OrganizationInvitationNewParams, opts ...option.RequestOption) (res *Invitation, err error)
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 ¶
func (r OrganizationListIdentitiesResponse) RawJSON() string
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 ¶
func (r OrganizationListIdentitiesResponseItem) RawJSON() string
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 ¶
func (r OrganizationListRolesResponse) RawJSON() string
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 ¶
func (r OrganizationListRolesResponseItem) RawJSON() string
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 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 ¶
func (r *OrganizationSSOConnectionService) Disable(ctx context.Context, organizationID string, body OrganizationSSOConnectionDisableParams, opts ...option.RequestOption) (err error)
Disable SSO for organization
func (*OrganizationSSOConnectionService) Enable ¶
func (r *OrganizationSSOConnectionService) Enable(ctx context.Context, organizationID string, params OrganizationSSOConnectionEnableParams, opts ...option.RequestOption) (res *SSOConnection, err error)
Enable SSO for organization
func (*OrganizationSSOConnectionService) Get ¶
func (r *OrganizationSSOConnectionService) Get(ctx context.Context, organizationID string, params OrganizationSSOConnectionGetParams, opts ...option.RequestOption) (res *SSOConnection, err error)
Get SSO connection configuration for organization
func (*OrganizationSSOConnectionService) Update ¶
func (r *OrganizationSSOConnectionService) Update(ctx context.Context, organizationID string, params OrganizationSSOConnectionUpdateParams, opts ...option.RequestOption) (res *SSOConnection, err error)
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 ¶
func (r *OrganizationService) List(ctx context.Context, params OrganizationListParams, opts ...option.RequestOption) (res *OrganizationListResponse, err error)
List organizations for the current user
func (*OrganizationService) ListIdentities ¶
func (r *OrganizationService) ListIdentities(ctx context.Context, organizationID string, params OrganizationListIdentitiesParams, opts ...option.RequestOption) (res *OrganizationListIdentitiesResponse, err error)
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 (r *OrganizationService) New(ctx context.Context, params OrganizationNewParams, opts ...option.RequestOption) (res *Organization, err error)
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 ¶
func (r OrganizationServiceAccountCredentialGetParams) URLQuery() (v url.Values, err error)
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 ¶
func (r OrganizationServiceAccountCredentialListParams) URLQuery() (v url.Values, err error)
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 ¶
func (r OrganizationServiceAccountCredentialListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrganizationServiceAccountCredentialListResponse) UnmarshalJSON ¶
func (r *OrganizationServiceAccountCredentialListResponse) UnmarshalJSON(data []byte) error
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 ¶
func (r OrganizationServiceAccountCredentialNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrganizationServiceAccountCredentialNewResponse) UnmarshalJSON ¶
func (r *OrganizationServiceAccountCredentialNewResponse) UnmarshalJSON(data []byte) error
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 ¶
func (r *OrganizationServiceAccountCredentialService) Delete(ctx context.Context, credentialID string, params OrganizationServiceAccountCredentialDeleteParams, opts ...option.RequestOption) (err error)
Delete a service account credential
func (*OrganizationServiceAccountCredentialService) Get ¶
func (r *OrganizationServiceAccountCredentialService) Get(ctx context.Context, credentialID string, params OrganizationServiceAccountCredentialGetParams, opts ...option.RequestOption) (res *ServiceAccountCredential, err error)
Get a specific service account credential
func (*OrganizationServiceAccountCredentialService) List ¶
func (r *OrganizationServiceAccountCredentialService) List(ctx context.Context, serviceAccountID string, params OrganizationServiceAccountCredentialListParams, opts ...option.RequestOption) (res *OrganizationServiceAccountCredentialListResponse, err error)
List credentials for a service account
func (*OrganizationServiceAccountCredentialService) New ¶
func (r *OrganizationServiceAccountCredentialService) New(ctx context.Context, serviceAccountID string, params OrganizationServiceAccountCredentialNewParams, opts ...option.RequestOption) (res *OrganizationServiceAccountCredentialNewResponse, err error)
Create a new credential for a service account
func (*OrganizationServiceAccountCredentialService) Update ¶
func (r *OrganizationServiceAccountCredentialService) Update(ctx context.Context, credentialID string, params OrganizationServiceAccountCredentialUpdateParams, opts ...option.RequestOption) (res *ServiceAccountCredential, err error)
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 ¶
func (r *OrganizationServiceAccountCredentialUpdateParams) UnmarshalJSON(data []byte) error
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 ¶
func (r OrganizationServiceAccountListResponse) RawJSON() string
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 ¶
func (r *OrganizationServiceAccountService) Delete(ctx context.Context, serviceAccountID string, params OrganizationServiceAccountDeleteParams, opts ...option.RequestOption) (err error)
Delete a service account
func (*OrganizationServiceAccountService) Get ¶
func (r *OrganizationServiceAccountService) Get(ctx context.Context, serviceAccountID string, params OrganizationServiceAccountGetParams, opts ...option.RequestOption) (res *ServiceAccount, err error)
Get a specific service account
func (*OrganizationServiceAccountService) List ¶
func (r *OrganizationServiceAccountService) List(ctx context.Context, organizationID string, params OrganizationServiceAccountListParams, opts ...option.RequestOption) (res *OrganizationServiceAccountListResponse, err error)
List service accounts for an organization
func (*OrganizationServiceAccountService) New ¶
func (r *OrganizationServiceAccountService) New(ctx context.Context, organizationID string, params OrganizationServiceAccountNewParams, opts ...option.RequestOption) (res *ServiceAccount, err error)
Create a new service account for an organization
func (*OrganizationServiceAccountService) Update ¶
func (r *OrganizationServiceAccountService) Update(ctx context.Context, serviceAccountID string, params OrganizationServiceAccountUpdateParams, opts ...option.RequestOption) (res *ServiceAccount, err error)
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 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 ¶
func (r OrganizationUserListResponse) RawJSON() string
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 ¶
func (r *OrganizationUserService) Delete(ctx context.Context, userID string, params OrganizationUserDeleteParams, opts ...option.RequestOption) (err error)
Remove a user from an organization
func (*OrganizationUserService) Get ¶
func (r *OrganizationUserService) Get(ctx context.Context, userID string, params OrganizationUserGetParams, opts ...option.RequestOption) (res *OrganizationUser, err error)
Get a specific user in an organization
func (*OrganizationUserService) List ¶
func (r *OrganizationUserService) List(ctx context.Context, organizationID string, params OrganizationUserListParams, opts ...option.RequestOption) (res *OrganizationUserListResponse, err error)
List users in an organization
func (*OrganizationUserService) Update ¶
func (r *OrganizationUserService) Update(ctx context.Context, userID string, params OrganizationUserUpdateParams, opts ...option.RequestOption) (res *OrganizationUser, err error)
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) UnmarshalJSON ¶
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) UnmarshalJSON ¶ added in v0.6.0
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) UnmarshalJSON ¶ added in v0.6.0
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
func (r PolicySetManifest) ToParam() PolicySetManifestParam
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
func (r PolicySetManifestEntry) ToParam() PolicySetManifestEntryParam
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) UnmarshalJSON ¶
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) UnmarshalJSON ¶
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) UnmarshalJSON ¶
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) UnmarshalJSON ¶
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)
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 ¶
func (r SSOConnectionProtocol) ToParam() SSOConnectionProtocolParam
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) UnmarshalJSON ¶
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 ¶
func (r SecretPasswordFields) ToParam() SecretPasswordFieldsParam
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 ¶
func (r SecretTokenFields) ToParam() SecretTokenFieldsParam
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 ¶
func (r SessionApplicationSessionType) RawJSON() string
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 ¶
func (r SessionApplicationSessionTypeMetadata) RawJSON() string
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 ¶
func (r SessionUserSessionTypeMetadata) RawJSON() string
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) UnmarshalJSON ¶
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) UnmarshalJSON ¶
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) UnmarshalJSON ¶
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) UnmarshalJSON ¶
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) UnmarshalJSON ¶
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 ¶
func (r ZoneApplicationCredentialListResponse) RawJSON() string
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 ¶
func (r ZoneApplicationCredentialListResponsePagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*ZoneApplicationCredentialListResponsePagination) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialListResponsePagination) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePassword) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublic) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreatePublicKey) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateToken) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialNewParamsBodyApplicationCredentialCreateURL) UnmarshalJSON(data []byte) error
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 ¶
func (u ZoneApplicationCredentialNewResponseUnion) RawJSON() string
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 ¶
func (r *ZoneApplicationCredentialService) Delete(ctx context.Context, id string, body ZoneApplicationCredentialDeleteParams, opts ...option.RequestOption) (err error)
Permanently deletes an application credential
func (*ZoneApplicationCredentialService) Get ¶
func (r *ZoneApplicationCredentialService) Get(ctx context.Context, id string, query ZoneApplicationCredentialGetParams, opts ...option.RequestOption) (res *CredentialUnion, err error)
Returns details of a specific application credential by ID
func (*ZoneApplicationCredentialService) List ¶
func (r *ZoneApplicationCredentialService) List(ctx context.Context, zoneID string, query ZoneApplicationCredentialListParams, opts ...option.RequestOption) (res *ZoneApplicationCredentialListResponse, err error)
Returns a list of application credentials in the specified zone
func (*ZoneApplicationCredentialService) New ¶
func (r *ZoneApplicationCredentialService) New(ctx context.Context, zoneID string, body ZoneApplicationCredentialNewParams, opts ...option.RequestOption) (res *ZoneApplicationCredentialNewResponseUnion, err error)
Creates a new application credential
func (*ZoneApplicationCredentialService) Update ¶
func (r *ZoneApplicationCredentialService) Update(ctx context.Context, id string, params ZoneApplicationCredentialUpdateParams, opts ...option.RequestOption) (res *CredentialUnion, err error)
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 (r ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialUpdateParamsBodyPasswordCredentialUpdate) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialUpdateParamsBodyPublicCredentialUpdate) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialUpdateParamsBodyPublicKeyCredentialUpdate) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialUpdateParamsBodyTokenCredentialUpdate) UnmarshalJSON(data []byte) error
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 (r ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate) MarshalJSON() (data []byte, err error)
func (*ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate) UnmarshalJSON ¶
func (r *ZoneApplicationCredentialUpdateParamsBodyURLCredentialUpdate) UnmarshalJSON(data []byte) error
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 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 ¶
func (r ZoneApplicationDependencyListResponse) RawJSON() string
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 ¶
func (r ZoneApplicationDependencyListResponsePagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*ZoneApplicationDependencyListResponsePagination) UnmarshalJSON ¶
func (r *ZoneApplicationDependencyListResponsePagination) UnmarshalJSON(data []byte) error
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 ¶
func (r *ZoneApplicationDependencyService) Add(ctx context.Context, dependencyID string, params ZoneApplicationDependencyAddParams, opts ...option.RequestOption) (err error)
Adds a resource dependency to an application
func (*ZoneApplicationDependencyService) Get ¶
func (r *ZoneApplicationDependencyService) Get(ctx context.Context, dependencyID string, query ZoneApplicationDependencyGetParams, opts ...option.RequestOption) (res *Resource, err error)
Retrieves a specific resource dependency of an application
func (*ZoneApplicationDependencyService) List ¶
func (r *ZoneApplicationDependencyService) List(ctx context.Context, id string, params ZoneApplicationDependencyListParams, opts ...option.RequestOption) (res *ZoneApplicationDependencyListResponse, err error)
Returns resource dependencies for an application
func (*ZoneApplicationDependencyService) Remove ¶
func (r *ZoneApplicationDependencyService) Remove(ctx context.Context, dependencyID string, body ZoneApplicationDependencyRemoveParams, opts ...option.RequestOption) (err error)
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 ¶
func (r ZoneApplicationListCredentialsResponse) RawJSON() string
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 ¶
func (r ZoneApplicationListCredentialsResponsePagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*ZoneApplicationListCredentialsResponsePagination) UnmarshalJSON ¶
func (r *ZoneApplicationListCredentialsResponsePagination) UnmarshalJSON(data []byte) error
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 ¶
func (r ZoneApplicationListResourcesResponse) RawJSON() string
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 ¶
func (r ZoneApplicationListResourcesResponsePagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*ZoneApplicationListResourcesResponsePagination) UnmarshalJSON ¶
func (r *ZoneApplicationListResourcesResponsePagination) UnmarshalJSON(data []byte) error
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 ¶
func (r ZoneApplicationListResponsePagination) RawJSON() string
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 ¶
func (r *ZoneApplicationService) Delete(ctx context.Context, id string, body ZoneApplicationDeleteParams, opts ...option.RequestOption) (err error)
Permanently deletes an application
func (*ZoneApplicationService) Get ¶
func (r *ZoneApplicationService) Get(ctx context.Context, id string, query ZoneApplicationGetParams, opts ...option.RequestOption) (res *Application, err error)
Returns details of a specific Application by ID
func (*ZoneApplicationService) List ¶
func (r *ZoneApplicationService) List(ctx context.Context, zoneID string, query ZoneApplicationListParams, opts ...option.RequestOption) (res *ZoneApplicationListResponse, err error)
Returns a list of applications in the specified zone
func (*ZoneApplicationService) ListCredentials ¶
func (r *ZoneApplicationService) ListCredentials(ctx context.Context, id string, params ZoneApplicationListCredentialsParams, opts ...option.RequestOption) (res *ZoneApplicationListCredentialsResponse, err error)
Returns a list of application credentials for a specific application
func (*ZoneApplicationService) ListResources ¶
func (r *ZoneApplicationService) ListResources(ctx context.Context, id string, params ZoneApplicationListResourcesParams, opts ...option.RequestOption) (res *ZoneApplicationListResourcesResponse, err error)
Returns a list of resources provided by an application
func (*ZoneApplicationService) New ¶
func (r *ZoneApplicationService) New(ctx context.Context, zoneID string, body ZoneApplicationNewParams, opts ...option.RequestOption) (res *Application, err error)
Creates a new Application - a software system with an identity that can access Resources
func (*ZoneApplicationService) Update ¶
func (r *ZoneApplicationService) Update(ctx context.Context, id string, params ZoneApplicationUpdateParams, opts ...option.RequestOption) (res *Application, err error)
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 ¶
func (r ZoneDelegatedGrantListResponse) RawJSON() string
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 ¶
func (r ZoneDelegatedGrantListResponsePagination) RawJSON() string
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 ¶
func (r *ZoneDelegatedGrantService) Delete(ctx context.Context, id string, body ZoneDelegatedGrantDeleteParams, opts ...option.RequestOption) (err error)
Permanently revokes a delegated grant, removing the user's access to the protected resource
func (*ZoneDelegatedGrantService) Get ¶
func (r *ZoneDelegatedGrantService) Get(ctx context.Context, id string, query ZoneDelegatedGrantGetParams, opts ...option.RequestOption) (res *Grant, err error)
Returns details of a specific delegated grant by grant ID
func (*ZoneDelegatedGrantService) List ¶
func (r *ZoneDelegatedGrantService) List(ctx context.Context, zoneID string, query ZoneDelegatedGrantListParams, opts ...option.RequestOption) (res *ZoneDelegatedGrantListResponse, err error)
Returns a list of delegated grants in the specified zone. Can be filtered by user, resource, or status.
func (*ZoneDelegatedGrantService) Update ¶
func (r *ZoneDelegatedGrantService) Update(ctx context.Context, id string, params ZoneDelegatedGrantUpdateParams, opts ...option.RequestOption) (res *Grant, err error)
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 ¶
func (r ZoneListSessionResourceAccessResponse) RawJSON() string
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 ¶
func (r ZoneListSessionResourceAccessResponseItem) RawJSON() string
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 ¶
func (r ZoneListSessionResourceAccessResponsePagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*ZoneListSessionResourceAccessResponsePagination) UnmarshalJSON ¶
func (r *ZoneListSessionResourceAccessResponsePagination) UnmarshalJSON(data []byte) error
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 ¶
func (r ZoneMemberListResponsePagination) RawJSON() string
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 ¶
func (r *ZoneMemberService) List(ctx context.Context, zoneID string, query ZoneMemberListParams, opts ...option.RequestOption) (res *ZoneMemberListResponse, err error)
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 ¶
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 ¶
func (r ZoneMember_LinksOrganizationUser) RawJSON() string
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
func (r ZonePolicyListResponsePagination) RawJSON() string
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
func (r ZonePolicySchemaListResponse) RawJSON() string
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
func (r ZonePolicySchemaListResponsePagination) RawJSON() string
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
func (r *ZonePolicySchemaService) Get(ctx context.Context, version string, params ZonePolicySchemaGetParams, opts ...option.RequestOption) (res *SchemaVersionWithZoneInfo, err error)
Get a policy schema by version
func (*ZonePolicySchemaService) List ¶ added in v0.6.0
func (r *ZonePolicySchemaService) List(ctx context.Context, zoneID string, params ZonePolicySchemaListParams, opts ...option.RequestOption) (res *ZonePolicySchemaListResponse, err error)
List policy schemas
func (*ZonePolicySchemaService) SetDefault ¶ added in v0.6.0
func (r *ZonePolicySchemaService) SetDefault(ctx context.Context, version string, params ZonePolicySchemaSetDefaultParams, opts ...option.RequestOption) (res *SchemaVersionWithZoneInfo, err error)
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
func (r *ZonePolicyService) List(ctx context.Context, zoneID string, params ZonePolicyListParams, opts ...option.RequestOption) (res *ZonePolicyListResponse, err error)
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
func (r ZonePolicySetListResponsePagination) RawJSON() string
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
func (r *ZonePolicySetService) List(ctx context.Context, zoneID string, params ZonePolicySetListParams, opts ...option.RequestOption) (res *ZonePolicySetListResponse, err error)
List policy sets in a zone
func (*ZonePolicySetService) New ¶ added in v0.6.0
func (r *ZonePolicySetService) New(ctx context.Context, zoneID string, params ZonePolicySetNewParams, opts ...option.RequestOption) (res *PolicySetWithBinding, err error)
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
func (r ZonePolicySetVersionListPoliciesParams) URLQuery() (v url.Values, err error)
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
func (r ZonePolicySetVersionListPoliciesResponse) RawJSON() string
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
func (r ZonePolicySetVersionListPoliciesResponsePagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*ZonePolicySetVersionListPoliciesResponsePagination) UnmarshalJSON ¶ added in v0.6.0
func (r *ZonePolicySetVersionListPoliciesResponsePagination) UnmarshalJSON(data []byte) error
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
func (r ZonePolicySetVersionListResponse) RawJSON() string
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
func (r ZonePolicySetVersionListResponsePagination) RawJSON() string
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
func (r *ZonePolicySetVersionService) Archive(ctx context.Context, versionID string, params ZonePolicySetVersionArchiveParams, opts ...option.RequestOption) (res *PolicySetVersion, err error)
Archive a policy set version
func (*ZonePolicySetVersionService) Get ¶ added in v0.6.0
func (r *ZonePolicySetVersionService) Get(ctx context.Context, versionID string, params ZonePolicySetVersionGetParams, opts ...option.RequestOption) (res *PolicySetVersion, err error)
Get a specific policy set version
func (*ZonePolicySetVersionService) List ¶ added in v0.6.0
func (r *ZonePolicySetVersionService) List(ctx context.Context, policySetID string, params ZonePolicySetVersionListParams, opts ...option.RequestOption) (res *ZonePolicySetVersionListResponse, err error)
List versions of a policy set
func (*ZonePolicySetVersionService) ListPolicies ¶ added in v0.6.0
func (r *ZonePolicySetVersionService) ListPolicies(ctx context.Context, versionID string, params ZonePolicySetVersionListPoliciesParams, opts ...option.RequestOption) (res *ZonePolicySetVersionListPoliciesResponse, err error)
Returns the policy versions referenced by this policy set version's manifest as a paginated list.
func (*ZonePolicySetVersionService) New ¶ added in v0.6.0
func (r *ZonePolicySetVersionService) New(ctx context.Context, policySetID string, params ZonePolicySetVersionNewParams, opts ...option.RequestOption) (res *PolicySetVersion, err error)
Validates the manifest, computes SHA, and creates an immutable version snapshot.
func (*ZonePolicySetVersionService) Update ¶ added in v0.6.0
func (r *ZonePolicySetVersionService) Update(ctx context.Context, versionID string, params ZonePolicySetVersionUpdateParams, opts ...option.RequestOption) (res *PolicySetVersion, err error)
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
func (r ZonePolicyVersionListResponse) RawJSON() string
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
func (r ZonePolicyVersionListResponsePagination) RawJSON() string
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
func (r *ZonePolicyVersionService) Archive(ctx context.Context, versionID string, params ZonePolicyVersionArchiveParams, opts ...option.RequestOption) (res *PolicyVersion, err error)
Archive a policy version
func (*ZonePolicyVersionService) Get ¶ added in v0.6.0
func (r *ZonePolicyVersionService) Get(ctx context.Context, versionID string, params ZonePolicyVersionGetParams, opts ...option.RequestOption) (res *PolicyVersion, err error)
Get a specific policy version
func (*ZonePolicyVersionService) List ¶ added in v0.6.0
func (r *ZonePolicyVersionService) List(ctx context.Context, policyID string, params ZonePolicyVersionListParams, opts ...option.RequestOption) (res *ZonePolicyVersionListResponse, err error)
List versions of a policy
func (*ZonePolicyVersionService) New ¶ added in v0.6.0
func (r *ZonePolicyVersionService) New(ctx context.Context, policyID string, params ZonePolicyVersionNewParams, opts ...option.RequestOption) (res *PolicyVersion, err error)
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 ¶
func (r ZoneProviderListResponsePagination) RawJSON() string
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 ¶
func (r *ZoneProviderService) Delete(ctx context.Context, id string, body ZoneProviderDeleteParams, opts ...option.RequestOption) (err error)
Permanently deletes a provider
func (*ZoneProviderService) Get ¶
func (r *ZoneProviderService) Get(ctx context.Context, id string, query ZoneProviderGetParams, opts ...option.RequestOption) (res *Provider, err error)
Returns details of a specific Provider by ID
func (*ZoneProviderService) List ¶
func (r *ZoneProviderService) List(ctx context.Context, zoneID string, query ZoneProviderListParams, opts ...option.RequestOption) (res *ZoneProviderListResponse, err error)
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 ¶
func (r ZoneResourceListResponsePagination) RawJSON() string
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 ¶
func (r *ZoneResourceService) Delete(ctx context.Context, id string, body ZoneResourceDeleteParams, opts ...option.RequestOption) (err error)
Permanently deletes a Resource
func (*ZoneResourceService) Get ¶
func (r *ZoneResourceService) Get(ctx context.Context, id string, query ZoneResourceGetParams, opts ...option.RequestOption) (res *Resource, err error)
Returns details of a specific Resource by ID
func (*ZoneResourceService) List ¶
func (r *ZoneResourceService) List(ctx context.Context, zoneID string, query ZoneResourceListParams, opts ...option.RequestOption) (res *ZoneResourceListResponse, err error)
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.
type ZoneSecretDeleteParams ¶
type ZoneSecretGetParams ¶
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 (u ZoneSecretGetResponseDataUnion) AsPassword() (v SecretPasswordFields)
func (ZoneSecretGetResponseDataUnion) AsToken ¶
func (u ZoneSecretGetResponseDataUnion) AsToken() (v SecretTokenFields)
func (ZoneSecretGetResponseDataUnion) RawJSON ¶
func (u ZoneSecretGetResponseDataUnion) RawJSON() string
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 (r *ZoneSecretService) Get(ctx context.Context, id string, params ZoneSecretGetParams, opts ...option.RequestOption) (res *ZoneSecretGetResponse, err error)
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 ¶
func (r ZoneSessionListResponsePagination) RawJSON() string
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 ¶
func (r *ZoneSessionService) Delete(ctx context.Context, id string, body ZoneSessionDeleteParams, opts ...option.RequestOption) (err error)
Permanently deletes a session, effectively logging out the user or application
func (*ZoneSessionService) Get ¶
func (r *ZoneSessionService) Get(ctx context.Context, id string, query ZoneSessionGetParams, opts ...option.RequestOption) (res *SessionUnion, err error)
Returns details of a specific session by session ID
func (*ZoneSessionService) List ¶
func (r *ZoneSessionService) List(ctx context.Context, zoneID string, query ZoneSessionListParams, opts ...option.RequestOption) (res *ZoneSessionListResponse, err error)
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 ¶
func (r ZoneUserAgentListResponsePagination) RawJSON() string
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 ¶
func (r *ZoneUserAgentService) Get(ctx context.Context, id string, query ZoneUserAgentGetParams, opts ...option.RequestOption) (res *UserAgent, err error)
Returns details of a specific user agent by user agent ID
func (*ZoneUserAgentService) List ¶
func (r *ZoneUserAgentService) List(ctx context.Context, zoneID string, query ZoneUserAgentListParams, opts ...option.RequestOption) (res *ZoneUserAgentListResponse, err error)
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 ¶
func (r ZoneUserListResponsePagination) RawJSON() string
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.
Source Files
¶
- aliases.go
- client.go
- field.go
- invitation.go
- organization.go
- organizationinvitation.go
- organizationserviceaccount.go
- organizationserviceaccountcredential.go
- organizationssoconnection.go
- organizationuser.go
- zone.go
- zoneapplication.go
- zoneapplicationcredential.go
- zoneapplicationdependency.go
- zonedelegatedgrant.go
- zonemember.go
- zonepolicy.go
- zonepolicyschema.go
- zonepolicyset.go
- zonepolicysetversion.go
- zonepolicyversion.go
- zoneprovider.go
- zoneresource.go
- zonesecret.go
- zonesession.go
- zoneuser.go
- zoneuseragent.go
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
|
|