generated

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiKey

type ApiKey struct {
	Identifier             string
	Salt                   pgtype.UUID
	Hash                   []byte
	OrganizationIdentifier pgtype.UUID
	Role                   string
	CreatedAt              pgtype.Timestamp
}

type Configuration

type Configuration struct {
	ConfigurationKey   string
	ConfigurationValue string
	UpdatedAt          pgtype.Timestamp
}

type CreateDeviceCodeFlowParams

type CreateDeviceCodeFlowParams struct {
	Identifier pgtype.UUID
	Code       string
	Poll       pgtype.UUID
}

type CreateGithubOAuthFlowParams

type CreateGithubOAuthFlowParams struct {
	Identifier       pgtype.UUID
	DeviceIdentifier pgtype.UUID
	UserIdentifier   pgtype.UUID
	Verifier         string
	Challenge        string
	NextUrl          string
}

type CreateGoogleOAuthFlowParams

type CreateGoogleOAuthFlowParams struct {
	Identifier       pgtype.UUID
	DeviceIdentifier pgtype.UUID
	UserIdentifier   pgtype.UUID
	Verifier         string
	Challenge        string
	NextUrl          string
}

type CreateIdentityParams

type CreateIdentityParams struct {
	Provider           string
	ProviderIdentifier string
	UserIdentifier     pgtype.UUID
	VerifiedEmails     []byte
}

type CreateMagicLinkFlowParams

type CreateMagicLinkFlowParams struct {
	Identifier       pgtype.UUID
	DeviceIdentifier pgtype.UUID
	UserIdentifier   pgtype.UUID
	NextUrl          string
	Salt             pgtype.UUID
	Hash             []byte
	EmailAddress     string
}

type CreateMembershipParams

type CreateMembershipParams struct {
	UserIdentifier         pgtype.UUID
	OrganizationIdentifier pgtype.UUID
	Role                   string
}

type CreateOrganizationParams

type CreateOrganizationParams struct {
	Identifier pgtype.UUID
	Name       string
	IsDefault  bool
}

type CreateSessionInvalidationParams

type CreateSessionInvalidationParams struct {
	SessionIdentifier pgtype.UUID
	Generation        int32
	ExpiresAt         pgtype.Timestamp
}

type CreateSessionParams

type CreateSessionParams struct {
	Identifier             pgtype.UUID
	OrganizationIdentifier pgtype.UUID
	UserIdentifier         pgtype.UUID
	Generation             int32
	ExpiresAt              pgtype.Timestamp
}

type CreateSessionRevocationParams

type CreateSessionRevocationParams struct {
	SessionIdentifier pgtype.UUID
	ExpiresAt         pgtype.Timestamp
}

type CreateUserParams

type CreateUserParams struct {
	Identifier                    pgtype.UUID
	Name                          string
	PrimaryEmail                  string
	DefaultOrganizationIdentifier pgtype.UUID
}

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 DeviceCodeFlow

type DeviceCodeFlow struct {
	Identifier        pgtype.UUID
	SessionIdentifier pgtype.UUID
	Code              string
	Poll              pgtype.UUID
	LastPoll          pgtype.Timestamp
	CreatedAt         pgtype.Timestamp
}

type GetIdentityByProviderAndProviderIdentifierParams

type GetIdentityByProviderAndProviderIdentifierParams struct {
	Provider           string
	ProviderIdentifier string
}

type GetMembershipByUserIdentifierAndOrganizationIdentifierParams

type GetMembershipByUserIdentifierAndOrganizationIdentifierParams struct {
	UserIdentifier         pgtype.UUID
	OrganizationIdentifier pgtype.UUID
}

type GetOrganizationsForUserIdentifierRow

type GetOrganizationsForUserIdentifierRow struct {
	Identifier          pgtype.UUID
	Name                string
	IsDefault           bool
	CreatedAt           pgtype.Timestamp
	MembershipRole      string
	MembershipCreatedAt pgtype.Timestamp
}

type GetSessionByIdentifierAndUserIdentifierParams

type GetSessionByIdentifierAndUserIdentifierParams struct {
	Identifier     pgtype.UUID
	UserIdentifier pgtype.UUID
}

type GithubOauthFlow

