licensekit

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 11 Imported by: 0

README

LicenseKit Go SDK

Go Reference

Official Go SDK for LicenseKit, the licensing API for software vendors and AI-native products.

It provides typed Management, Runtime, and System clients for the LicenseKit licensing API, including reporting and frozen export operations, plus least-privilege scope metadata and Ed25519 runtime-signature verification helpers for license activation, validation, device binding, metered usage, and offline-aware verification flows.

Links:

  • website: https://licensekit.dev
  • Go package docs: https://pkg.go.dev/github.com/drmain1/licensekit-go
  • docs: https://licensekit.dev/docs/agent-quickstart
  • API contract notes: https://licensekit.dev/docs/api-contract
  • OpenAPI spec: https://licensekit.dev/openapi.yaml
  • TypeScript SDK: https://www.npmjs.com/package/@licensekit/sdk
  • Python SDK: https://pypi.org/project/licensekit-sdk/

Distribution Status

The public Go module now lives at github.com/drmain1/licensekit-go.

External users should install:

go get github.com/drmain1/licensekit-go

This sdk/go directory remains the private monorepo source of truth used to generate and test the SDK before public release cuts.

For local development from this repository:

cd sdk/go
go test ./...

Why This Module

  • Typed Management, Runtime, and System clients generated from the live LicenseKit API contract
  • Scope metadata helpers for least-privilege API key design
  • Ed25519 runtime-signature verification helpers for trusted runtime validation
  • Raw response access for callers that need status codes, headers, or readiness bodies
  • Examples that default to https://api.licensekit.dev

Public Module Release

When you are ready to cut the next public Go SDK release:

  1. Create a dedicated public repository or vanity import path for the Go module.
  2. Prepare the public module copy with:
bash ./scripts/prepare_public_module.sh /tmp/licensekit-go github.com/drmain1/licensekit-go
  1. From the extracted public module, run:
go test ./...
git tag v1.0.0
git push origin main --tags

The extraction script rewrites the module path, README examples, and generator imports so the public repo is ready for tagging and indexing.

Quick Start

package main

import (
	"context"
	"fmt"
	"log"

	licensekit "github.com/drmain1/licensekit-go"
)

func main() {
	ctx := context.Background()
	baseURL := "https://api.licensekit.dev"

	system, err := licensekit.NewSystemClient(licensekit.SystemClientOptions{
		BaseURL: baseURL,
	})
	if err != nil {
		log.Fatal(err)
	}

	health, err := system.Health(ctx)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(health.Data.Status)

	management, err := licensekit.NewManagementClient(licensekit.ManagementClientOptions{
		ClientOptions: licensekit.ClientOptions{
			BaseURL: baseURL,
		},
		Token: "lkm_...",
	})
	if err != nil {
		log.Fatal(err)
	}

	product, err := management.CreateProduct(ctx, licensekit.CreateProductJSONRequestBody{
		Name: "Example App",
		Code: "example-app",
	})
	if err != nil {
		log.Fatal(err)
	}

	runtime, err := licensekit.NewRuntimeClient(licensekit.RuntimeClientOptions{
		ClientOptions: licensekit.ClientOptions{
			BaseURL: baseURL,
		},
		LicenseKey: "lsk_...",
	})
	if err != nil {
		log.Fatal(err)
	}

	fingerprint := "host-123"
	result, err := runtime.ValidateLicense(ctx, licensekit.ValidateLicenseJSONRequestBody{
		Fingerprint: &fingerprint,
	})
	if err != nil {
		log.Fatal(err)
	}

	publicKeys, err := system.ListPublicKeys(ctx)
	if err != nil {
		log.Fatal(err)
	}
	verified, err := licensekit.VerifyRuntimeResult(result, licensekit.NewPublicKeyStore(publicKeys.Data))
	if err != nil {
		log.Fatal(err)
	}

fmt.Println(product.Data.Id, verified.OK)
}

For more usage patterns, see examples/ and the package reference on pkg.go.dev.

Client Surfaces

  • ManagementClient Uses Authorization: Bearer <token> for /api/v1/... management operations, including /api/v1/activities and /api/v1/reports/....
  • RuntimeClient Uses Authorization: License <license-key> for /api/v1/license/... runtime operations.
  • SystemClient Unauthenticated access to /health, /healthz, /readyz, /metrics, and /api/v1/system/public-keys.

Hosted checks should prefer system.Health(ctx) because GET /health is the Cloud Run-safe liveness alias behind api.licensekit.dev. system.Healthz(ctx) remains available for local and self-hosted compatibility.

Scope Metadata

required, ok := licensekit.GetRequiredScopes(licensekit.ManagementOperationCreateProduct)
allowed := licensekit.HasRequiredScopes(
	licensekit.ManagementOperationCreateProduct,
	[]string{"product:write"},
)

Raw Response Access

Each client exposes a Raw companion for callers that need status codes or headers.

ready, err := system.Raw.Readyz(ctx)
if err != nil {
	log.Fatal(err)
}

fmt.Println(ready.Status, ready.Data.Data.Status)

This is useful for readiness checks, because GET /readyz may legitimately return 503 with a structured JSON body instead of an error envelope.

management.DownloadReportExport(ctx, id) returns raw bytes so JSON, CSV, and PDF report snapshots can all be handled without assuming a single response schema. Use management.Raw.DownloadReportExport(...) when you also need the response headers to branch on Content-Type.

Examples

Task-oriented examples live in examples/:

  • 01_create_scoped_api_key.go
  • 02_create_product_and_policy.go
  • 03_create_customer_and_license.go
  • 04_runtime_validate_and_verify.go
  • 05_renew_license.go
  • 06_reset_device.go

All examples default to https://api.licensekit.dev and can be redirected with LICENSEKIT_BASE_URL.

Development

Regenerate the SDK from the current OpenAPI:

go generate ./...

Format and test:

