repository

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoreApiToken

type CoreApiToken struct {
	ID                  uuid.UUID          `json:"id"`
	ClientApplicationID uuid.UUID          `json:"client_application_id"`
	Name                string             `json:"name"`
	Description         pgtype.Text        `json:"description"`
	TokenHash           []byte             `json:"token_hash"`
	TokenPrefix         string             `json:"token_prefix"`
	ExpiresAt           time.Time          `json:"expires_at"`
	Revoked             bool               `json:"revoked"`
	RevokedAt           pgtype.Timestamptz `json:"revoked_at"`
	RevokedReason       pgtype.Text        `json:"revoked_reason"`
	RevokedBy           pgtype.Text        `json:"revoked_by"`
	CreatedBy           string             `json:"created_by"`
	Scopes              []string           `json:"scopes"`
	CreatedAt           time.Time          `json:"created_at"`
	UpdatedAt           time.Time          `json:"updated_at"`
	LastUsedAt          pgtype.Timestamptz `json:"last_used_at"`
	LastUsedIp          pgtype.Text        `json:"last_used_ip"`
}

type CoreApiTokenAuditLog

type CoreApiTokenAuditLog struct {
	ID             uuid.UUID   `json:"id"`
	TokenID        uuid.UUID   `json:"token_id"`
	Action         string      `json:"action"`
	IpAddress      pgtype.Text `json:"ip_address"`
	UserAgent      pgtype.Text `json:"user_agent"`
	Timestamp      time.Time   `json:"timestamp"`
	AdditionalData []byte      `json:"additional_data"`
}

type CoreClientApplication

type CoreClientApplication struct {
	ID          uuid.UUID          `json:"id"`
	Name        string             `json:"name"`
	Description pgtype.Text        `json:"description"`
	TenantID    pgtype.Text        `json:"tenant_id"`
	Active      bool               `json:"active"`
	CreatedBy   string             `json:"created_by"`
	CreatedAt   time.Time          `json:"created_at"`
	UpdatedAt   time.Time          `json:"updated_at"`
	LastUsedAt  pgtype.Timestamptz `json:"last_used_at"`
}

type CoreEmailVerificationToken

type CoreEmailVerificationToken struct {
	ID        uuid.UUID          `json:"id"`
	UserID    string             `json:"user_id"`
	TenantID  string             `json:"tenant_id"`
	Token     string             `json:"token"`
	TokenHash []byte             `json:"token_hash"`
	ExpiresAt time.Time          `json:"expires_at"`
	UsedAt    pgtype.Timestamptz `json:"used_at"`
	CreatedAt time.Time          `json:"created_at"`
	UpdatedAt time.Time          `json:"updated_at"`
}

type CoreGlobalConfig

type CoreGlobalConfig struct {
	ID        uuid.UUID   `json:"id"`
	Name      string      `json:"name"`
	Value     pgtype.Text `json:"value"`
	UserID    string      `json:"user_id"`
	CreatedAt time.Time   `json:"created_at"`
	UpdatedAt time.Time   `json:"updated_at"`
}

type CoreMigration

type CoreMigration struct {
	Version int64 `json:"version"`
	Dirty   bool  `json:"dirty"`
}

type CorePrompt

type CorePrompt struct {
	ID                 uuid.UUID   `json:"id"`
	Name               string      `json:"name"`
	Content            string      `json:"content"`
	Tags               []string    `json:"tags"`
	Parameters         []string    `json:"parameters"`
	SampleParameters   []byte      `json:"sample_parameters"`
	Format             string      `json:"format"`
	FormatInstructions pgtype.Text `json:"format_instructions"`
	UserID             string      `json:"user_id"`
	TenantID           string      `json:"tenant_id"`
	CreatedAt          time.Time   `json:"created_at"`
	UpdatedAt          time.Time   `json:"updated_at"`
}

type CoreRole