type GithubOauthFlow struct {
	Identifier       pgtype.UUID
	Verifier         string
	Challenge        string
	DeviceIdentifier pgtype.UUID
	UserIdentifier   pgtype.UUID
	NextUrl          string
	CreatedAt        pgtype.Timestamp
}

type GoogleOauthFlow

type GoogleOauthFlow struct {
	Identifier       pgtype.UUID
	Verifier         string
	Challenge        string
	DeviceIdentifier pgtype.UUID
	UserIdentifier   pgtype.UUID
	NextUrl          string
	CreatedAt        pgtype.Timestamp
}

type Identity

type Identity struct {
	Provider           string
	ProviderIdentifier string
	UserIdentifier     pgtype.UUID
	VerifiedEmails     []byte
	CreatedAt          pgtype.Timestamp
}

type Invitation

type Invitation struct {
	Identifier             int32
	OrganizationIdentifier pgtype.UUID
	InviterUserIdentifier  pgtype.UUID
	Role                   string
	Hash                   []byte
	Status                 string
	ExpiresAt              pgtype.Timestamp
	CreatedAt              pgtype.Timestamp
}

type MachineKey

type MachineKey struct {
	Identifier             string
	Salt                   pgtype.UUID
	Hash                   []byte
	OrganizationIdentifier pgtype.UUID
	Kind                   string
	CreatedAt              pgtype.Timestamp
}

type MagicLinkFlow

type MagicLinkFlow struct {
	Identifier       pgtype.UUID
	Salt             pgtype.UUID
	Hash             []byte
	EmailAddress     string
	DeviceIdentifier pgtype.UUID
	UserIdentifier   pgtype.UUID
	NextUrl          string
	CreatedAt        pgtype.Timestamp
}

type Membership

type Membership struct {
	UserIdentifier         pgtype.UUID
	OrganizationIdentifier pgtype.UUID
	Role                   string
	CreatedAt              pgtype.Timestamp
}

type Organization

type Organization struct {
	Identifier pgtype.UUID
	Name       string
	IsDefault  bool
	CreatedAt  pgtype.Timestamp
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CountAllDeviceCodeFlows

func (q *Queries) CountAllDeviceCodeFlows(ctx context.Context) (int64, error)

func (*Queries) CountAllGithubOAuthFlows

func (q *Queries) CountAllGithubOAuthFlows(ctx context.Context) (int64, error)

func (*Queries) CountAllGoogleOAuthFlows

func (q *Queries) CountAllGoogleOAuthFlows(ctx context.Context) (int64, error)

func (*Queries) CountAllMagicLinkFlows

func (q *Queries) CountAllMagicLinkFlows(ctx context.Context) (int64, error)

func (*Queries) CreateDeviceCodeFlow

func (q *Queries) CreateDeviceCodeFlow(ctx context.Context, arg CreateDeviceCodeFlowParams) error

func (*Queries) CreateGithubOAuthFlow

func (q *Queries) CreateGithubOAuthFlow(ctx context.Context, arg CreateGithubOAuthFlowParams) error

func (*Queries) CreateGoogleOAuthFlow

func (q *Queries) CreateGoogleOAuthFlow(ctx context.Context, arg CreateGoogleOAuthFlowParams) error

func (*Queries) CreateIdentity

func (q *Queries) CreateIdentity(ctx context.Context, arg CreateIdentityParams) error

func (*Queries) CreateMagicLinkFlow

func (q *Queries) CreateMagicLinkFlow(ctx context.Context, arg CreateMagicLinkFlowParams) error

func (*Queries) CreateMembership

func (q *Queries) CreateMembership(ctx context.Context, arg CreateMembershipParams) error

func (*Queries) CreateOrganization

func (q *Queries) CreateOrganization(ctx context.Context, arg CreateOrganizationParams) error

func (*Queries) CreateSession

func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) error

func (*Queries) CreateSessionInvalidation

func (q *Queries) CreateSessionInvalidation(ctx context.Context, arg CreateSessionInvalidationParams) error

func (*Queries) CreateSessionInvalidationsFromSessionByUserIdentifier

func (q *Queries) CreateSessionInvalidationsFromSessionByUserIdentifier(ctx context.Context, userIdentifier pgtype.UUID) (int64, error)

