models

package
v0.95.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PAT

type PAT struct {
	ID         string `rql:"name=id,type=string"`
	UserID     string `rql:"name=user_id,type=string"`
	OrgID      string `rql:"name=org_id,type=string"`
	Title      string `rql:"name=title,type=string"`
	SecretHash string `json:"-"`
	Metadata   metadata.Metadata
	Scopes     []PATScope
	LastUsedAt *time.Time `rql:"name=last_used_at,type=datetime"` // last_used_at can be null
	ExpiresAt  time.Time  `rql:"name=expires_at,type=datetime"`
	CreatedAt  time.Time  `rql:"name=created_at,type=datetime"`
	UpdatedAt  time.Time  `rql:"name=updated_at,type=datetime"`
}

type PATList added in v0.94.0

type PATList struct {
	PATs []PAT
	Page utils.Page
}

type PATScope added in v0.95.0

type PATScope struct {
	RoleID       string   // role UUID
	ResourceType string   // schema.OrganizationNamespace ("app/organization") or schema.ProjectNamespace ("app/project")
	ResourceIDs  []string // specific resource UUIDs; empty = all resources in scope
}

PATScope pairs a role with its resource type and optional resource IDs.

Jump to

Keyboard shortcuts

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