Documentation
¶
Overview ¶
Package schema provides Ent schema definitions for CoreForge identity management.
Index ¶
- type APIKey
- type Agent
- type Application
- type BaseMixin
- type Credential
- type Human
- type Invite
- type Membership
- type OAuthAccount
- type OAuthApp
- type OAuthAppSecret
- type OAuthAuthCode
- type OAuthConsent
- type OAuthToken
- type Organization
- type Principal
- type PrincipalMembership
- type PrincipalToken
- type RefreshToken
- type ServiceAccount
- type ServiceAccountKeyPair
- type ServicePrincipal
- type TimestampMixin
- type UUIDMixin
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
APIKey holds the schema definition for the APIKey entity. API keys provide server-to-server authentication without user interaction.
func (APIKey) Annotations ¶
func (APIKey) Annotations() []schema.Annotation
Annotations of the APIKey.
type Agent ¶ added in v0.2.0
Agent holds the schema definition for AI agent-specific principal data. This is a one-to-one extension of Principal where type="agent".
func (Agent) Annotations ¶ added in v0.2.0
func (Agent) Annotations() []schema.Annotation
Annotations of the Agent.
type Application ¶ added in v0.2.0
Application holds the schema definition for OAuth application-specific principal data. This is a one-to-one extension of Principal where type="application".
func (Application) Annotations ¶ added in v0.2.0
func (Application) Annotations() []schema.Annotation
Annotations of the Application.
func (Application) Edges ¶ added in v0.2.0
func (Application) Edges() []ent.Edge
Edges of the Application.
func (Application) Fields ¶ added in v0.2.0
func (Application) Fields() []ent.Field
Fields of the Application.
func (Application) Indexes ¶ added in v0.2.0
func (Application) Indexes() []ent.Index
Indexes of the Application.
func (Application) Mixin ¶ added in v0.2.0
func (Application) Mixin() []ent.Mixin
Mixin of the Application.
type Credential ¶ added in v0.2.0
Credential holds the schema definition for unified credentials. Credentials can be passwords, API keys, keypairs, WebAuthn credentials, or TOTP secrets.
func (Credential) Annotations ¶ added in v0.2.0
func (Credential) Annotations() []schema.Annotation
Annotations of the Credential.
func (Credential) Edges ¶ added in v0.2.0
func (Credential) Edges() []ent.Edge
Edges of the Credential.
func (Credential) Fields ¶ added in v0.2.0
func (Credential) Fields() []ent.Field
Fields of the Credential.
func (Credential) Indexes ¶ added in v0.2.0
func (Credential) Indexes() []ent.Index
Indexes of the Credential.
type Human ¶ added in v0.2.0
Human holds the schema definition for human-specific principal data. This is a one-to-one extension of Principal where type="human".
func (Human) Annotations ¶ added in v0.2.0
func (Human) Annotations() []schema.Annotation
Annotations of the Human.
type Invite ¶ added in v0.2.0
Invite holds the schema definition for organization invitations. Invites allow existing members to invite new users to join an organization.
func (Invite) Annotations ¶ added in v0.2.0
func (Invite) Annotations() []schema.Annotation
Annotations of the Invite.
type Membership ¶
Membership holds the schema definition for the Membership entity. It represents a user's membership in an organization with a specific role.
func (Membership) Annotations ¶
func (Membership) Annotations() []schema.Annotation
Annotations of the Membership.
type OAuthAccount ¶
OAuthAccount holds the schema definition for the OAuthAccount entity. It stores OAuth provider connections for users, supporting multiple providers per user.
func (OAuthAccount) Annotations ¶
func (OAuthAccount) Annotations() []schema.Annotation
Annotations of the OAuthAccount.
func (OAuthAccount) Indexes ¶
func (OAuthAccount) Indexes() []ent.Index
Indexes of the OAuthAccount.
type OAuthApp ¶
OAuthApp holds the schema definition for OAuth 2.0 applications/clients.
func (OAuthApp) Annotations ¶
func (OAuthApp) Annotations() []schema.Annotation
Annotations of the OAuthApp.
type OAuthAppSecret ¶
OAuthAppSecret holds client secrets for OAuth apps. Multiple secrets can exist for rotation purposes.
func (OAuthAppSecret) Annotations ¶
func (OAuthAppSecret) Annotations() []schema.Annotation
Annotations of the OAuthAppSecret.
func (OAuthAppSecret) Fields ¶
func (OAuthAppSecret) Fields() []ent.Field
Fields of the OAuthAppSecret.
func (OAuthAppSecret) Indexes ¶
func (OAuthAppSecret) Indexes() []ent.Index
Indexes of the OAuthAppSecret.
type OAuthAuthCode ¶
OAuthAuthCode holds OAuth 2.0 authorization codes.
func (OAuthAuthCode) Annotations ¶
func (OAuthAuthCode) Annotations() []schema.Annotation
Annotations of the OAuthAuthCode.
func (OAuthAuthCode) Fields ¶
func (OAuthAuthCode) Fields() []ent.Field
Fields of the OAuthAuthCode.
func (OAuthAuthCode) Indexes ¶
func (OAuthAuthCode) Indexes() []ent.Index
Indexes of the OAuthAuthCode.
type OAuthConsent ¶
OAuthConsent tracks user consent for OAuth apps. First-party apps skip consent; third-party apps require explicit approval.
func (OAuthConsent) Annotations ¶
func (OAuthConsent) Annotations() []schema.Annotation
Annotations of the OAuthConsent.
func (OAuthConsent) Indexes ¶
func (OAuthConsent) Indexes() []ent.Index
Indexes of the OAuthConsent.
type OAuthToken ¶
OAuthToken holds OAuth 2.0 access and refresh tokens.
func (OAuthToken) Annotations ¶
func (OAuthToken) Annotations() []schema.Annotation
Annotations of the OAuthToken.
type Organization ¶
Organization holds the schema definition for the Organization entity.
func (Organization) Annotations ¶
func (Organization) Annotations() []schema.Annotation
Annotations of the Organization.
func (Organization) Indexes ¶
func (Organization) Indexes() []ent.Index
Indexes of the Organization.
type Principal ¶ added in v0.2.0
Principal holds the schema definition for the Principal entity. Principal is the unified identity root representing any type of actor: human, application, agent, or service.
func (Principal) Annotations ¶ added in v0.2.0
func (Principal) Annotations() []schema.Annotation
Annotations of the Principal.
type PrincipalMembership ¶ added in v0.2.0
PrincipalMembership holds the schema definition for principal-organization memberships. This extends the existing Membership concept to support all principal types.
func (PrincipalMembership) Annotations ¶ added in v0.2.0
func (PrincipalMembership) Annotations() []schema.Annotation
Annotations of the PrincipalMembership.
func (PrincipalMembership) Edges ¶ added in v0.2.0
func (PrincipalMembership) Edges() []ent.Edge
Edges of the PrincipalMembership.
func (PrincipalMembership) Fields ¶ added in v0.2.0
func (PrincipalMembership) Fields() []ent.Field
Fields of the PrincipalMembership.
func (PrincipalMembership) Indexes ¶ added in v0.2.0
func (PrincipalMembership) Indexes() []ent.Index
Indexes of the PrincipalMembership.
func (PrincipalMembership) Mixin ¶ added in v0.2.0
func (PrincipalMembership) Mixin() []ent.Mixin
Mixin of the PrincipalMembership.
type PrincipalToken ¶ added in v0.2.0
PrincipalToken holds OAuth 2.0 access and refresh tokens for principals. This replaces OAuthToken with principal-centric token management.
func (PrincipalToken) Annotations ¶ added in v0.2.0
func (PrincipalToken) Annotations() []schema.Annotation
Annotations of the PrincipalToken.
func (PrincipalToken) Edges ¶ added in v0.2.0
func (PrincipalToken) Edges() []ent.Edge
Edges of the PrincipalToken.
func (PrincipalToken) Fields ¶ added in v0.2.0
func (PrincipalToken) Fields() []ent.Field
Fields of the PrincipalToken.
func (PrincipalToken) Indexes ¶ added in v0.2.0
func (PrincipalToken) Indexes() []ent.Index
Indexes of the PrincipalToken.
type RefreshToken ¶
RefreshToken holds the schema definition for the RefreshToken entity. It tracks JWT refresh tokens for token rotation and revocation.
func (RefreshToken) Annotations ¶
func (RefreshToken) Annotations() []schema.Annotation
Annotations of the RefreshToken.
func (RefreshToken) Indexes ¶
func (RefreshToken) Indexes() []ent.Index
Indexes of the RefreshToken.
type ServiceAccount ¶
ServiceAccount represents a non-human identity for server-to-server OAuth. Used with JWT Bearer grant (RFC 7523) for machine-to-machine authentication.
func (ServiceAccount) Annotations ¶
func (ServiceAccount) Annotations() []schema.Annotation
Annotations of the ServiceAccount.
func (ServiceAccount) Fields ¶
func (ServiceAccount) Fields() []ent.Field
Fields of the ServiceAccount.
func (ServiceAccount) Indexes ¶
func (ServiceAccount) Indexes() []ent.Index
Indexes of the ServiceAccount.
type ServiceAccountKeyPair ¶
ServiceAccountKeyPair holds RSA/EC key pairs for JWT Bearer authentication. Multiple keys can exist for rotation purposes.
func (ServiceAccountKeyPair) Annotations ¶
func (ServiceAccountKeyPair) Annotations() []schema.Annotation
Annotations of the ServiceAccountKeyPair.
func (ServiceAccountKeyPair) Edges ¶
func (ServiceAccountKeyPair) Edges() []ent.Edge
Edges of the ServiceAccountKeyPair.
func (ServiceAccountKeyPair) Fields ¶
func (ServiceAccountKeyPair) Fields() []ent.Field
Fields of the ServiceAccountKeyPair.
func (ServiceAccountKeyPair) Indexes ¶
func (ServiceAccountKeyPair) Indexes() []ent.Index
Indexes of the ServiceAccountKeyPair.
type ServicePrincipal ¶ added in v0.2.0
ServicePrincipal holds the schema definition for backend service-specific principal data. This is a one-to-one extension of Principal where type="service".
func (ServicePrincipal) Annotations ¶ added in v0.2.0
func (ServicePrincipal) Annotations() []schema.Annotation
Annotations of the ServicePrincipal.
func (ServicePrincipal) Edges ¶ added in v0.2.0
func (ServicePrincipal) Edges() []ent.Edge
Edges of the ServicePrincipal.
func (ServicePrincipal) Fields ¶ added in v0.2.0
func (ServicePrincipal) Fields() []ent.Field
Fields of the ServicePrincipal.
func (ServicePrincipal) Indexes ¶ added in v0.2.0
func (ServicePrincipal) Indexes() []ent.Index
Indexes of the ServicePrincipal.
func (ServicePrincipal) Mixin ¶ added in v0.2.0
func (ServicePrincipal) Mixin() []ent.Mixin
Mixin of the ServicePrincipal.
type TimestampMixin ¶
TimestampMixin provides created_at and updated_at timestamp fields.
func (TimestampMixin) Fields ¶
func (TimestampMixin) Fields() []ent.Field
Fields returns the timestamp fields.
Source Files
¶
- agent.go
- api_key.go
- application.go
- credential.go
- human.go
- invite.go
- membership.go
- mixin.go
- oauth_account.go
- oauth_app.go
- oauth_app_secret.go
- oauth_auth_code.go
- oauth_consent.go
- oauth_token.go
- organization.go
- principal.go
- principal_membership.go
- principal_token.go
- refresh_token.go
- service_account.go
- service_account_key_pair.go
- service_principal.go
- user.go