func (*Queries) CreateSessionRevocation

func (q *Queries) CreateSessionRevocation(ctx context.Context, arg CreateSessionRevocationParams) error

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) error

func (*Queries) DeleteAllDeviceCodeFlows

func (q *Queries) DeleteAllDeviceCodeFlows(ctx context.Context) (int64, error)

func (*Queries) DeleteAllGithubOAuthFlows

func (q *Queries) DeleteAllGithubOAuthFlows(ctx context.Context) (int64, error)

func (*Queries) DeleteAllGoogleOAuthFlows

func (q *Queries) DeleteAllGoogleOAuthFlows(ctx context.Context) (int64, error)

func (*Queries) DeleteAllMagicLinkFlows

func (q *Queries) DeleteAllMagicLinkFlows(ctx context.Context) (int64, error)

func (*Queries) DeleteDeviceCodeFlowByIdentifier

func (q *Queries) DeleteDeviceCodeFlowByIdentifier(ctx context.Context, identifier pgtype.UUID) (int64, error)

func (*Queries) DeleteDeviceCodeFlowsBeforeCreatedAt

func (q *Queries) DeleteDeviceCodeFlowsBeforeCreatedAt(ctx context.Context, createdAt pgtype.Timestamp) (int64, error)

func (*Queries) DeleteExpiredSessionInvalidations

func (q *Queries) DeleteExpiredSessionInvalidations(ctx context.Context) (int64, error)

func (*Queries) DeleteExpiredSessionRevocations

func (q *Queries) DeleteExpiredSessionRevocations(ctx context.Context) (int64, error)

func (*Queries) DeleteExpiredSessions

func (q *Queries) DeleteExpiredSessions(ctx context.Context) (int64, error)

func (*Queries) DeleteGithubOAuthFlowByIdentifier

func (q *Queries) DeleteGithubOAuthFlowByIdentifier(ctx context.Context, identifier pgtype.UUID) (int64, error)

func (*Queries) DeleteGithubOAuthFlowsBeforeCreatedAt

func (q *Queries) DeleteGithubOAuthFlowsBeforeCreatedAt(ctx context.Context, createdAt pgtype.Timestamp) (int64, error)

func (*Queries) DeleteGoogleOAuthFlowByIdentifier

func (q *Queries) DeleteGoogleOAuthFlowByIdentifier(ctx context.Context, identifier pgtype.UUID) (int64, error)

func (*Queries) DeleteGoogleOAuthFlowsBeforeCreatedAt

func (q *Queries) DeleteGoogleOAuthFlowsBeforeCreatedAt(ctx context.Context, createdAt pgtype.Timestamp) (int64, error)

func (*Queries) DeleteMagicLinkFlowByIdentifier

func (q *Queries) DeleteMagicLinkFlowByIdentifier(ctx context.Context, identifier pgtype.UUID) (int64, error)

func (*Queries) DeleteMagicLinkFlowsBeforeCreatedAt

func (q *Queries) DeleteMagicLinkFlowsBeforeCreatedAt(ctx context.Context, createdAt pgtype.Timestamp) (int64, error)

func (*Queries) DeleteSessionByIdentifier

func (q *Queries) DeleteSessionByIdentifier(ctx context.Context, identifier pgtype.UUID) (int64, error)

func (*Queries) GetAllConfigurations

func (q *Queries) GetAllConfigurations(ctx context.Context) ([]Configuration, error)

func (*Queries) GetAllIdentitiesByUserIdentifier

func (q *Queries) GetAllIdentitiesByUserIdentifier(ctx context.Context, userIdentifier pgtype.UUID) ([]Identity, error)

func (*Queries) GetAllSessionInvalidations

func (q *Queries) GetAllSessionInvalidations(ctx context.Context) ([]SessionInvalidation, error)

func (*Queries) GetAllSessionRevocations

func (q *Queries) GetAllSessionRevocations(ctx context.Context) ([]SessionRevocation, error)

func (*Queries) GetConfigurationByKey

func (q *Queries) GetConfigurationByKey(ctx context.Context, configurationKey string) (Configuration, error)

func (*Queries) GetDeviceCodeFlowByCode

func (q *Queries) GetDeviceCodeFlowByCode(ctx context.Context, code string) (DeviceCodeFlow, error)

