keys

package
v0.0.0-...-4ae6852 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateKeyForm = Type("CreateKeyForm", func() {
	Required("name", "scopes")

	Attribute("name", String, "The name of the key")
	Attribute("scopes", ArrayOf(String), func() {
		Description("The scopes of the key that determines its permissions.")

		MinLength(1)
	})
})
View Source
var KeyModel = Type("Key", func() {
	Required("id", "organization_id", "created_by_user_id", "name", "key_prefix", "scopes", "created_at", "updated_at")

	Attribute("id", String, "The ID of the key")
	Attribute("organization_id", String, "The organization ID this key belongs to")
	Attribute("project_id", String, "The optional project ID this key is scoped to")
	Attribute("created_by_user_id", String, "The ID of the user who created this key")
	Attribute("name", String, "The name of the key")
	Attribute("key_prefix", String, "The store prefix of the api key for recognition")
	Attribute("key", String, "The token of the api key (only returned on key creation)")
	Attribute("scopes", ArrayOf(String), "List of permission scopes for this key")
	Attribute("created_at", String, func() {
		Description("The creation date of the key.")
		Format(FormatDateTime)
	})
	Attribute("updated_at", String, func() {
		Description("When the key was last updated.")
		Format(FormatDateTime)
	})
})
View Source
var ListKeysResult = Type("ListKeysResult", func() {
	Attribute("keys", ArrayOf(KeyModel))
	Required("keys")
})
View Source
var ValidateKeyOrganization = Type("ValidateKeyOrganization", func() {
	Required("id", "name", "slug")

	Attribute("id", String, "The ID of the organization")
	Attribute("name", String, "The name of the organization")
	Attribute("slug", String, "The slug of the organization")
})
View Source
var ValidateKeyProject = Type("ValidateKeyProject", func() {
	Required("id", "name", "slug")

	Attribute("id", String, "The ID of the project")
	Attribute("name", String, "The name of the project")
	Attribute("slug", String, "The slug of the project")
})
View Source
var VerifyKeyResult = Type("ValidateKeyResult", func() {
	Required("organization", "projects", "scopes")

	Attribute("organization", ValidateKeyOrganization, "The organization the key belongs to")
	Attribute("projects", ArrayOf(ValidateKeyProject), "The projects accessible with this key")
	Attribute("scopes", ArrayOf(String), "List of permission scopes for this key")
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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