schema

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package schema provides Ent schema definitions for CoreForge identity management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	ent.Schema
}

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.

func (APIKey) Edges

func (APIKey) Edges() []ent.Edge

Edges of the APIKey.

func (APIKey) Fields

func (APIKey) Fields() []ent.Field

Fields of the APIKey.

func (APIKey) Indexes

func (APIKey) Indexes() []ent.Index

Indexes of the APIKey.

func (APIKey) Mixin

func (APIKey) Mixin() []ent.Mixin

Mixin of the APIKey.

type BaseMixin

type BaseMixin struct {
	mixin.Schema
}

BaseMixin combines UUID and Timestamp mixins for convenience.

func (BaseMixin) Fields

func (BaseMixin) Fields() []ent.Field

Fields returns combined UUID and timestamp fields.

type Membership

type Membership struct {
	ent.Schema
}

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.

func (Membership) Edges

func (Membership) Edges() []ent.Edge

Edges of the Membership.

func (Membership) Fields

func (Membership) Fields() []ent.Field

Fields of the Membership.

func (Membership) Indexes

func (Membership) Indexes() []ent.Index

Indexes of the Membership.

func (Membership) Mixin

func (Membership) Mixin() []ent.Mixin

Mixin of the Membership.

type OAuthAccount

type OAuthAccount struct {
	ent.Schema
}

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) Edges

func (OAuthAccount) Edges() []ent.Edge

Edges of the OAuthAccount.

func (OAuthAccount) Fields

func (OAuthAccount) Fields() []ent.Field

Fields of the OAuthAccount.

func (OAuthAccount) Indexes

func (OAuthAccount) Indexes() []ent.Index

Indexes of the OAuthAccount.

func (OAuthAccount) Mixin

func (OAuthAccount) Mixin() []ent.Mixin

Mixin of the OAuthAccount.

type OAuthApp

type OAuthApp struct {
	ent.Schema
}

OAuthApp holds the schema definition for OAuth 2.0 applications/clients.

func (OAuthApp) Annotations

func (OAuthApp) Annotations() []schema.Annotation

Annotations of the OAuthApp.

func (OAuthApp) Edges

func (OAuthApp) Edges() []ent.Edge

Edges of the OAuthApp.

func (OAuthApp) Fields

func (OAuthApp) Fields() []ent.Field

Fields of the OAuthApp.

func (OAuthApp) Indexes

func (OAuthApp) Indexes() []ent.Index

Indexes of the OAuthApp.

type OAuthAppSecret

type OAuthAppSecret struct {
	ent.Schema
}

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) Edges

func (OAuthAppSecret) Edges() []ent.Edge

Edges 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

type OAuthAuthCode struct {
	ent.Schema
}

OAuthAuthCode holds OAuth 2.0 authorization codes.

func (OAuthAuthCode) Annotations

func (OAuthAuthCode) Annotations() []schema.Annotation

Annotations of the OAuthAuthCode.

func (OAuthAuthCode) Edges

func (OAuthAuthCode) Edges() []ent.Edge

Edges 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

type OAuthConsent struct {
	ent.Schema
}

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) Edges

func (OAuthConsent) Edges() []ent.Edge

Edges of the OAuthConsent.

func (OAuthConsent) Fields

func (OAuthConsent) Fields() []ent.Field

Fields of the OAuthConsent.

func (OAuthConsent) Indexes

func (OAuthConsent) Indexes() []ent.Index

Indexes of the OAuthConsent.

type OAuthToken

type OAuthToken struct {
	ent.Schema
}

OAuthToken holds OAuth 2.0 access and refresh tokens.

func (OAuthToken) Annotations

func (OAuthToken) Annotations() []schema.Annotation

Annotations of the OAuthToken.

func (OAuthToken) Edges

func (OAuthToken) Edges() []ent.Edge

Edges of the OAuthToken.

func (OAuthToken) Fields

func (OAuthToken) Fields() []ent.Field

Fields of the OAuthToken.

func (OAuthToken) Indexes

func (OAuthToken) Indexes() []ent.Index

Indexes of the OAuthToken.

type Organization

type Organization struct {
	ent.Schema
}

Organization holds the schema definition for the Organization entity.

func (Organization) Annotations

func (Organization) Annotations() []schema.Annotation

Annotations of the Organization.

func (Organization) Edges

func (Organization) Edges() []ent.Edge

Edges of the Organization.

func (Organization) Fields

func (Organization) Fields() []ent.Field

Fields of the Organization.

func (Organization) Indexes

func (Organization) Indexes() []ent.Index

Indexes of the Organization.

func (Organization) Mixin

func (Organization) Mixin() []ent.Mixin

Mixin of the Organization.

type RefreshToken

type RefreshToken struct {
	ent.Schema
}

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) Edges

func (RefreshToken) Edges() []ent.Edge

Edges of the RefreshToken.

func (RefreshToken) Fields

func (RefreshToken) Fields() []ent.Field

Fields of the RefreshToken.

func (RefreshToken) Indexes

func (RefreshToken) Indexes() []ent.Index

Indexes of the RefreshToken.

func (RefreshToken) Mixin

func (RefreshToken) Mixin() []ent.Mixin

Mixin of the RefreshToken.

type ServiceAccount

type ServiceAccount struct {
	ent.Schema
}

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) Edges

func (ServiceAccount) Edges() []ent.Edge

Edges 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

type ServiceAccountKeyPair struct {
	ent.Schema
}

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 TimestampMixin

type TimestampMixin struct {
	mixin.Schema
}

TimestampMixin provides created_at and updated_at timestamp fields.

func (TimestampMixin) Fields

func (TimestampMixin) Fields() []ent.Field

Fields returns the timestamp fields.

type UUIDMixin

type UUIDMixin struct {
	mixin.Schema
}

UUIDMixin provides a UUID primary key field.

func (UUIDMixin) Fields

func (UUIDMixin) Fields() []ent.Field

Fields returns the UUID id field.

type User

type User struct {
	ent.Schema
}

User holds the schema definition for the User entity.

func (User) Annotations

func (User) Annotations() []schema.Annotation

Annotations of the User.

func (User) Edges

func (User) Edges() []ent.Edge

Edges of the User.

func (User) Fields

func (User) Fields() []ent.Field

Fields of the User.

func (User) Indexes

func (User) Indexes() []ent.Index

Indexes of the User.

func (User) Mixin

func (User) Mixin() []ent.Mixin

Mixin of the User.

Jump to

Keyboard shortcuts

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