func (*Queries) GetDeviceCodeFlowByIdentifier

func (q *Queries) GetDeviceCodeFlowByIdentifier(ctx context.Context, identifier pgtype.UUID) (DeviceCodeFlow, error)

func (*Queries) GetDeviceCodeFlowByPoll

func (q *Queries) GetDeviceCodeFlowByPoll(ctx context.Context, poll pgtype.UUID) (DeviceCodeFlow, error)

func (*Queries) GetGithubOAuthFlowByIdentifier

func (q *Queries) GetGithubOAuthFlowByIdentifier(ctx context.Context, identifier pgtype.UUID) (GithubOauthFlow, error)

func (*Queries) GetGoogleOAuthFlowByIdentifier

func (q *Queries) GetGoogleOAuthFlowByIdentifier(ctx context.Context, identifier pgtype.UUID) (GoogleOauthFlow, error)

func (*Queries) GetIdentityByProviderAndProviderIdentifier

func (q *Queries) GetIdentityByProviderAndProviderIdentifier(ctx context.Context, arg GetIdentityByProviderAndProviderIdentifierParams) (Identity, error)

func (*Queries) GetMagicLinkFlowByIdentifier

func (q *Queries) GetMagicLinkFlowByIdentifier(ctx context.Context, identifier pgtype.UUID) (MagicLinkFlow, error)

func (*Queries) GetMembershipByUserIdentifierAndOrganizationIdentifier

func (q *Queries) GetMembershipByUserIdentifierAndOrganizationIdentifier(ctx context.Context, arg GetMembershipByUserIdentifierAndOrganizationIdentifierParams) (Membership, error)

func (*Queries) GetMembershipsByOrganizationIdentifier

func (q *Queries) GetMembershipsByOrganizationIdentifier(ctx context.Context, organizationIdentifier pgtype.UUID) ([]Membership, error)

func (*Queries) GetMembershipsByUserIdentifier

func (q *Queries) GetMembershipsByUserIdentifier(ctx context.Context, userIdentifier pgtype.UUID) ([]Membership, error)

func (*Queries) GetOrganizationByIdentifier

func (q *Queries) GetOrganizationByIdentifier(ctx context.Context, identifier pgtype.UUID) (Organization, error)

func (*Queries) GetOrganizationsForUserIdentifier

func (q *Queries) GetOrganizationsForUserIdentifier(ctx context.Context, userIdentifier pgtype.UUID) ([]GetOrganizationsForUserIdentifierRow, error)

func (*Queries) GetSessionByIdentifier

func (q *Queries) GetSessionByIdentifier(ctx context.Context, identifier pgtype.UUID) (Session, error)

func (*Queries) GetSessionByIdentifierAndUserIdentifier

func (q *Queries) GetSessionByIdentifierAndUserIdentifier(ctx context.Context, arg GetSessionByIdentifierAndUserIdentifierParams) (Session, error)

func (*Queries) GetSessionRevocationBySessionIdentifier

func (q *Queries) GetSessionRevocationBySessionIdentifier(ctx context.Context, sessionIdentifier pgtype.UUID) (SessionRevocation, error)

func (*Queries) GetUserByIdentifier

func (q *Queries) GetUserByIdentifier(ctx context.Context, identifier pgtype.UUID) (User, error)

func (*Queries) IncrementAllSessionGenerationByUserIdentifier

func (q *Queries) IncrementAllSessionGenerationByUserIdentifier(ctx context.Context, userIdentifier pgtype.UUID) (int64, error)

func (*Queries) SetConfiguration

func (q *Queries) SetConfiguration(ctx context.Context, arg SetConfigurationParams) error

func (*Queries) UpdateDeviceCodeFlowLastPollByPoll

func (q *Queries) UpdateDeviceCodeFlowLastPollByPoll(ctx context.Context, poll pgtype.UUID) (int64, error)

func (*Queries) UpdateDeviceCodeFlowSessionIdentifierByIdentifier

func (q *Queries) UpdateDeviceCodeFlowSessionIdentifierByIdentifier(ctx context.Context, arg UpdateDeviceCodeFlowSessionIdentifierByIdentifierParams) (int64, error)

func (*Queries) UpdateMembershipRoleByUserIdentifierAndOrganizationIdentifier

func (q *Queries) UpdateMembershipRoleByUserIdentifierAndOrganizationIdentifier(ctx context.Context, arg UpdateMembershipRoleByUserIdentifierAndOrganizationIdentifierParams) (int64, error)

func (*Queries) UpdateSessionExpiryByIdentifier

func (q *Queries) UpdateSessionExpiryByIdentifier(ctx context.Context, arg UpdateSessionExpiryByIdentifierParams) (int64, error)

func (*Queries) UpdateSessionGenerationByIdentifier

func (q *Queries) UpdateSessionGenerationByIdentifier(ctx context.Context, arg UpdateSessionGenerationByIdentifierParams) (int64, error)

func (*Queries) UpdateUserLastLoginByIdentifier

func (q *Queries) UpdateUserLastLoginByIdentifier(ctx context.Context, identifier pgtype.UUID) (int64, error)

func (*Queries) UpdateUserNameByIdentifier

func (q *Queries) UpdateUserNameByIdentifier(ctx context.Context, arg UpdateUserNameByIdentifierParams) (int64, error)

func (*Queries) UpdateUserPrimaryEmailByIdentifier

func (q *Queries) UpdateUserPrimaryEmailByIdentifier(ctx context.Context, arg UpdateUserPrimaryEmailByIdentifierParams) (int64, error)

func (*Queries) WithTx

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

type ServiceKey

type ServiceKey struct {
	Identifier             string
	Salt                   pgtype.UUID
	Hash                   []byte
	OrganizationIdentifier pgtype.UUID
	UserIdentifier         pgtype.UUID
	Role                   string
	ResourceIds            []byte
	ExpiresAt              pgtype.Timestamp
	CreatedAt              pgtype.Timestamp
}

type Session

type Session struct {
	Identifier             pgtype.UUID
	OrganizationIdentifier pgtype.UUID
	UserIdentifier         pgtype.UUID
	Generation             int32
	ExpiresAt              pgtype.Timestamp
	CreatedAt              pgtype.Timestamp
}

type SessionInvalidation

type SessionInvalidation struct {
	SessionIdentifier pgtype.UUID
	Generation        int32
	ExpiresAt         pgtype.Timestamp
	CreatedAt         pgtype.Timestamp
}

type SessionRevocation

type SessionRevocation struct {
	SessionIdentifier pgtype.UUID
	ExpiresAt         pgtype.Timestamp
	CreatedAt         pgtype.Timestamp
}

type SetConfigurationParams

type SetConfigurationParams struct {
	ConfigurationKey   string
	ConfigurationValue string
}

type UpdateDeviceCodeFlowSessionIdentifierByIdentifierParams

type UpdateDeviceCodeFlowSessionIdentifierByIdentifierParams struct {
	SessionIdentifier pgtype.UUID
	Identifier        pgtype.UUID
}

type UpdateMembershipRoleByUserIdentifierAndOrganizationIdentifierParams

type UpdateMembershipRoleByUserIdentifierAndOrganizationIdentifierParams struct {
	Role                   string
	UserIdentifier         pgtype.UUID
	OrganizationIdentifier pgtype.UUID
}

type UpdateSessionExpiryByIdentifierParams

type UpdateSessionExpiryByIdentifierParams struct {
	ExpiresAt  pgtype.Timestamp
	Identifier pgtype.UUID
}

type UpdateSessionGenerationByIdentifierParams

type UpdateSessionGenerationByIdentifierParams struct {
	Generation int32
	Identifier pgtype.UUID
}

type UpdateUserNameByIdentifierParams

type UpdateUserNameByIdentifierParams struct {
	Name       string
	Identifier pgtype.UUID
}

type UpdateUserPrimaryEmailByIdentifierParams

type UpdateUserPrimaryEmailByIdentifierParams struct {
	PrimaryEmail string
	Identifier   pgtype.UUID
}

type User

type User struct {
	Identifier                    pgtype.UUID
	Name                          string
	PrimaryEmail                  string
	DefaultOrganizationIdentifier pgtype.UUID
	LastLogin                     pgtype.Timestamp
	CreatedAt                     pgtype.Timestamp
}

Jump to

Keyboard shortcuts

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