type CoreRole struct {
	ID        uuid.UUID `json:"id"`
	UserID    string    `json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Name      string    `json:"name"`
}

type CoreTenant

type CoreTenant struct {
	ID                    uuid.UUID          `json:"id"`
	TenantID              string             `json:"tenant_id"`
	Name                  string             `json:"name"`
	Subdomain             string             `json:"subdomain"`
	EnableEmailLinkSignIn bool               `json:"enable_email_link_sign_in"`
	AllowPasswordSignUp   bool               `json:"allow_password_sign_up"`
	UserID                string             `json:"user_id"`
	CreatedAt             time.Time          `json:"created_at"`
	UpdatedAt             time.Time          `json:"updated_at"`
	Profile               []byte             `json:"profile"`
	Features              []byte             `json:"features"`
	AllowSignUp           bool               `json:"allow_sign_up"`
	IsReseller            bool               `json:"is_reseller"`
	ResellerID            pgtype.Text        `json:"reseller_id"`
	ContractEndDate       pgtype.Timestamptz `json:"contract_end_date"`
	IsDisabled            bool               `json:"is_disabled"`
	FeatureLicenses       []byte             `json:"feature_licenses"`
}

type CoreTenantConfig

type CoreTenantConfig struct {
	ID        uuid.UUID   `json:"id"`
	Name      string      `json:"name"`
	Value     pgtype.Text `json:"value"`
	UserID    string      `json:"user_id"`
	TenantID  string      `json:"tenant_id"`
	CreatedAt time.Time   `json:"created_at"`
	UpdatedAt time.Time   `json:"updated_at"`
}

type CoreTranslation

type CoreTranslation struct {
	ID         uuid.UUID `json:"id"`
	EntityType string    `json:"entity_type"`
	EntityID   uuid.UUID `json:"entity_id"`
	Language   string    `json:"language"`
	Field      string    `json:"field"`
	Value      string    `json:"value"`
	TenantID   string    `json:"tenant_id"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type CoreUser

type CoreUser struct {
	ID        string      `json:"id"`
	Profile   []byte      `json:"profile"`
	Email     pgtype.Text `json:"email"`
	CreatedAt time.Time   `json:"created_at"`
	TenantID  pgtype.Text `json:"tenant_id"`
	Roles     []string    `json:"roles"`
}

type CoreUserTenantMembership

type CoreUserTenantMembership struct {
	ID        uuid.UUID          `json:"id"`
	UserID    string             `json:"user_id"`
	TenantID  string             `json:"tenant_id"`
	Status    string             `json:"status"`
	InvitedBy pgtype.Text        `json:"invited_by"`
	InvitedAt pgtype.Timestamptz `json:"invited_at"`
	JoinedAt  pgtype.Timestamptz `json:"joined_at"`
	CreatedAt time.Time          `json:"created_at"`
	UpdatedAt time.Time          `json:"updated_at"`
	Roles     []string           `json:"roles"`
}

type CountOutboxMessagesParams

type CountOutboxMessagesParams struct {
	TenantID  pgtype.Text `json:"tenant_id"`
	Status    pgtype.Text `json:"status"`
	EventType pgtype.Text `json:"event_type"`
}

type CreateOutboxMessageParams

type CreateOutboxMessageParams struct {
	EventType   string      `json:"event_type"`
	TargetUrl   string      `json:"target_url"`
	Payload     []byte      `json:"payload"`
	MaxAttempts int32       `json:"max_attempts"`
	TenantID    pgtype.Text `json:"tenant_id"`
	CreatedBy   pgtype.Text `json:"created_by"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type ListOutboxMessagesParams

type ListOutboxMessagesParams struct {
	TenantID  pgtype.Text `json:"tenant_id"`
	Status    pgtype.Text `json:"status"`
	EventType pgtype.Text `json:"event_type"`
	Offset    int32       `json:"offset"`
	Limit     int32       `json:"limit"`
}

type MarkOutboxMessageFailedParams

type MarkOutboxMessageFailedParams struct {
	ID          uuid.UUID   `json:"id"`
	Status      string      `json:"status"`
	Attempts    int32       `json:"attempts"`
	LastError   pgtype.Text `json:"last_error"`
	NextRetryAt time.Time   `json:"next_retry_at"`
}

type OutbOutboxMessage

type OutbOutboxMessage struct {
	ID        uuid.UUID `json:"id"`
	EventType string    `json:"event_type"`
	TargetUrl string    `json:"target_url"`
	Payload   []byte    `json:"payload"`
	// pending | sent | failed | dead
	Status      string             `json:"status"`
	Attempts    int32              `json:"attempts"`
	MaxAttempts int32              `json:"max_attempts"`
	NextRetryAt time.Time          `json:"next_retry_at"`
	LastError   pgtype.Text        `json:"last_error"`
	SentAt      pgtype.Timestamptz `json:"sent_at"`
	TenantID    pgtype.Text        `json:"tenant_id"`
	CreatedBy   pgtype.Text        `json:"created_by"`
	CreatedAt   time.Time          `json:"created_at"`
	UpdatedAt   time.Time          `json:"updated_at"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) ClaimPendingMessages

func (q *Queries) ClaimPendingMessages(ctx context.Context) ([]OutbOutboxMessage, error)

func (*Queries) CountOutboxMessages

func (q *Queries) CountOutboxMessages(ctx context.Context, arg CountOutboxMessagesParams) (int64, error)

func (*Queries) CreateOutboxMessage

func (q *Queries) CreateOutboxMessage(ctx context.Context, arg CreateOutboxMessageParams) (OutbOutboxMessage, error)

func (*Queries) DeleteOutboxMessage

func (q *Queries) DeleteOutboxMessage(ctx context.Context, id uuid.UUID) error

func (*Queries) GetOutboxMessageByID

func (q *Queries) GetOutboxMessageByID(ctx context.Context, id uuid.UUID) (OutbOutboxMessage, error)

func (*Queries) ListOutboxMessages

func (q *Queries) ListOutboxMessages(ctx context.Context, arg ListOutboxMessagesParams) ([]OutbOutboxMessage, error)

func (*Queries) MarkOutboxMessageFailed

func (q *Queries) MarkOutboxMessageFailed(ctx context.Context, arg MarkOutboxMessageFailedParams) (OutbOutboxMessage, error)

func (*Queries) MarkOutboxMessageSent

func (q *Queries) MarkOutboxMessageSent(ctx context.Context, id uuid.UUID) (OutbOutboxMessage, error)

func (*Queries) ResetOutboxMessage

func (q *Queries) ResetOutboxMessage(ctx context.Context, id uuid.UUID) (OutbOutboxMessage, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

Jump to

Keyboard shortcuts

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