gofmt -w *.go generated/*.go
go test ./...

The low-level generated transport layer is recreated from the checked-in OpenAPI snapshot at openapi/openapi.yaml. In the private monorepo, go generate will refresh that snapshot from the backend contract automatically.

Documentation

Overview

Package licensekit provides typed Go clients for the LicenseKit licensing API.

It exposes Management, Runtime, and System clients generated from the canonical OpenAPI contract, plus least-privilege scope metadata and Ed25519 runtime-signature verification helpers for license activation, validation, metered usage, and offline-aware verification flows.

Product documentation lives at https://licensekit.dev and the API quickstart lives at https://licensekit.dev/docs/agent-quickstart.

Index

Examples

Constants

This section is empty.

Variables

View Source
var OperationScopes = map[ManagementOperationID]ScopeMetadata{
	ManagementOperationAssignLicenseFeature: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/features",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationBlacklistLicenseDevice: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/devices/{device_id}/blacklist",
		Scopes: []ManagementScope{DeviceWriteScope},
	},
	ManagementOperationCreateAPIKey: {
		Method: "POST",
		Path:   "/api/v1/api-keys",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationCreateCustomer: {
		Method: "POST",
		Path:   "/api/v1/customers",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationCreateFeature: {
		Method: "POST",
		Path:   "/api/v1/products/{id}/features",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationCreateLicense: {
		Method: "POST",
		Path:   "/api/v1/licenses",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationCreateOrder: {
		Method: "POST",
		Path:   "/api/v1/products/{id}/orders",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationCreatePolicy: {
		Method: "POST",
		Path:   "/api/v1/products/{id}/policies",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationCreateProduct: {
		Method: "POST",
		Path:   "/api/v1/products",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationCreateProductCustomFieldDefinition: {
		Method: "POST",
		Path:   "/api/v1/products/{id}/custom-fields",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationCreateProductVersion: {
		Method: "POST",
		Path:   "/api/v1/products/{id}/versions",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationCreateReportExport: {
		Method: "POST",
		Path:   "/api/v1/reports/exports",
		Scopes: []ManagementScope{ReportExportScope},
	},
	ManagementOperationCreateSubscription: {
		Method: "POST",
		Path:   "/api/v1/products/{id}/subscriptions",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationCreateWebhookEndpoint: {
		Method: "POST",
		Path:   "/api/v1/webhooks",
		Scopes: []ManagementScope{WebhookWriteScope},
	},
	ManagementOperationDeleteCustomer: {
		Method: "DELETE",
		Path:   "/api/v1/customers/{id}",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationDeletePolicy: {
		Method: "DELETE",
		Path:   "/api/v1/policies/{id}",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationDeleteProduct: {
		Method: "DELETE",
		Path:   "/api/v1/products/{id}",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationDeleteProductCustomFieldDefinition: {
		Method: "DELETE",
		Path:   "/api/v1/products/{id}/custom-fields/{field_id}",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationDeleteWebhookEndpoint: {
		Method: "DELETE",
		Path:   "/api/v1/webhooks/{id}",
		Scopes: []ManagementScope{WebhookWriteScope},
	},
	ManagementOperationDownloadReportExport: {
		Method: "GET",
		Path:   "/api/v1/reports/exports/{id}/download",
		Scopes: []ManagementScope{ReportExportScope},
	},
	ManagementOperationGetCustomer: {
		Method: "GET",
		Path:   "/api/v1/customers/{id}",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationGetCustomerSummary: {
		Method: "GET",
		Path:   "/api/v1/reports/customer-summary",
		Scopes: []ManagementScope{ReportReadScope},
	},
	ManagementOperationGetFeature: {
		Method: "GET",
		Path:   "/api/v1/features/{id}",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationGetLicense: {
		Method: "GET",
		Path:   "/api/v1/licenses/{id}",
		Scopes: []ManagementScope{LicenseReadScope},
	},
	ManagementOperationGetLicenseAuditReport: {
		Method: "GET",
		Path:   "/api/v1/reports/license-audit",
		Scopes: []ManagementScope{ReportReadScope},
	},
	ManagementOperationGetLicenseDevice: {
		Method: "GET",
		Path:   "/api/v1/licenses/{id}/devices/{device_id}",
		Scopes: []ManagementScope{LicenseReadScope},
	},
	ManagementOperationGetOpsSummary: {
		Method: "GET",
		Path:   "/api/v1/ops/summary",
		Scopes: []ManagementScope{OpsReadScope},
	},
	ManagementOperationGetOrder: {
		Method: "GET",
		Path:   "/api/v1/orders/{id}",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationGetPolicy: {
		Method: "GET",
		Path:   "/api/v1/policies/{id}",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationGetProduct: {
		Method: "GET",
		Path:   "/api/v1/products/{id}",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationGetProductCustomFieldDefinition: {
		Method: "GET",
		Path:   "/api/v1/products/{id}/custom-fields/{field_id}",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationGetReportExport: {
		Method: "GET",
		Path:   "/api/v1/reports/exports/{id}",
		Scopes: []ManagementScope{ReportExportScope},
	},
	ManagementOperationGetSubscription: {
		Method: "GET",
		Path:   "/api/v1/subscriptions/{id}",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationGetSubscriptionSettlement: {
		Method: "GET",
		Path:   "/api/v1/reports/subscription-settlement",
		Scopes: []ManagementScope{ReportReadScope},
	},
	ManagementOperationGetUsageSummary: {
		Method: "GET",
		Path:   "/api/v1/reports/usage-summary",
		Scopes: []ManagementScope{ReportReadScope},
	},
	ManagementOperationGetWebhookEndpoint: {
		Method: "GET",
		Path:   "/api/v1/webhooks/{id}",
		Scopes: []ManagementScope{WebhookWriteScope},
	},
	ManagementOperationGetWebhookHealth: {
		Method: "GET",
		Path:   "/api/v1/ops/webhook-health",
		Scopes: []ManagementScope{OpsReadScope},
	},
	ManagementOperationListAPIKeys: {
		Method: "GET",
		Path:   "/api/v1/api-keys",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationListActivities: {
		Method: "GET",
		Path:   "/api/v1/activities",
		Scopes: []ManagementScope{ReportReadScope},
	},
	ManagementOperationListCustomerCustomFieldValues: {
		Method: "GET",
		Path:   "/api/v1/customers/{id}/custom-fields",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationListCustomers: {
		Method: "GET",
		Path:   "/api/v1/customers",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationListEvents: {
		Method: "GET",
		Path:   "/api/v1/events",
		Scopes: []ManagementScope{EventReadScope},
	},
	ManagementOperationListFeaturesByProduct: {
		Method: "GET",
		Path:   "/api/v1/products/{id}/features",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationListLicenseCustomFieldValues: {
		Method: "GET",
		Path:   "/api/v1/licenses/{id}/custom-fields",
		Scopes: []ManagementScope{LicenseReadScope},
	},
	ManagementOperationListLicenseDevices: {
		Method: "GET",
		Path:   "/api/v1/licenses/{id}/devices",
		Scopes: []ManagementScope{LicenseReadScope},
	},
	ManagementOperationListLicenseFeatures: {
		Method: "GET",
		Path:   "/api/v1/licenses/{id}/features",
		Scopes: []ManagementScope{LicenseReadScope},
	},
	ManagementOperationListLicenses: {
		Method: "GET",
		Path:   "/api/v1/licenses",
		Scopes: []ManagementScope{LicenseReadScope},
	},
	ManagementOperationListPoliciesByProduct: {
		Method: "GET",
		Path:   "/api/v1/products/{id}/policies",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationListProductCustomFieldDefinitions: {
		Method: "GET",
		Path:   "/api/v1/products/{id}/custom-fields",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationListProductOrders: {
		Method: "GET",
		Path:   "/api/v1/products/{id}/orders",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationListProductSubscriptions: {
		Method: "GET",
		Path:   "/api/v1/products/{id}/subscriptions",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationListProductVersions: {
		Method: "GET",
		Path:   "/api/v1/products/{id}/versions",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationListProducts: {
		Method: "GET",
		Path:   "/api/v1/products",
		Scopes: []ManagementScope{ProductReadScope},
	},
	ManagementOperationListRuntimeErrorGroups: {
		Method: "GET",
		Path:   "/api/v1/ops/runtime-errors",
		Scopes: []ManagementScope{OpsReadScope},
	},
	ManagementOperationListUsageLedger: {
		Method: "GET",
		Path:   "/api/v1/reports/usage-ledger",
		Scopes: []ManagementScope{ReportReadScope},
	},
	ManagementOperationListWebhookEndpoints: {
		Method: "GET",
		Path:   "/api/v1/webhooks",
		Scopes: []ManagementScope{WebhookWriteScope},
	},
	ManagementOperationReinstateLicense: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/reinstate",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationRemoveLicenseFeature: {
		Method: "DELETE",
		Path:   "/api/v1/licenses/{id}/features/{feature_id}",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationRenewLicense: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/renew",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationResetLicenseDevice: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/devices/{device_id}/reset",
		Scopes: []ManagementScope{DeviceWriteScope},
	},
	ManagementOperationResetLicenseUsage: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/usage/reset",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationRevokeLicense: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/revoke",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationSuspendLicense: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/suspend",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationTransferLicense: {
		Method: "POST",
		Path:   "/api/v1/licenses/{id}/transfer",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
	ManagementOperationUpdateCustomer: {
		Method: "PATCH",
		Path:   "/api/v1/customers/{id}",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationUpdateOrder: {
		Method: "PATCH",
		Path:   "/api/v1/orders/{id}",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationUpdatePolicy: {
		Method: "PATCH",
		Path:   "/api/v1/policies/{id}",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationUpdateProduct: {
		Method: "PATCH",
		Path:   "/api/v1/products/{id}",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationUpdateProductCustomFieldDefinition: {
		Method: "PATCH",
		Path:   "/api/v1/products/{id}/custom-fields/{field_id}",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationUpdateSubscription: {
		Method: "PATCH",
		Path:   "/api/v1/subscriptions/{id}",
		Scopes: []ManagementScope{ProductWriteScope},
	},
	ManagementOperationUpdateWebhookEndpoint: {
		Method: "PATCH",
		Path:   "/api/v1/webhooks/{id}",
		Scopes: []ManagementScope{WebhookWriteScope},
	},
	ManagementOperationUpsertCustomerCustomFieldValue: {
		Method: "PUT",
		Path:   "/api/v1/customers/{id}/custom-fields/{field_id}",
		Scopes: []ManagementScope{AdminScope},
	},
	ManagementOperationUpsertLicenseCustomFieldValue: {
		Method: "PUT",
		Path:   "/api/v1/licenses/{id}/custom-fields/{field_id}",
		Scopes: []ManagementScope{LicenseWriteScope},
	},
}
View Source
var Operations = map[OperationID]OperationMetadata{
	OperationActivateLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/activate",
		Auth:    "license",
		Success: []int{200},
	},
	OperationAssignLicenseFeature: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/features",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationBlacklistLicenseDevice: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/devices/{device_id}/blacklist",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationCheckLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/check",
		Auth:    "license",
		Success: []int{200},
	},
	OperationCheckinFloatingLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/floating/checkin",
		Auth:    "license",
		Success: []int{200},
	},
	OperationCheckoutFloatingLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/floating/checkout",
		Auth:    "license",
		Success: []int{200},
	},
	OperationConsumeLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/consume",
		Auth:    "license",
		Success: []int{200},
	},
	OperationCreateAPIKey: {
		Method:  "POST",
		Path:    "/api/v1/api-keys",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateCustomer: {
		Method:  "POST",
		Path:    "/api/v1/customers",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateFeature: {
		Method:  "POST",
		Path:    "/api/v1/products/{id}/features",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateLicense: {
		Method:  "POST",
		Path:    "/api/v1/licenses",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateOrder: {
		Method:  "POST",
		Path:    "/api/v1/products/{id}/orders",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreatePolicy: {
		Method:  "POST",
		Path:    "/api/v1/products/{id}/policies",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateProduct: {
		Method:  "POST",
		Path:    "/api/v1/products",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateProductCustomFieldDefinition: {
		Method:  "POST",
		Path:    "/api/v1/products/{id}/custom-fields",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateProductVersion: {
		Method:  "POST",
		Path:    "/api/v1/products/{id}/versions",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateReportExport: {
		Method:  "POST",
		Path:    "/api/v1/reports/exports",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateSubscription: {
		Method:  "POST",
		Path:    "/api/v1/products/{id}/subscriptions",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationCreateWebhookEndpoint: {
		Method:  "POST",
		Path:    "/api/v1/webhooks",
		Auth:    "bearer",
		Success: []int{201},
	},
	OperationDeactivateLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/deactivate",
		Auth:    "license",
		Success: []int{200},
	},
	OperationDeleteCustomer: {
		Method:  "DELETE",
		Path:    "/api/v1/customers/{id}",
		Auth:    "bearer",
		Success: []int{204},
	},
	OperationDeletePolicy: {
		Method:  "DELETE",
		Path:    "/api/v1/policies/{id}",
		Auth:    "bearer",
		Success: []int{204},
	},
	OperationDeleteProduct: {
		Method:  "DELETE",
		Path:    "/api/v1/products/{id}",
		Auth:    "bearer",
		Success: []int{204},
	},
	OperationDeleteProductCustomFieldDefinition: {
		Method:  "DELETE",
		Path:    "/api/v1/products/{id}/custom-fields/{field_id}",
		Auth:    "bearer",
		Success: []int{204},
	},
	OperationDeleteWebhookEndpoint: {
		Method:  "DELETE",
		Path:    "/api/v1/webhooks/{id}",
		Auth:    "bearer",
		Success: []int{204},
	},
	OperationDownloadReportExport: {
		Method:  "GET",
		Path:    "/api/v1/reports/exports/{id}/download",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetCustomer: {
		Method:  "GET",
		Path:    "/api/v1/customers/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetCustomerSummary: {
		Method:  "GET",
		Path:    "/api/v1/reports/customer-summary",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetFeature: {
		Method:  "GET",
		Path:    "/api/v1/features/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetLicense: {
		Method:  "GET",
		Path:    "/api/v1/licenses/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetLicenseAuditReport: {
		Method:  "GET",
		Path:    "/api/v1/reports/license-audit",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetLicenseDevice: {
		Method:  "GET",
		Path:    "/api/v1/licenses/{id}/devices/{device_id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetMetrics: {
		Method:  "GET",
		Path:    "/metrics",
		Auth:    "none",
		Success: []int{200},
	},
	OperationGetOpsSummary: {
		Method:  "GET",
		Path:    "/api/v1/ops/summary",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetOrder: {
		Method:  "GET",
		Path:    "/api/v1/orders/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetPolicy: {
		Method:  "GET",
		Path:    "/api/v1/policies/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetProduct: {
		Method:  "GET",
		Path:    "/api/v1/products/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetProductCustomFieldDefinition: {
		Method:  "GET",
		Path:    "/api/v1/products/{id}/custom-fields/{field_id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetReportExport: {
		Method:  "GET",
		Path:    "/api/v1/reports/exports/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetSubscription: {
		Method:  "GET",
		Path:    "/api/v1/subscriptions/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetSubscriptionSettlement: {
		Method:  "GET",
		Path:    "/api/v1/reports/subscription-settlement",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetUsageSummary: {
		Method:  "GET",
		Path:    "/api/v1/reports/usage-summary",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetWebhookEndpoint: {
		Method:  "GET",
		Path:    "/api/v1/webhooks/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationGetWebhookHealth: {
		Method:  "GET",
		Path:    "/api/v1/ops/webhook-health",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationHealth: {
		Method:  "GET",
		Path:    "/health",
		Auth:    "none",
		Success: []int{200},
	},
	OperationHealthz: {
		Method:  "GET",
		Path:    "/healthz",
		Auth:    "none",
		Success: []int{200},
	},
	OperationHeartbeatFloatingLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/floating/heartbeat",
		Auth:    "license",
		Success: []int{200},
	},
	OperationIssueOfflineLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/offline",
		Auth:    "license",
		Success: []int{200},
	},
	OperationListAPIKeys: {
		Method:  "GET",
		Path:    "/api/v1/api-keys",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListActivities: {
		Method:  "GET",
		Path:    "/api/v1/activities",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListCustomerCustomFieldValues: {
		Method:  "GET",
		Path:    "/api/v1/customers/{id}/custom-fields",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListCustomers: {
		Method:  "GET",
		Path:    "/api/v1/customers",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListEvents: {
		Method:  "GET",
		Path:    "/api/v1/events",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListFeaturesByProduct: {
		Method:  "GET",
		Path:    "/api/v1/products/{id}/features",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListLicenseCustomFieldValues: {
		Method:  "GET",
		Path:    "/api/v1/licenses/{id}/custom-fields",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListLicenseDevices: {
		Method:  "GET",
		Path:    "/api/v1/licenses/{id}/devices",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListLicenseFeatures: {
		Method:  "GET",
		Path:    "/api/v1/licenses/{id}/features",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListLicenses: {
		Method:  "GET",
		Path:    "/api/v1/licenses",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListPoliciesByProduct: {
		Method:  "GET",
		Path:    "/api/v1/products/{id}/policies",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListProductCustomFieldDefinitions: {
		Method:  "GET",
		Path:    "/api/v1/products/{id}/custom-fields",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListProductOrders: {
		Method:  "GET",
		Path:    "/api/v1/products/{id}/orders",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListProductSubscriptions: {
		Method:  "GET",
		Path:    "/api/v1/products/{id}/subscriptions",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListProductVersions: {
		Method:  "GET",
		Path:    "/api/v1/products/{id}/versions",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListProducts: {
		Method:  "GET",
		Path:    "/api/v1/products",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListPublicKeys: {
		Method:  "GET",
		Path:    "/api/v1/system/public-keys",
		Auth:    "none",
		Success: []int{200},
	},
	OperationListRuntimeErrorGroups: {
		Method:  "GET",
		Path:    "/api/v1/ops/runtime-errors",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListUsageLedger: {
		Method:  "GET",
		Path:    "/api/v1/reports/usage-ledger",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationListWebhookEndpoints: {
		Method:  "GET",
		Path:    "/api/v1/webhooks",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationReadyz: {
		Method:  "GET",
		Path:    "/readyz",
		Auth:    "none",
		Success: []int{200, 503},
	},
	OperationReinstateLicense: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/reinstate",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationRemoveLicenseFeature: {
		Method:  "DELETE",
		Path:    "/api/v1/licenses/{id}/features/{feature_id}",
		Auth:    "bearer",
		Success: []int{204},
	},
	OperationRenewLicense: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/renew",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationResetLicenseDevice: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/devices/{device_id}/reset",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationResetLicenseUsage: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/usage/reset",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationRevokeLicense: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/revoke",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationSuspendLicense: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/suspend",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationTransferLicense: {
		Method:  "POST",
		Path:    "/api/v1/licenses/{id}/transfer",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationUpdateCustomer: {
		Method:  "PATCH",
		Path:    "/api/v1/customers/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationUpdateOrder: {
		Method:  "PATCH",
		Path:    "/api/v1/orders/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationUpdatePolicy: {
		Method:  "PATCH",
		Path:    "/api/v1/policies/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationUpdateProduct: {
		Method:  "PATCH",
		Path:    "/api/v1/products/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationUpdateProductCustomFieldDefinition: {
		Method:  "PATCH",
		Path:    "/api/v1/products/{id}/custom-fields/{field_id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationUpdateSubscription: {
		Method:  "PATCH",
		Path:    "/api/v1/subscriptions/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationUpdateWebhookEndpoint: {
		Method:  "PATCH",
		Path:    "/api/v1/webhooks/{id}",
		Auth:    "bearer",
		Success: []int{200},
	},
	OperationUpsertCustomerCustomFieldValue: {
		Method:  "PUT",
		Path:    "/api/v1/customers/{id}/custom-fields/{field_id}",
		Auth:    "bearer",
		Success: []int{200, 204},
	},
	OperationUpsertLicenseCustomFieldValue: {
		Method:  "PUT",
		Path:    "/api/v1/licenses/{id}/custom-fields/{field_id}",
		Auth:    "bearer",
		Success: []int{200, 204},
	},
	OperationValidateLicense: {
		Method:  "POST",
		Path:    "/api/v1/license/validate",
		Auth:    "license",
		Success: []int{200},
	},
}

Functions

func HasRequiredScopes

func HasRequiredScopes(operationID ManagementOperationID, scopes []string) bool

func IsApiError

func IsApiError(err error) bool

func NormalizeBaseURL

func NormalizeBaseURL(baseURL string) (string, error)

Types

type APIKey

type APIKey = licensekitgenerated.APIKey

type ApiError

type ApiError struct {
	Status    int
	Code      string
	Message   string
	Detail    string
	RequestID string
	Timestamp string
	Body      []byte
}

func ApiErrorFromResponse

func ApiErrorFromResponse(status int, body []byte) *ApiError

func (*ApiError) Error

func (e *ApiError) Error() string

type AssignLicenseFeatureResult

type AssignLicenseFeatureResult struct {
	Data licensekitgenerated.LicenseFeature `json:"data"`
	Meta licensekitgenerated.ResponseMeta   `json:"meta"`
}

type BlacklistLicenseDeviceResult

type BlacklistLicenseDeviceResult struct {
	Data licensekitgenerated.Device       `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ClientOptions

type ClientOptions struct {
	BaseURL    string
	HTTPClient HTTPDoer
	Headers    http.Header
	Timeout    time.Duration
	UserAgent  string
	Retry      *RetryOptions
}

type CreateAPIKeyResult

type CreateAPIKeyResult struct {
	Data licensekitgenerated.APIKeyCreateResponse `json:"data"`
	Meta licensekitgenerated.ResponseMeta         `json:"meta"`
}

type CreateCustomerResult

type CreateCustomerResult struct {
	Data licensekitgenerated.Customer     `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type CreateFeatureResult

type CreateFeatureResult struct {
	Data licensekitgenerated.Feature      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type CreateLicenseResult

type CreateLicenseResult struct {
	Data licensekitgenerated.LicenseCreateResponse `json:"data"`
	Meta licensekitgenerated.ResponseMeta          `json:"meta"`
}

type CreateOrderResult

type CreateOrderResult struct {
	Data licensekitgenerated.Order        `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type CreatePolicyResult

type CreatePolicyResult struct {
	Data licensekitgenerated.Policy       `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type CreateProductCustomFieldDefinitionResult

type CreateProductCustomFieldDefinitionResult struct {
	Data licensekitgenerated.CustomFieldDefinition `json:"data"`
	Meta licensekitgenerated.ResponseMeta          `json:"meta"`
}

type CreateProductResult

type CreateProductResult struct {
	Data licensekitgenerated.Product      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type CreateProductVersionResult

type CreateProductVersionResult struct {
	Data licensekitgenerated.ProductVersion `json:"data"`
	Meta licensekitgenerated.ResponseMeta   `json:"meta"`
}

type CreateReportExportJSONRequestBody added in v1.0.0

type CreateReportExportJSONRequestBody = licensekitgenerated.CreateReportExportJSONRequestBody

type CreateReportExportResult added in v1.0.0

type CreateReportExportResult struct {
	Data licensekitgenerated.ReportExportMetadata `json:"data"`
	Meta licensekitgenerated.ResponseMeta         `json:"meta"`
}

type CreateSubscriptionResult

type CreateSubscriptionResult struct {
	Data licensekitgenerated.Subscription `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type CreateWebhookEndpointResult

type CreateWebhookEndpointResult struct {
	Data licensekitgenerated.WebhookEndpointWithSecret `json:"data"`
	Meta licensekitgenerated.ResponseMeta              `json:"meta"`
}

type CursorParam

type CursorParam = licensekitgenerated.CursorParam

type Customer

type Customer = licensekitgenerated.Customer

type DeleteCustomerResult

type DeleteCustomerResult struct{}

type DeletePolicyResult

type DeletePolicyResult struct{}

type DeleteProductCustomFieldDefinitionResult

type DeleteProductCustomFieldDefinitionResult struct{}

type DeleteProductResult

type DeleteProductResult struct{}

type DeleteWebhookEndpointResult

type DeleteWebhookEndpointResult struct{}

type Device

type Device = licensekitgenerated.Device

type DeviceIDPath

type DeviceIDPath = licensekitgenerated.DeviceIDPath

type DeviceStatus

type DeviceStatus = licensekitgenerated.DeviceStatus

type DownloadReportExportResult added in v1.0.0

type DownloadReportExportResult []byte

type ErrorObject

type ErrorObject = licensekitgenerated.ErrorObject

type Event

type Event = licensekitgenerated.Event

type Feature

type Feature = licensekitgenerated.Feature

type FieldIDPath

type FieldIDPath = licensekitgenerated.FieldIDPath

type GetCustomerResult

type GetCustomerResult struct {
	Data licensekitgenerated.Customer     `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetCustomerSummaryParams added in v1.0.0

type GetCustomerSummaryParams = licensekitgenerated.GetCustomerSummaryParams

type GetCustomerSummaryResult added in v1.0.0

type GetCustomerSummaryResult struct {
	Data map[string]any                   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetFeatureResult

type GetFeatureResult struct {
	Data licensekitgenerated.Feature      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetLicenseAuditReportParams added in v1.0.0

type GetLicenseAuditReportParams = licensekitgenerated.GetLicenseAuditReportParams

type GetLicenseAuditReportResult added in v1.0.0

type GetLicenseAuditReportResult struct {
	Data map[string]any                   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetLicenseDeviceResult

type GetLicenseDeviceResult struct {
	Data licensekitgenerated.Device       `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetLicenseResult

type GetLicenseResult struct {
	Data licensekitgenerated.License      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetMetricsResult

type GetMetricsResult string

type GetOpsSummaryParams added in v1.0.0

type GetOpsSummaryParams = licensekitgenerated.GetOpsSummaryParams

type GetOpsSummaryResult added in v1.0.0

type GetOpsSummaryResult struct {
	Data map[string]any                   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetOrderResult

type GetOrderResult struct {
	Data licensekitgenerated.Order        `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetPolicyResult

type GetPolicyResult struct {
	Data licensekitgenerated.Policy       `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetProductCustomFieldDefinitionResult

type GetProductCustomFieldDefinitionResult struct {
	Data licensekitgenerated.CustomFieldDefinition `json:"data"`
	Meta licensekitgenerated.ResponseMeta          `json:"meta"`
}

type GetProductResult

type GetProductResult struct {
	Data licensekitgenerated.Product      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetReportExportResult added in v1.0.0

type GetReportExportResult struct {
	Data licensekitgenerated.ReportExportMetadata `json:"data"`
	Meta licensekitgenerated.ResponseMeta         `json:"meta"`
}

type GetSubscriptionResult

type GetSubscriptionResult struct {
	Data licensekitgenerated.Subscription `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetSubscriptionSettlementParams added in v1.0.0

type GetSubscriptionSettlementParams = licensekitgenerated.GetSubscriptionSettlementParams

type GetSubscriptionSettlementResult added in v1.0.0

type GetSubscriptionSettlementResult struct {
	Data map[string]any                   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetUsageSummaryParams added in v1.0.0

type GetUsageSummaryParams = licensekitgenerated.GetUsageSummaryParams

type GetUsageSummaryResult added in v1.0.0

type GetUsageSummaryResult struct {
	Data map[string]any                   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type GetWebhookEndpointResult

type GetWebhookEndpointResult struct {
	Data licensekitgenerated.WebhookEndpoint `json:"data"`
	Meta licensekitgenerated.ResponseMeta    `json:"meta"`
}

type GetWebhookHealthParams added in v1.0.0

type GetWebhookHealthParams = licensekitgenerated.GetWebhookHealthParams

type GetWebhookHealthResult added in v1.0.0

type GetWebhookHealthResult struct {
	Data map[string]any                   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type HTTPDoer

type HTTPDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

type HealthData

type HealthData = licensekitgenerated.HealthData

type HealthResult

type HealthResult struct {
	Data licensekitgenerated.HealthData   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type HealthzResult

type HealthzResult struct {
	Data licensekitgenerated.HealthData   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type IDPath

type IDPath = licensekitgenerated.IDPath

type IssueOfflineLicenseResult

type IssueOfflineLicenseResult struct {
	Data licensekitgenerated.OfflineEnvelope `json:"data"`
	Meta licensekitgenerated.ResponseMeta    `json:"meta"`
}

type License

type License = licensekitgenerated.License

type LicenseType

type LicenseType = licensekitgenerated.LicenseType

type LimitParam

type LimitParam = licensekitgenerated.LimitParam

type ListAPIKeysResult

type ListAPIKeysResult struct {
	Data []licensekitgenerated.APIKey     `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListActivitiesParams added in v1.0.0

type ListActivitiesParams = licensekitgenerated.ListActivitiesParams

type ListActivitiesResult added in v1.0.0

type ListActivitiesResult struct {
	Data     []map[string]any                  `json:"data"`
	Meta     licensekitgenerated.ResponseMeta  `json:"meta"`
	PageInfo licensekitgenerated.EventPageInfo `json:"page_info"`
}

type ListCustomerCustomFieldValuesResult

type ListCustomerCustomFieldValuesResult struct {
	Data []licensekitgenerated.CustomFieldValue `json:"data"`
	Meta licensekitgenerated.ResponseMeta       `json:"meta"`
}

type ListCustomersResult

type ListCustomersResult struct {
	Data []licensekitgenerated.Customer   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListEventsResult

type ListEventsResult struct {
	Data     []licensekitgenerated.Event       `json:"data"`
	Meta     licensekitgenerated.ResponseMeta  `json:"meta"`
	PageInfo licensekitgenerated.EventPageInfo `json:"page_info"`
}

type ListFeaturesByProductResult

type ListFeaturesByProductResult struct {
	Data []licensekitgenerated.Feature    `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListLicenseCustomFieldValuesResult

type ListLicenseCustomFieldValuesResult struct {
	Data []licensekitgenerated.CustomFieldValue `json:"data"`
	Meta licensekitgenerated.ResponseMeta       `json:"meta"`
}

type ListLicenseDevicesResult

type ListLicenseDevicesResult struct {
	Data []licensekitgenerated.Device     `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListLicenseFeaturesResult

type ListLicenseFeaturesResult struct {
	Data []licensekitgenerated.LicenseFeature `json:"data"`
	Meta licensekitgenerated.ResponseMeta     `json:"meta"`
}

type ListLicensesResult

type ListLicensesResult struct {
	Data []licensekitgenerated.License    `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListPoliciesByProductResult

type ListPoliciesByProductResult struct {
	Data []licensekitgenerated.Policy     `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListProductCustomFieldDefinitionsResult

type ListProductCustomFieldDefinitionsResult struct {
	Data []licensekitgenerated.CustomFieldDefinition `json:"data"`
	Meta licensekitgenerated.ResponseMeta            `json:"meta"`
}

type ListProductOrdersResult

type ListProductOrdersResult struct {
	Data []licensekitgenerated.Order      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListProductSubscriptionsResult

type ListProductSubscriptionsResult struct {
	Data []licensekitgenerated.Subscription `json:"data"`
	Meta licensekitgenerated.ResponseMeta   `json:"meta"`
}

type ListProductVersionsResult

type ListProductVersionsResult struct {
	Data []licensekitgenerated.ProductVersion `json:"data"`
	Meta licensekitgenerated.ResponseMeta     `json:"meta"`
}

type ListProductsResult

type ListProductsResult struct {
	Data []licensekitgenerated.Product    `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListPublicKeysResult

type ListPublicKeysResult struct {
	Data []licensekitgenerated.PublicKey  `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListRuntimeErrorGroupsParams added in v1.0.0

type ListRuntimeErrorGroupsParams = licensekitgenerated.ListRuntimeErrorGroupsParams

type ListRuntimeErrorGroupsResult added in v1.0.0

type ListRuntimeErrorGroupsResult struct {
	Data map[string]any                   `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ListUsageLedgerParams added in v1.0.0

type ListUsageLedgerParams = licensekitgenerated.ListUsageLedgerParams

type ListUsageLedgerResult added in v1.0.0

type ListUsageLedgerResult struct {
	Data     []map[string]any                  `json:"data"`
	Meta     licensekitgenerated.ResponseMeta  `json:"meta"`
	PageInfo licensekitgenerated.EventPageInfo `json:"page_info"`
}

type ListWebhookEndpointsResult

type ListWebhookEndpointsResult struct {
	Data []licensekitgenerated.WebhookEndpoint `json:"data"`
	Meta licensekitgenerated.ResponseMeta      `json:"meta"`
}

type ManagementClient

type ManagementClient struct {
	Raw *ManagementRawClient
	// contains filtered or unexported fields
}

func NewManagementClient

func NewManagementClient(options ManagementClientOptions) (*ManagementClient, error)

func (*ManagementClient) AssignLicenseFeature

func (c *ManagementClient) AssignLicenseFeature(ctx context.Context, id IDPath, body AssignLicenseFeatureJSONRequestBody, requestOptions ...RequestOption) (*AssignLicenseFeatureResult, error)

func (*ManagementClient) BlacklistLicenseDevice

func (c *ManagementClient) BlacklistLicenseDevice(ctx context.Context, id IDPath, deviceID DeviceIDPath, requestOptions ...RequestOption) (*BlacklistLicenseDeviceResult, error)

func (*ManagementClient) CreateAPIKey

func (c *ManagementClient) CreateAPIKey(ctx context.Context, body CreateAPIKeyJSONRequestBody, requestOptions ...RequestOption) (*CreateAPIKeyResult, error)

func (*ManagementClient) CreateCustomer

func (c *ManagementClient) CreateCustomer(ctx context.Context, body CreateCustomerJSONRequestBody, requestOptions ...RequestOption) (*CreateCustomerResult, error)

func (*ManagementClient) CreateFeature

func (c *ManagementClient) CreateFeature(ctx context.Context, id IDPath, body CreateFeatureJSONRequestBody, requestOptions ...RequestOption) (*CreateFeatureResult, error)

func (*ManagementClient) CreateLicense

func (c *ManagementClient) CreateLicense(ctx context.Context, body CreateLicenseJSONRequestBody, requestOptions ...RequestOption) (*CreateLicenseResult, error)

func (*ManagementClient) CreateOrder

func (c *ManagementClient) CreateOrder(ctx context.Context, id IDPath, body CreateOrderJSONRequestBody, requestOptions ...RequestOption) (*CreateOrderResult, error)

func (*ManagementClient) CreatePolicy

func (c *ManagementClient) CreatePolicy(ctx context.Context, id IDPath, body CreatePolicyJSONRequestBody, requestOptions ...RequestOption) (*CreatePolicyResult, error)

func (*ManagementClient) CreateProduct

func (c *ManagementClient) CreateProduct(ctx context.Context, body CreateProductJSONRequestBody, requestOptions ...RequestOption) (*CreateProductResult, error)

func (*ManagementClient) CreateProductVersion

func (c *ManagementClient) CreateProductVersion(ctx context.Context, id IDPath, body CreateProductVersionJSONRequestBody, requestOptions ...RequestOption) (*CreateProductVersionResult, error)

func (*ManagementClient) CreateReportExport added in v1.0.0

func (c *ManagementClient) CreateReportExport(ctx context.Context, body CreateReportExportJSONRequestBody, requestOptions ...RequestOption) (*CreateReportExportResult, error)

func (*ManagementClient) CreateSubscription

func (c *ManagementClient) CreateSubscription(ctx context.Context, id IDPath, body CreateSubscriptionJSONRequestBody, requestOptions ...RequestOption) (*CreateSubscriptionResult, error)

func (*ManagementClient) CreateWebhookEndpoint

func (c *ManagementClient) CreateWebhookEndpoint(ctx context.Context, body CreateWebhookEndpointJSONRequestBody, requestOptions ...RequestOption) (*CreateWebhookEndpointResult, error)

func (*ManagementClient) DeleteCustomer

func (c *ManagementClient) DeleteCustomer(ctx context.Context, id IDPath, requestOptions ...RequestOption) error

func (*ManagementClient) DeletePolicy

func (c *ManagementClient) DeletePolicy(ctx context.Context, id IDPath, requestOptions ...RequestOption) error

func (*ManagementClient) DeleteProduct

func (c *ManagementClient) DeleteProduct(ctx context.Context, id IDPath, requestOptions ...RequestOption) error

func (*ManagementClient) DeleteProductCustomFieldDefinition

func (c *ManagementClient) DeleteProductCustomFieldDefinition(ctx context.Context, id IDPath, fieldID FieldIDPath, requestOptions ...RequestOption) error

func (*ManagementClient) DeleteWebhookEndpoint

func (c *ManagementClient) DeleteWebhookEndpoint(ctx context.Context, id IDPath, requestOptions ...RequestOption) error

func (*ManagementClient) DownloadReportExport added in v1.0.0

func (c *ManagementClient) DownloadReportExport(ctx context.Context, id IDPath, requestOptions ...RequestOption) ([]byte, error)

func (*ManagementClient) GetCustomer

func (c *ManagementClient) GetCustomer(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetCustomerResult, error)

func (*ManagementClient) GetCustomerSummary added in v1.0.0

func (c *ManagementClient) GetCustomerSummary(ctx context.Context, params *GetCustomerSummaryParams, requestOptions ...RequestOption) (*GetCustomerSummaryResult, error)

func (*ManagementClient) GetFeature

func (c *ManagementClient) GetFeature(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetFeatureResult, error)

func (*ManagementClient) GetLicense

func (c *ManagementClient) GetLicense(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetLicenseResult, error)

func (*ManagementClient) GetLicenseAuditReport added in v1.0.0

func (c *ManagementClient) GetLicenseAuditReport(ctx context.Context, params *GetLicenseAuditReportParams, requestOptions ...RequestOption) (*GetLicenseAuditReportResult, error)

func (*ManagementClient) GetLicenseDevice

func (c *ManagementClient) GetLicenseDevice(ctx context.Context, id IDPath, deviceID DeviceIDPath, requestOptions ...RequestOption) (*GetLicenseDeviceResult, error)

func (*ManagementClient) GetOpsSummary added in v1.0.0

func (c *ManagementClient) GetOpsSummary(ctx context.Context, params *GetOpsSummaryParams, requestOptions ...RequestOption) (*GetOpsSummaryResult, error)

func (*ManagementClient) GetOrder

func (c *ManagementClient) GetOrder(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetOrderResult, error)

func (*ManagementClient) GetPolicy

func (c *ManagementClient) GetPolicy(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetPolicyResult, error)

func (*ManagementClient) GetProduct

func (c *ManagementClient) GetProduct(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetProductResult, error)

func (*ManagementClient) GetProductCustomFieldDefinition

func (c *ManagementClient) GetProductCustomFieldDefinition(ctx context.Context, id IDPath, fieldID FieldIDPath, requestOptions ...RequestOption) (*GetProductCustomFieldDefinitionResult, error)

func (*ManagementClient) GetReportExport added in v1.0.0

func (c *ManagementClient) GetReportExport(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetReportExportResult, error)

func (*ManagementClient) GetSubscription

func (c *ManagementClient) GetSubscription(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetSubscriptionResult, error)

func (*ManagementClient) GetSubscriptionSettlement added in v1.0.0

func (c *ManagementClient) GetSubscriptionSettlement(ctx context.Context, params *GetSubscriptionSettlementParams, requestOptions ...RequestOption) (*GetSubscriptionSettlementResult, error)

func (*ManagementClient) GetUsageSummary added in v1.0.0

func (c *ManagementClient) GetUsageSummary(ctx context.Context, params *GetUsageSummaryParams, requestOptions ...RequestOption) (*GetUsageSummaryResult, error)

func (*ManagementClient) GetWebhookEndpoint

func (c *ManagementClient) GetWebhookEndpoint(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*GetWebhookEndpointResult, error)

func (*ManagementClient) GetWebhookHealth added in v1.0.0

func (c *ManagementClient) GetWebhookHealth(ctx context.Context, params *GetWebhookHealthParams, requestOptions ...RequestOption) (*GetWebhookHealthResult, error)

func (*ManagementClient) ListAPIKeys

func (c *ManagementClient) ListAPIKeys(ctx context.Context, params *ListAPIKeysParams, requestOptions ...RequestOption) (*ListAPIKeysResult, error)

func (*ManagementClient) ListActivities added in v1.0.0

func (c *ManagementClient) ListActivities(ctx context.Context, params *ListActivitiesParams, requestOptions ...RequestOption) (*ListActivitiesResult, error)

func (*ManagementClient) ListCustomerCustomFieldValues

func (c *ManagementClient) ListCustomerCustomFieldValues(ctx context.Context, id IDPath, params *ListCustomerCustomFieldValuesParams, requestOptions ...RequestOption) (*ListCustomerCustomFieldValuesResult, error)

func (*ManagementClient) ListCustomers

func (c *ManagementClient) ListCustomers(ctx context.Context, params *ListCustomersParams, requestOptions ...RequestOption) (*ListCustomersResult, error)

func (*ManagementClient) ListEvents

func (c *ManagementClient) ListEvents(ctx context.Context, params *ListEventsParams, requestOptions ...RequestOption) (*ListEventsResult, error)

func (*ManagementClient) ListFeaturesByProduct

func (c *ManagementClient) ListFeaturesByProduct(ctx context.Context, id IDPath, params *ListFeaturesByProductParams, requestOptions ...RequestOption) (*ListFeaturesByProductResult, error)

func (*ManagementClient) ListLicenseCustomFieldValues

func (c *ManagementClient) ListLicenseCustomFieldValues(ctx context.Context, id IDPath, params *ListLicenseCustomFieldValuesParams, requestOptions ...RequestOption) (*ListLicenseCustomFieldValuesResult, error)

func (*ManagementClient) ListLicenseDevices

func (c *ManagementClient) ListLicenseDevices(ctx context.Context, id IDPath, params *ListLicenseDevicesParams, requestOptions ...RequestOption) (*ListLicenseDevicesResult, error)

func (*ManagementClient) ListLicenseFeatures

func (c *ManagementClient) ListLicenseFeatures(ctx context.Context, id IDPath, params *ListLicenseFeaturesParams, requestOptions ...RequestOption) (*ListLicenseFeaturesResult, error)

func (*ManagementClient) ListLicenses

func (c *ManagementClient) ListLicenses(ctx context.Context, params *ListLicensesParams, requestOptions ...RequestOption) (*ListLicensesResult, error)

func (*ManagementClient) ListPoliciesByProduct

func (c *ManagementClient) ListPoliciesByProduct(ctx context.Context, id IDPath, params *ListPoliciesByProductParams, requestOptions ...RequestOption) (*ListPoliciesByProductResult, error)

func (*ManagementClient) ListProductCustomFieldDefinitions

func (c *ManagementClient) ListProductCustomFieldDefinitions(ctx context.Context, id IDPath, params *ListProductCustomFieldDefinitionsParams, requestOptions ...RequestOption) (*ListProductCustomFieldDefinitionsResult, error)

func (*ManagementClient) ListProductOrders

func (c *ManagementClient) ListProductOrders(ctx context.Context, id IDPath, params *ListProductOrdersParams, requestOptions ...RequestOption) (*ListProductOrdersResult, error)

func (*ManagementClient) ListProductSubscriptions

func (c *ManagementClient) ListProductSubscriptions(ctx context.Context, id IDPath, params *ListProductSubscriptionsParams, requestOptions ...RequestOption) (*ListProductSubscriptionsResult, error)

func (*ManagementClient) ListProductVersions

func (c *ManagementClient) ListProductVersions(ctx context.Context, id IDPath, params *ListProductVersionsParams, requestOptions ...RequestOption) (*ListProductVersionsResult, error)

func (*ManagementClient) ListProducts

func (c *ManagementClient) ListProducts(ctx context.Context, params *ListProductsParams, requestOptions ...RequestOption) (*ListProductsResult, error)

func (*ManagementClient) ListRuntimeErrorGroups added in v1.0.0

func (c *ManagementClient) ListRuntimeErrorGroups(ctx context.Context, params *ListRuntimeErrorGroupsParams, requestOptions ...RequestOption) (*ListRuntimeErrorGroupsResult, error)

func (*ManagementClient) ListUsageLedger added in v1.0.0

func (c *ManagementClient) ListUsageLedger(ctx context.Context, params *ListUsageLedgerParams, requestOptions ...RequestOption) (*ListUsageLedgerResult, error)

func (*ManagementClient) ListWebhookEndpoints

func (c *ManagementClient) ListWebhookEndpoints(ctx context.Context, params *ListWebhookEndpointsParams, requestOptions ...RequestOption) (*ListWebhookEndpointsResult, error)

func (*ManagementClient) ReinstateLicense

func (c *ManagementClient) ReinstateLicense(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*ReinstateLicenseResult, error)

func (*ManagementClient) RemoveLicenseFeature

func (c *ManagementClient) RemoveLicenseFeature(ctx context.Context, id IDPath, featureID FeatureIDPath, requestOptions ...RequestOption) error

func (*ManagementClient) RenewLicense

func (c *ManagementClient) RenewLicense(ctx context.Context, id IDPath, params *RenewLicenseParams, body RenewLicenseJSONRequestBody, requestOptions ...RequestOption) (*RenewLicenseResult, error)

func (*ManagementClient) ResetLicenseDevice

func (c *ManagementClient) ResetLicenseDevice(ctx context.Context, id IDPath, deviceID DeviceIDPath, requestOptions ...RequestOption) (*ResetLicenseDeviceResult, error)

func (*ManagementClient) ResetLicenseUsage

func (c *ManagementClient) ResetLicenseUsage(ctx context.Context, id IDPath, body ResetLicenseUsageJSONRequestBody, requestOptions ...RequestOption) (*ResetLicenseUsageResult, error)

func (*ManagementClient) RevokeLicense

func (c *ManagementClient) RevokeLicense(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RevokeLicenseResult, error)

func (*ManagementClient) SuspendLicense

func (c *ManagementClient) SuspendLicense(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*SuspendLicenseResult, error)

func (*ManagementClient) TransferLicense

func (*ManagementClient) UpdateCustomer

func (c *ManagementClient) UpdateCustomer(ctx context.Context, id IDPath, body UpdateCustomerJSONRequestBody, requestOptions ...RequestOption) (*UpdateCustomerResult, error)

func (*ManagementClient) UpdateOrder

func (c *ManagementClient) UpdateOrder(ctx context.Context, id IDPath, body UpdateOrderJSONRequestBody, requestOptions ...RequestOption) (*UpdateOrderResult, error)

func (*ManagementClient) UpdatePolicy

func (c *ManagementClient) UpdatePolicy(ctx context.Context, id IDPath, body UpdatePolicyJSONRequestBody, requestOptions ...RequestOption) (*UpdatePolicyResult, error)

func (*ManagementClient) UpdateProduct

func (c *ManagementClient) UpdateProduct(ctx context.Context, id IDPath, body UpdateProductJSONRequestBody, requestOptions ...RequestOption) (*UpdateProductResult, error)

func (*ManagementClient) UpdateProductCustomFieldDefinition

func (*ManagementClient) UpdateSubscription

func (c *ManagementClient) UpdateSubscription(ctx context.Context, id IDPath, body UpdateSubscriptionJSONRequestBody, requestOptions ...RequestOption) (*UpdateSubscriptionResult, error)

func (*ManagementClient) UpdateWebhookEndpoint

func (c *ManagementClient) UpdateWebhookEndpoint(ctx context.Context, id IDPath, body UpdateWebhookEndpointJSONRequestBody, requestOptions ...RequestOption) (*UpdateWebhookEndpointResult, error)

func (*ManagementClient) UpsertCustomerCustomFieldValue

func (c *ManagementClient) UpsertCustomerCustomFieldValue(ctx context.Context, id IDPath, fieldID FieldIDPath, body UpsertCustomerCustomFieldValueJSONRequestBody, requestOptions ...RequestOption) (*UpsertCustomerCustomFieldValueResult, error)

func (*ManagementClient) UpsertLicenseCustomFieldValue

func (c *ManagementClient) UpsertLicenseCustomFieldValue(ctx context.Context, id IDPath, fieldID FieldIDPath, body UpsertLicenseCustomFieldValueJSONRequestBody, requestOptions ...RequestOption) (*UpsertLicenseCustomFieldValueResult, error)

type ManagementClientOptions

type ManagementClientOptions struct {
	ClientOptions
	Token string
}

type ManagementOperationID

type ManagementOperationID string
const (
	ManagementOperationAssignLicenseFeature               ManagementOperationID = "assignLicenseFeature"
	ManagementOperationBlacklistLicenseDevice             ManagementOperationID = "blacklistLicenseDevice"
	ManagementOperationCreateAPIKey                       ManagementOperationID = "createAPIKey"
	ManagementOperationCreateCustomer                     ManagementOperationID = "createCustomer"
	ManagementOperationCreateFeature                      ManagementOperationID = "createFeature"
	ManagementOperationCreateLicense                      ManagementOperationID = "createLicense"
	ManagementOperationCreateOrder                        ManagementOperationID = "createOrder"
	ManagementOperationCreatePolicy                       ManagementOperationID = "createPolicy"
	ManagementOperationCreateProduct                      ManagementOperationID = "createProduct"
	ManagementOperationCreateProductCustomFieldDefinition ManagementOperationID = "createProductCustomFieldDefinition"
	ManagementOperationCreateProductVersion               ManagementOperationID = "createProductVersion"
	ManagementOperationCreateReportExport                 ManagementOperationID = "createReportExport"
	ManagementOperationCreateSubscription                 ManagementOperationID = "createSubscription"
	ManagementOperationCreateWebhookEndpoint              ManagementOperationID = "createWebhookEndpoint"
	ManagementOperationDeleteCustomer                     ManagementOperationID = "deleteCustomer"
	ManagementOperationDeletePolicy                       ManagementOperationID = "deletePolicy"
	ManagementOperationDeleteProduct                      ManagementOperationID = "deleteProduct"
	ManagementOperationDeleteProductCustomFieldDefinition ManagementOperationID = "deleteProductCustomFieldDefinition"
	ManagementOperationDeleteWebhookEndpoint              ManagementOperationID = "deleteWebhookEndpoint"
	ManagementOperationDownloadReportExport               ManagementOperationID = "downloadReportExport"
	ManagementOperationGetCustomer                        ManagementOperationID = "getCustomer"
	ManagementOperationGetCustomerSummary                 ManagementOperationID = "getCustomerSummary"
	ManagementOperationGetFeature                         ManagementOperationID = "getFeature"
	ManagementOperationGetLicense                         ManagementOperationID = "getLicense"
	ManagementOperationGetLicenseAuditReport              ManagementOperationID = "getLicenseAuditReport"
	ManagementOperationGetLicenseDevice                   ManagementOperationID = "getLicenseDevice"
	ManagementOperationGetOpsSummary                      ManagementOperationID = "getOpsSummary"
	ManagementOperationGetOrder                           ManagementOperationID = "getOrder"
	ManagementOperationGetPolicy                          ManagementOperationID = "getPolicy"
	ManagementOperationGetProduct                         ManagementOperationID = "getProduct"
	ManagementOperationGetProductCustomFieldDefinition    ManagementOperationID = "getProductCustomFieldDefinition"
	ManagementOperationGetReportExport                    ManagementOperationID = "getReportExport"
	ManagementOperationGetSubscription                    ManagementOperationID = "getSubscription"
	ManagementOperationGetSubscriptionSettlement          ManagementOperationID = "getSubscriptionSettlement"
	ManagementOperationGetUsageSummary                    ManagementOperationID = "getUsageSummary"
	ManagementOperationGetWebhookEndpoint                 ManagementOperationID = "getWebhookEndpoint"
	ManagementOperationGetWebhookHealth                   ManagementOperationID = "getWebhookHealth"
	ManagementOperationListAPIKeys                        ManagementOperationID = "listAPIKeys"
	ManagementOperationListActivities                     ManagementOperationID = "listActivities"
	ManagementOperationListCustomerCustomFieldValues      ManagementOperationID = "listCustomerCustomFieldValues"
	ManagementOperationListCustomers                      ManagementOperationID = "listCustomers"
	ManagementOperationListEvents                         ManagementOperationID = "listEvents"
	ManagementOperationListFeaturesByProduct              ManagementOperationID = "listFeaturesByProduct"
	ManagementOperationListLicenseCustomFieldValues       ManagementOperationID = "listLicenseCustomFieldValues"
	ManagementOperationListLicenseDevices                 ManagementOperationID = "listLicenseDevices"
	ManagementOperationListLicenseFeatures                ManagementOperationID = "listLicenseFeatures"
	ManagementOperationListLicenses                       ManagementOperationID = "listLicenses"
	ManagementOperationListPoliciesByProduct              ManagementOperationID = "listPoliciesByProduct"
	ManagementOperationListProductCustomFieldDefinitions  ManagementOperationID = "listProductCustomFieldDefinitions"
	ManagementOperationListProductOrders                  ManagementOperationID = "listProductOrders"
	ManagementOperationListProductSubscriptions           ManagementOperationID = "listProductSubscriptions"
	ManagementOperationListProductVersions                ManagementOperationID = "listProductVersions"
	ManagementOperationListProducts                       ManagementOperationID = "listProducts"
	ManagementOperationListRuntimeErrorGroups             ManagementOperationID = "listRuntimeErrorGroups"
	ManagementOperationListUsageLedger                    ManagementOperationID = "listUsageLedger"
	ManagementOperationListWebhookEndpoints               ManagementOperationID = "listWebhookEndpoints"
	ManagementOperationReinstateLicense                   ManagementOperationID = "reinstateLicense"
	ManagementOperationRemoveLicenseFeature               ManagementOperationID = "removeLicenseFeature"
	ManagementOperationRenewLicense                       ManagementOperationID = "renewLicense"
	ManagementOperationResetLicenseDevice                 ManagementOperationID = "resetLicenseDevice"
	ManagementOperationResetLicenseUsage                  ManagementOperationID = "resetLicenseUsage"
	ManagementOperationRevokeLicense                      ManagementOperationID = "revokeLicense"
	ManagementOperationSuspendLicense                     ManagementOperationID = "suspendLicense"
	ManagementOperationTransferLicense                    ManagementOperationID = "transferLicense"
	ManagementOperationUpdateCustomer                     ManagementOperationID = "updateCustomer"
	ManagementOperationUpdateOrder                        ManagementOperationID = "updateOrder"
	ManagementOperationUpdatePolicy                       ManagementOperationID = "updatePolicy"
	ManagementOperationUpdateProduct                      ManagementOperationID = "updateProduct"
	ManagementOperationUpdateProductCustomFieldDefinition ManagementOperationID = "updateProductCustomFieldDefinition"
	ManagementOperationUpdateSubscription                 ManagementOperationID = "updateSubscription"
	ManagementOperationUpdateWebhookEndpoint              ManagementOperationID = "updateWebhookEndpoint"
	ManagementOperationUpsertCustomerCustomFieldValue     ManagementOperationID = "upsertCustomerCustomFieldValue"
	ManagementOperationUpsertLicenseCustomFieldValue      ManagementOperationID = "upsertLicenseCustomFieldValue"
)

type ManagementRawClient

type ManagementRawClient struct {
	// contains filtered or unexported fields
}

func (*ManagementRawClient) AssignLicenseFeature

func (*ManagementRawClient) BlacklistLicenseDevice

func (c *ManagementRawClient) BlacklistLicenseDevice(ctx context.Context, id IDPath, deviceID DeviceIDPath, requestOptions ...RequestOption) (*RawResponse[BlacklistLicenseDeviceResult], error)

func (*ManagementRawClient) CreateAPIKey

func (*ManagementRawClient) CreateCustomer

func (*ManagementRawClient) CreateFeature

func (*ManagementRawClient) CreateLicense

func (*ManagementRawClient) CreateOrder

func (*ManagementRawClient) CreatePolicy

func (*ManagementRawClient) CreateProduct

func (*ManagementRawClient) CreateProductVersion

func (*ManagementRawClient) CreateReportExport added in v1.0.0

func (*ManagementRawClient) CreateSubscription

func (*ManagementRawClient) CreateWebhookEndpoint

func (*ManagementRawClient) DeleteCustomer

func (c *ManagementRawClient) DeleteCustomer(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[DeleteCustomerResult], error)

func (*ManagementRawClient) DeletePolicy

func (c *ManagementRawClient) DeletePolicy(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[DeletePolicyResult], error)

func (*ManagementRawClient) DeleteProduct

func (c *ManagementRawClient) DeleteProduct(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[DeleteProductResult], error)

func (*ManagementRawClient) DeleteProductCustomFieldDefinition

func (c *ManagementRawClient) DeleteProductCustomFieldDefinition(ctx context.Context, id IDPath, fieldID FieldIDPath, requestOptions ...RequestOption) (*RawResponse[DeleteProductCustomFieldDefinitionResult], error)

func (*ManagementRawClient) DeleteWebhookEndpoint

func (c *ManagementRawClient) DeleteWebhookEndpoint(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[DeleteWebhookEndpointResult], error)

func (*ManagementRawClient) DownloadReportExport added in v1.0.0

func (c *ManagementRawClient) DownloadReportExport(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[DownloadReportExportResult], error)

func (*ManagementRawClient) GetCustomer

func (c *ManagementRawClient) GetCustomer(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetCustomerResult], error)

func (*ManagementRawClient) GetCustomerSummary added in v1.0.0

func (c *ManagementRawClient) GetCustomerSummary(ctx context.Context, params *GetCustomerSummaryParams, requestOptions ...RequestOption) (*RawResponse[GetCustomerSummaryResult], error)

func (*ManagementRawClient) GetFeature

func (c *ManagementRawClient) GetFeature(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetFeatureResult], error)

func (*ManagementRawClient) GetLicense

func (c *ManagementRawClient) GetLicense(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetLicenseResult], error)

func (*ManagementRawClient) GetLicenseAuditReport added in v1.0.0

func (c *ManagementRawClient) GetLicenseAuditReport(ctx context.Context, params *GetLicenseAuditReportParams, requestOptions ...RequestOption) (*RawResponse[GetLicenseAuditReportResult], error)

func (*ManagementRawClient) GetLicenseDevice

func (c *ManagementRawClient) GetLicenseDevice(ctx context.Context, id IDPath, deviceID DeviceIDPath, requestOptions ...RequestOption) (*RawResponse[GetLicenseDeviceResult], error)

func (*ManagementRawClient) GetOpsSummary added in v1.0.0

func (c *ManagementRawClient) GetOpsSummary(ctx context.Context, params *GetOpsSummaryParams, requestOptions ...RequestOption) (*RawResponse[GetOpsSummaryResult], error)

func (*ManagementRawClient) GetOrder

func (c *ManagementRawClient) GetOrder(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetOrderResult], error)

func (*ManagementRawClient) GetPolicy

func (c *ManagementRawClient) GetPolicy(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetPolicyResult], error)

func (*ManagementRawClient) GetProduct

func (c *ManagementRawClient) GetProduct(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetProductResult], error)

func (*ManagementRawClient) GetProductCustomFieldDefinition

func (c *ManagementRawClient) GetProductCustomFieldDefinition(ctx context.Context, id IDPath, fieldID FieldIDPath, requestOptions ...RequestOption) (*RawResponse[GetProductCustomFieldDefinitionResult], error)

func (*ManagementRawClient) GetReportExport added in v1.0.0

func (c *ManagementRawClient) GetReportExport(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetReportExportResult], error)

func (*ManagementRawClient) GetSubscription

func (c *ManagementRawClient) GetSubscription(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetSubscriptionResult], error)

func (*ManagementRawClient) GetSubscriptionSettlement added in v1.0.0

func (c *ManagementRawClient) GetSubscriptionSettlement(ctx context.Context, params *GetSubscriptionSettlementParams, requestOptions ...RequestOption) (*RawResponse[GetSubscriptionSettlementResult], error)

func (*ManagementRawClient) GetUsageSummary added in v1.0.0

func (c *ManagementRawClient) GetUsageSummary(ctx context.Context, params *GetUsageSummaryParams, requestOptions ...RequestOption) (*RawResponse[GetUsageSummaryResult], error)

func (*ManagementRawClient) GetWebhookEndpoint

func (c *ManagementRawClient) GetWebhookEndpoint(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[GetWebhookEndpointResult], error)

func (*ManagementRawClient) GetWebhookHealth added in v1.0.0

func (c *ManagementRawClient) GetWebhookHealth(ctx context.Context, params *GetWebhookHealthParams, requestOptions ...RequestOption) (*RawResponse[GetWebhookHealthResult], error)

func (*ManagementRawClient) ListAPIKeys

func (c *ManagementRawClient) ListAPIKeys(ctx context.Context, params *ListAPIKeysParams, requestOptions ...RequestOption) (*RawResponse[ListAPIKeysResult], error)

func (*ManagementRawClient) ListActivities added in v1.0.0

func (c *ManagementRawClient) ListActivities(ctx context.Context, params *ListActivitiesParams, requestOptions ...RequestOption) (*RawResponse[ListActivitiesResult], error)

func (*ManagementRawClient) ListCustomerCustomFieldValues

func (c *ManagementRawClient) ListCustomerCustomFieldValues(ctx context.Context, id IDPath, params *ListCustomerCustomFieldValuesParams, requestOptions ...RequestOption) (*RawResponse[ListCustomerCustomFieldValuesResult], error)

func (*ManagementRawClient) ListCustomers

func (c *ManagementRawClient) ListCustomers(ctx context.Context, params *ListCustomersParams, requestOptions ...RequestOption) (*RawResponse[ListCustomersResult], error)

func (*ManagementRawClient) ListEvents

func (c *ManagementRawClient) ListEvents(ctx context.Context, params *ListEventsParams, requestOptions ...RequestOption) (*RawResponse[ListEventsResult], error)

func (*ManagementRawClient) ListFeaturesByProduct

func (c *ManagementRawClient) ListFeaturesByProduct(ctx context.Context, id IDPath, params *ListFeaturesByProductParams, requestOptions ...RequestOption) (*RawResponse[ListFeaturesByProductResult], error)

func (*ManagementRawClient) ListLicenseCustomFieldValues

func (c *ManagementRawClient) ListLicenseCustomFieldValues(ctx context.Context, id IDPath, params *ListLicenseCustomFieldValuesParams, requestOptions ...RequestOption) (*RawResponse[ListLicenseCustomFieldValuesResult], error)

func (*ManagementRawClient) ListLicenseDevices

func (c *ManagementRawClient) ListLicenseDevices(ctx context.Context, id IDPath, params *ListLicenseDevicesParams, requestOptions ...RequestOption) (*RawResponse[ListLicenseDevicesResult], error)

func (*ManagementRawClient) ListLicenseFeatures

func (c *ManagementRawClient) ListLicenseFeatures(ctx context.Context, id IDPath, params *ListLicenseFeaturesParams, requestOptions ...RequestOption) (*RawResponse[ListLicenseFeaturesResult], error)

func (*ManagementRawClient) ListLicenses

func (c *ManagementRawClient) ListLicenses(ctx context.Context, params *ListLicensesParams, requestOptions ...RequestOption) (*RawResponse[ListLicensesResult], error)

func (*ManagementRawClient) ListPoliciesByProduct

func (c *ManagementRawClient) ListPoliciesByProduct(ctx context.Context, id IDPath, params *ListPoliciesByProductParams, requestOptions ...RequestOption) (*RawResponse[ListPoliciesByProductResult], error)

func (*ManagementRawClient) ListProductCustomFieldDefinitions

func (*ManagementRawClient) ListProductOrders

func (c *ManagementRawClient) ListProductOrders(ctx context.Context, id IDPath, params *ListProductOrdersParams, requestOptions ...RequestOption) (*RawResponse[ListProductOrdersResult], error)

func (*ManagementRawClient) ListProductSubscriptions

func (c *ManagementRawClient) ListProductSubscriptions(ctx context.Context, id IDPath, params *ListProductSubscriptionsParams, requestOptions ...RequestOption) (*RawResponse[ListProductSubscriptionsResult], error)

func (*ManagementRawClient) ListProductVersions

func (c *ManagementRawClient) ListProductVersions(ctx context.Context, id IDPath, params *ListProductVersionsParams, requestOptions ...RequestOption) (*RawResponse[ListProductVersionsResult], error)

func (*ManagementRawClient) ListProducts

func (c *ManagementRawClient) ListProducts(ctx context.Context, params *ListProductsParams, requestOptions ...RequestOption) (*RawResponse[ListProductsResult], error)

func (*ManagementRawClient) ListRuntimeErrorGroups added in v1.0.0

func (c *ManagementRawClient) ListRuntimeErrorGroups(ctx context.Context, params *ListRuntimeErrorGroupsParams, requestOptions ...RequestOption) (*RawResponse[ListRuntimeErrorGroupsResult], error)

func (*ManagementRawClient) ListUsageLedger added in v1.0.0

func (c *ManagementRawClient) ListUsageLedger(ctx context.Context, params *ListUsageLedgerParams, requestOptions ...RequestOption) (*RawResponse[ListUsageLedgerResult], error)

func (*ManagementRawClient) ListWebhookEndpoints

func (c *ManagementRawClient) ListWebhookEndpoints(ctx context.Context, params *ListWebhookEndpointsParams, requestOptions ...RequestOption) (*RawResponse[ListWebhookEndpointsResult], error)

func (*ManagementRawClient) ReinstateLicense

func (c *ManagementRawClient) ReinstateLicense(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[ReinstateLicenseResult], error)

func (*ManagementRawClient) RemoveLicenseFeature

func (c *ManagementRawClient) RemoveLicenseFeature(ctx context.Context, id IDPath, featureID FeatureIDPath, requestOptions ...RequestOption) (*RawResponse[RemoveLicenseFeatureResult], error)

func (*ManagementRawClient) RenewLicense

func (*ManagementRawClient) ResetLicenseDevice

func (c *ManagementRawClient) ResetLicenseDevice(ctx context.Context, id IDPath, deviceID DeviceIDPath, requestOptions ...RequestOption) (*RawResponse[ResetLicenseDeviceResult], error)

func (*ManagementRawClient) ResetLicenseUsage

func (*ManagementRawClient) RevokeLicense

func (c *ManagementRawClient) RevokeLicense(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[RevokeLicenseResult], error)

func (*ManagementRawClient) SuspendLicense

func (c *ManagementRawClient) SuspendLicense(ctx context.Context, id IDPath, requestOptions ...RequestOption) (*RawResponse[SuspendLicenseResult], error)

func (*ManagementRawClient) TransferLicense

func (*ManagementRawClient) UpdateCustomer

func (*ManagementRawClient) UpdateOrder

func (*ManagementRawClient) UpdatePolicy

func (*ManagementRawClient) UpdateProduct

func (*ManagementRawClient) UpdateSubscription

func (*ManagementRawClient) UpdateWebhookEndpoint

func (*ManagementRawClient) UpsertCustomerCustomFieldValue

func (*ManagementRawClient) UpsertLicenseCustomFieldValue

type ManagementScope

type ManagementScope = licensekitgenerated.ManagementScope
const (
	AdminScope        ManagementScope = "admin"
	DeviceWriteScope  ManagementScope = "device:write"
	EventReadScope    ManagementScope = "event:read"
	LicenseReadScope  ManagementScope = "license:read"
	LicenseWriteScope ManagementScope = "license:write"
	OpsReadScope      ManagementScope = "ops:read"
	ProductReadScope  ManagementScope = "product:read"
	ProductWriteScope ManagementScope = "product:write"
	ReportExportScope ManagementScope = "report:export"
	ReportReadScope   ManagementScope = "report:read"
	WebhookWriteScope ManagementScope = "webhook:write"
)

func GetRequiredScopes

func GetRequiredScopes(operationID ManagementOperationID) ([]ManagementScope, bool)
Example
scopes, ok := GetRequiredScopes(ManagementOperationCreateProduct)
fmt.Println(ok, scopes)
Output:
true [product:write]

type OperationID

type OperationID string
const (
	OperationActivateLicense                    OperationID = "activateLicense"
	OperationAssignLicenseFeature               OperationID = "assignLicenseFeature"
	OperationBlacklistLicenseDevice             OperationID = "blacklistLicenseDevice"
	OperationCheckLicense                       OperationID = "checkLicense"
	OperationCheckinFloatingLicense             OperationID = "checkinFloatingLicense"
	OperationCheckoutFloatingLicense            OperationID = "checkoutFloatingLicense"
	OperationConsumeLicense                     OperationID = "consumeLicense"
	OperationCreateAPIKey                       OperationID = "createAPIKey"
	OperationCreateCustomer                     OperationID = "createCustomer"
	OperationCreateFeature                      OperationID = "createFeature"
	OperationCreateLicense                      OperationID = "createLicense"
	OperationCreateOrder                        OperationID = "createOrder"
	OperationCreatePolicy                       OperationID = "createPolicy"
	OperationCreateProduct                      OperationID = "createProduct"
	OperationCreateProductCustomFieldDefinition OperationID = "createProductCustomFieldDefinition"
	OperationCreateProductVersion               OperationID = "createProductVersion"
	OperationCreateReportExport                 OperationID = "createReportExport"
	OperationCreateSubscription                 OperationID = "createSubscription"
	OperationCreateWebhookEndpoint              OperationID = "createWebhookEndpoint"
	OperationDeactivateLicense                  OperationID = "deactivateLicense"
	OperationDeleteCustomer                     OperationID = "deleteCustomer"
	OperationDeletePolicy                       OperationID = "deletePolicy"
	OperationDeleteProduct                      OperationID = "deleteProduct"
	OperationDeleteProductCustomFieldDefinition OperationID = "deleteProductCustomFieldDefinition"
	OperationDeleteWebhookEndpoint              OperationID = "deleteWebhookEndpoint"
	OperationDownloadReportExport               OperationID = "downloadReportExport"
	OperationGetCustomer                        OperationID = "getCustomer"
	OperationGetCustomerSummary                 OperationID = "getCustomerSummary"
	OperationGetFeature                         OperationID = "getFeature"
	OperationGetLicense                         OperationID = "getLicense"
	OperationGetLicenseAuditReport              OperationID = "getLicenseAuditReport"
	OperationGetLicenseDevice                   OperationID = "getLicenseDevice"
	OperationGetMetrics                         OperationID = "getMetrics"
	OperationGetOpsSummary                      OperationID = "getOpsSummary"
	OperationGetOrder                           OperationID = "getOrder"
	OperationGetPolicy                          OperationID = "getPolicy"
	OperationGetProduct                         OperationID = "getProduct"
	OperationGetProductCustomFieldDefinition    OperationID = "getProductCustomFieldDefinition"
	OperationGetReportExport                    OperationID = "getReportExport"
	OperationGetSubscription                    OperationID = "getSubscription"
	OperationGetSubscriptionSettlement          OperationID = "getSubscriptionSettlement"
	OperationGetUsageSummary                    OperationID = "getUsageSummary"
	OperationGetWebhookEndpoint                 OperationID = "getWebhookEndpoint"
	OperationGetWebhookHealth                   OperationID = "getWebhookHealth"
	OperationHealth                             OperationID = "health"
	OperationHealthz                            OperationID = "healthz"
	OperationHeartbeatFloatingLicense           OperationID = "heartbeatFloatingLicense"
	OperationIssueOfflineLicense                OperationID = "issueOfflineLicense"
	OperationListAPIKeys                        OperationID = "listAPIKeys"
	OperationListActivities                     OperationID = "listActivities"
	OperationListCustomerCustomFieldValues      OperationID = "listCustomerCustomFieldValues"
	OperationListCustomers                      OperationID = "listCustomers"
	OperationListEvents                         OperationID = "listEvents"
	OperationListFeaturesByProduct              OperationID = "listFeaturesByProduct"
	OperationListLicenseCustomFieldValues       OperationID = "listLicenseCustomFieldValues"
	OperationListLicenseDevices                 OperationID = "listLicenseDevices"
	OperationListLicenseFeatures                OperationID = "listLicenseFeatures"
	OperationListLicenses                       OperationID = "listLicenses"
	OperationListPoliciesByProduct              OperationID = "listPoliciesByProduct"
	OperationListProductCustomFieldDefinitions  OperationID = "listProductCustomFieldDefinitions"
	OperationListProductOrders                  OperationID = "listProductOrders"
	OperationListProductSubscriptions           OperationID = "listProductSubscriptions"
	OperationListProductVersions                OperationID = "listProductVersions"
	OperationListProducts                       OperationID = "listProducts"
	OperationListPublicKeys                     OperationID = "listPublicKeys"
	OperationListRuntimeErrorGroups             OperationID = "listRuntimeErrorGroups"
	OperationListUsageLedger                    OperationID = "listUsageLedger"
	OperationListWebhookEndpoints               OperationID = "listWebhookEndpoints"
	OperationReadyz                             OperationID = "readyz"
	OperationReinstateLicense                   OperationID = "reinstateLicense"
	OperationRemoveLicenseFeature               OperationID = "removeLicenseFeature"
	OperationRenewLicense                       OperationID = "renewLicense"
	OperationResetLicenseDevice                 OperationID = "resetLicenseDevice"
	OperationResetLicenseUsage                  OperationID = "resetLicenseUsage"
	OperationRevokeLicense                      OperationID = "revokeLicense"
	OperationSuspendLicense                     OperationID = "suspendLicense"
	OperationTransferLicense                    OperationID = "transferLicense"
	OperationUpdateCustomer                     OperationID = "updateCustomer"
	OperationUpdateOrder                        OperationID = "updateOrder"
	OperationUpdatePolicy                       OperationID = "updatePolicy"
	OperationUpdateProduct                      OperationID = "updateProduct"
	OperationUpdateProductCustomFieldDefinition OperationID = "updateProductCustomFieldDefinition"
	OperationUpdateSubscription                 OperationID = "updateSubscription"
	OperationUpdateWebhookEndpoint              OperationID = "updateWebhookEndpoint"
	OperationUpsertCustomerCustomFieldValue     OperationID = "upsertCustomerCustomFieldValue"
	OperationUpsertLicenseCustomFieldValue      OperationID = "upsertLicenseCustomFieldValue"
	OperationValidateLicense                    OperationID = "validateLicense"
)

type OperationMetadata

type OperationMetadata struct {
	Method  string
	Path    string
	Auth    string
	Success []int
}

type Order

type Order = licensekitgenerated.Order

type OrderStatus

type OrderStatus = licensekitgenerated.OrderStatus

type Policy

type Policy = licensekitgenerated.Policy

type Product

type Product = licensekitgenerated.Product

type PublicKey

type PublicKey = licensekitgenerated.PublicKey

type PublicKeyRecord

type PublicKeyRecord = licensekitgenerated.PublicKey

func FindPublicKey

func FindPublicKey(keys any, kid string) (PublicKeyRecord, bool)

type PublicKeyStore

type PublicKeyStore struct {
	// contains filtered or unexported fields
}

func NewPublicKeyStore

func NewPublicKeyStore(keys []PublicKeyRecord) *PublicKeyStore

func (*PublicKeyStore) Add

func (s *PublicKeyStore) Add(key PublicKeyRecord)

func (*PublicKeyStore) AddAll

func (s *PublicKeyStore) AddAll(keys []PublicKeyRecord)

func (*PublicKeyStore) Get

func (s *PublicKeyStore) Get(kid string) (PublicKeyRecord, bool)

func (*PublicKeyStore) Values

func (s *PublicKeyStore) Values() []PublicKeyRecord

type RawResponse

type RawResponse[T any] struct {
	Status   int
	Headers  http.Header
	Data     T
	Response *http.Response
	Body     []byte
}

type ReadyData

type ReadyData = licensekitgenerated.ReadyData

type ReadyzResult

type ReadyzResult struct {
	Data licensekitgenerated.ReadyData    `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ReinstateLicenseResult

type ReinstateLicenseResult struct {
	Data licensekitgenerated.License      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type RemoveLicenseFeatureResult

type RemoveLicenseFeatureResult struct{}

type RenewLicenseResult

type RenewLicenseResult struct {
	Data licensekitgenerated.License      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ReportExportCreateRequest added in v1.0.0

type ReportExportCreateRequest = licensekitgenerated.ReportExportCreateRequest

type ReportExportFormat added in v1.0.0

type ReportExportFormat = licensekitgenerated.ReportExportFormat

type ReportExportMetadata added in v1.0.0

type ReportExportMetadata = licensekitgenerated.ReportExportMetadata

type ReportKind added in v1.0.0

type ReportKind = licensekitgenerated.ReportKind

type RequestOption

type RequestOption func(*RequestOptions)

func WithHeader

func WithHeader(key, value string) RequestOption

func WithHeaders

func WithHeaders(headers http.Header) RequestOption

func WithTimeout

func WithTimeout(timeout time.Duration) RequestOption

type RequestOptions

type RequestOptions struct {
	Headers http.Header
	Timeout time.Duration
}

type ResetLicenseDeviceResult

type ResetLicenseDeviceResult struct {
	Data licensekitgenerated.Device       `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type ResetLicenseUsageResult

type ResetLicenseUsageResult struct {
	Data licensekitgenerated.LicenseFeature `json:"data"`
	Meta licensekitgenerated.ResponseMeta   `json:"meta"`
}

type ResponseMeta

type ResponseMeta = licensekitgenerated.ResponseMeta

type RetryOptions

type RetryOptions struct {
	Retries          int
	RetryableMethods []string
}

type RevokeLicenseResult

type RevokeLicenseResult struct {
	Data licensekitgenerated.License      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type RuntimeClient

type RuntimeClient struct {
	Raw *RuntimeRawClient
	// contains filtered or unexported fields
}

func NewRuntimeClient

func NewRuntimeClient(options RuntimeClientOptions) (*RuntimeClient, error)

func (*RuntimeClient) ActivateLicense

func (c *RuntimeClient) ActivateLicense(ctx context.Context, params *ActivateLicenseParams, body ActivateLicenseJSONRequestBody, requestOptions ...RequestOption) (*ActivateLicenseResult, error)

func (*RuntimeClient) CheckLicense

func (c *RuntimeClient) CheckLicense(ctx context.Context, body CheckLicenseJSONRequestBody, requestOptions ...RequestOption) (*CheckLicenseResult, error)

func (*RuntimeClient) CheckinFloatingLicense

func (*RuntimeClient) ConsumeLicense

func (c *RuntimeClient) ConsumeLicense(ctx context.Context, params *ConsumeLicenseParams, body ConsumeLicenseJSONRequestBody, requestOptions ...RequestOption) (*ConsumeLicenseResult, error)

func (*RuntimeClient) DeactivateLicense

func (*RuntimeClient) HeartbeatFloatingLicense

func (c *RuntimeClient) HeartbeatFloatingLicense(ctx context.Context, body HeartbeatFloatingLicenseJSONRequestBody, requestOptions ...RequestOption) (*HeartbeatFloatingLicenseResult, error)

func (*RuntimeClient) IssueOfflineLicense

func (c *RuntimeClient) IssueOfflineLicense(ctx context.Context, body IssueOfflineLicenseJSONRequestBody, requestOptions ...RequestOption) (*IssueOfflineLicenseResult, error)

func (*RuntimeClient) ValidateLicense

func (c *RuntimeClient) ValidateLicense(ctx context.Context, body ValidateLicenseJSONRequestBody, requestOptions ...RequestOption) (*ValidateLicenseResult, error)

type RuntimeClientOptions

type RuntimeClientOptions struct {
	ClientOptions
	LicenseKey string
}

type RuntimeRawClient

type RuntimeRawClient struct {
	// contains filtered or unexported fields
}

func (*RuntimeRawClient) ActivateLicense

func (*RuntimeRawClient) CheckLicense

func (*RuntimeRawClient) ConsumeLicense

func (*RuntimeRawClient) DeactivateLicense

func (*RuntimeRawClient) HeartbeatFloatingLicense

func (*RuntimeRawClient) IssueOfflineLicense

func (*RuntimeRawClient) ValidateLicense

type RuntimeSignature

type RuntimeSignature = licensekitgenerated.Signature

type RuntimeVerifiable

type RuntimeVerifiable interface {
	// contains filtered or unexported methods
}

type ScopeMetadata

type ScopeMetadata struct {
	Method string
	Path   string
	Scopes []ManagementScope
}

type Signature

type Signature = licensekitgenerated.Signature

type Subscription

type Subscription = licensekitgenerated.Subscription

type SuspendLicenseResult

type SuspendLicenseResult struct {
	Data licensekitgenerated.License      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type SystemClient

type SystemClient struct {
	Raw *SystemRawClient
	// contains filtered or unexported fields
}

func NewSystemClient

func NewSystemClient(options SystemClientOptions) (*SystemClient, error)
Example
client, err := NewSystemClient(SystemClientOptions{
	BaseURL: "https://api.licensekit.dev",
})
if err != nil {
	panic(err)
}

fmt.Println(client != nil)
Output:
true

func (*SystemClient) GetMetrics

func (c *SystemClient) GetMetrics(ctx context.Context, requestOptions ...RequestOption) (string, error)

func (*SystemClient) Health

func (c *SystemClient) Health(ctx context.Context, requestOptions ...RequestOption) (*HealthResult, error)

func (*SystemClient) Healthz

func (c *SystemClient) Healthz(ctx context.Context, requestOptions ...RequestOption) (*HealthzResult, error)

func (*SystemClient) ListPublicKeys

func (c *SystemClient) ListPublicKeys(ctx context.Context, requestOptions ...RequestOption) (*ListPublicKeysResult, error)

func (*SystemClient) Readyz

func (c *SystemClient) Readyz(ctx context.Context, requestOptions ...RequestOption) (*ReadyzResult, error)

type SystemClientOptions

type SystemClientOptions = ClientOptions

type SystemRawClient

type SystemRawClient struct {
	// contains filtered or unexported fields
}

func (*SystemRawClient) GetMetrics

func (c *SystemRawClient) GetMetrics(ctx context.Context, requestOptions ...RequestOption) (*RawResponse[GetMetricsResult], error)

func (*SystemRawClient) Health

func (c *SystemRawClient) Health(ctx context.Context, requestOptions ...RequestOption) (*RawResponse[HealthResult], error)

func (*SystemRawClient) Healthz

func (c *SystemRawClient) Healthz(ctx context.Context, requestOptions ...RequestOption) (*RawResponse[HealthzResult], error)

func (*SystemRawClient) ListPublicKeys

func (c *SystemRawClient) ListPublicKeys(ctx context.Context, requestOptions ...RequestOption) (*RawResponse[ListPublicKeysResult], error)

func (*SystemRawClient) Readyz

func (c *SystemRawClient) Readyz(ctx context.Context, requestOptions ...RequestOption) (*RawResponse[ReadyzResult], error)

type TransferLicenseResult

type TransferLicenseResult struct {
	Data licensekitgenerated.License      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type UpdateCustomerResult

type UpdateCustomerResult struct {
	Data licensekitgenerated.Customer     `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type UpdateOrderResult

type UpdateOrderResult struct {
	Data licensekitgenerated.Order        `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type UpdatePolicyResult

type UpdatePolicyResult struct {
	Data licensekitgenerated.Policy       `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type UpdateProductCustomFieldDefinitionResult

type UpdateProductCustomFieldDefinitionResult struct {
	Data licensekitgenerated.CustomFieldDefinition `json:"data"`
	Meta licensekitgenerated.ResponseMeta          `json:"meta"`
}

type UpdateProductResult

type UpdateProductResult struct {
	Data licensekitgenerated.Product      `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type UpdateSubscriptionResult

type UpdateSubscriptionResult struct {
	Data licensekitgenerated.Subscription `json:"data"`
	Meta licensekitgenerated.ResponseMeta `json:"meta"`
}

type UpdateWebhookEndpointResult

type UpdateWebhookEndpointResult struct {
	Data licensekitgenerated.UpdateWebhookEndpoint_200_Data `json:"data"`
	Meta licensekitgenerated.ResponseMeta                   `json:"meta"`
}

type UpsertCustomerCustomFieldValueResult

type UpsertCustomerCustomFieldValueResult struct {
	Data licensekitgenerated.CustomFieldValue `json:"data"`
	Meta licensekitgenerated.ResponseMeta     `json:"meta"`
}

type UpsertLicenseCustomFieldValueResult

type UpsertLicenseCustomFieldValueResult struct {
	Data licensekitgenerated.CustomFieldValue `json:"data"`
	Meta licensekitgenerated.ResponseMeta     `json:"meta"`
}

type VerificationResult

type VerificationResult struct {
	OK  bool
	Key PublicKeyRecord
}

func VerifyRuntimePayload

func VerifyRuntimePayload(data any, signature RuntimeSignature, keys any) (VerificationResult, error)

func VerifyRuntimeResult

func VerifyRuntimeResult(result RuntimeVerifiable, keys any) (VerificationResult, error)

Directories

Path Synopsis
examples
06_reset_device command
Package generated provides primitives to interact with the openapi HTTP API.
Package generated provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL