generated

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 6 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                   string
	Hash                   []byte
	OrganizationIdentifier string
	Role                   string
	CreatedAt              time.Time
}

type Configuration

type Configuration struct {
	ConfigurationKey   string
	ConfigurationValue string
	UpdatedAt          time.Time
}

type CreateDeviceCodeFlowParams

type CreateDeviceCodeFlowParams struct {
	Identifier string
	Code       string
	Poll       string
}

type CreateGithubOAuthFlowParams

type CreateGithubOAuthFlowParams struct {
	Identifier       string
	DeviceIdentifier sql.NullString
	UserIdentifier   sql.NullString
	Verifier         string
	Challenge        string
	NextUrl          string
}

type CreateGoogleOAuthFlowParams

type CreateGoogleOAuthFlowParams struct {
	Identifier       string
	DeviceIdentifier sql.NullString
	UserIdentifier   sql.NullString
	Verifier         string
	Challenge        string
	NextUrl          string
}

type CreateIdentityParams

type CreateIdentityParams struct {
	Provider           IdentitiesProvider
	ProviderIdentifier string
	UserIdentifier     string
	VerifiedEmails     json.RawMessage
}

type CreateMagicLinkFlowParams

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

type CreateMembershipParams

type CreateMembershipParams struct {
	UserIdentifier         string
	OrganizationIdentifier string
	Role                   string
}

type CreateOrganizationParams

type CreateOrganizationParams struct {
	Identifier string
	Name       string
	IsDefault  bool
}

type CreateSessionInvalidationParams

type CreateSessionInvalidationParams struct {
	SessionIdentifier string
	Generation        uint32
	ExpiresAt         time.Time
}

type CreateSessionParams

type CreateSessionParams struct {
	Identifier             string
	OrganizationIdentifier string
	UserIdentifier         string
	Generation             uint32
	ExpiresAt              time.Time
}

type CreateSessionRevocationParams

type CreateSessionRevocationParams struct {
	SessionIdentifier string
	ExpiresAt         time.Time
}

type CreateUserParams

type CreateUserParams struct {
	Identifier                    string
	Name                          string
	PrimaryEmail                  string
	DefaultOrganizationIdentifier string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeviceCodeFlow

type DeviceCodeFlow struct {
	Identifier        string
	SessionIdentifier sql.NullString
	Code              string
	Poll              string
	LastPoll          time.Time
	CreatedAt         time.Time
}

type GetIdentityByProviderAndProviderIdentifierParams

type GetIdentityByProviderAndProviderIdentifierParams struct {
	Provider           IdentitiesProvider
	ProviderIdentifier string
}

type GetMembershipByUserIdentifierAndOrganizationIdentifierParams

type GetMembershipByUserIdentifierAndOrganizationIdentifierParams struct {
	UserIdentifier         string
	OrganizationIdentifier string
}

type GetOrganizationsForUserIdentifierRow

type GetOrganizationsForUserIdentifierRow struct {
	Identifier          string
	Name                string
	IsDefault           bool
	CreatedAt           time.Time
	MembershipRole      string
	MembershipCreatedAt time.Time
}

type GetSessionByIdentifierAndUserIdentifierParams

type GetSessionByIdentifierAndUserIdentifierParams struct {
	Identifier     string
	UserIdentifier string
}

type GithubOauthFlow

type GithubOauthFlow struct {
	Identifier       string
	Verifier         string
	Challenge        string
	DeviceIdentifier sql.NullString
	UserIdentifier   sql.NullString
	NextUrl          string
	CreatedAt        time.Time
}

type GoogleOauthFlow

type GoogleOauthFlow struct {
	Identifier       string
	Verifier         string
	Challenge        string
	DeviceIdentifier sql.NullString
	UserIdentifier   sql.NullString
	NextUrl          string
	CreatedAt        time.Time
}

type IdentitiesProvider

type IdentitiesProvider string
const (
	IdentitiesProviderGITHUB IdentitiesProvider = "GITHUB"
	IdentitiesProviderGOOGLE IdentitiesProvider = "GOOGLE"
	IdentitiesProviderMAGIC  IdentitiesProvider = "MAGIC"
)

func (*IdentitiesProvider) Scan

func (e *IdentitiesProvider) Scan(src interface{}) error

type Identity

type Identity struct {
	Provider           IdentitiesProvider
	ProviderIdentifier string
	UserIdentifier     string
	VerifiedEmails     json.RawMessage
	CreatedAt          time.Time
}

type Invitation

type Invitation struct {
	Identifier             uint32
	OrganizationIdentifier string
	InviterUserIdentifier  string
	Role                   string
	Hash                   []byte
	Status                 InvitationsStatus
	ExpiresAt              time.Time
	CreatedAt              time.Time
}

type InvitationsStatus

type InvitationsStatus string
const (
	InvitationsStatusPending  InvitationsStatus = "pending"
	InvitationsStatusAccepted InvitationsStatus = "accepted"
)

func (*InvitationsStatus) Scan

func (e *InvitationsStatus) Scan(src interface{}) error

type MachineKey

type MachineKey struct {
	Identifier             string
	Salt                   string
	Hash                   []byte
	OrganizationIdentifier string
	Kind                   string
	CreatedAt              time.Time
}

type MagicLinkFlow

type MagicLinkFlow struct {
	Identifier       string
	Salt             string
	Hash             []byte
	EmailAddress     string
	DeviceIdentifier sql.NullString
	UserIdentifier   sql.NullString
	NextUrl          string
	CreatedAt        time.Time
}

type Membership

type Membership struct {
	UserIdentifier         string
	OrganizationIdentifier string
	Role                   string
	CreatedAt              time.Time
}

type NullIdentitiesProvider

type NullIdentitiesProvider struct {
	IdentitiesProvider IdentitiesProvider
	Valid              bool // Valid is true if IdentitiesProvider is not NULL
}

func (*NullIdentitiesProvider) Scan

func (ns *NullIdentitiesProvider) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullIdentitiesProvider) Value

func (ns NullIdentitiesProvider) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullInvitationsStatus

type NullInvitationsStatus struct {
	InvitationsStatus InvitationsStatus
	Valid             bool // Valid is true if InvitationsStatus is not NULL
}

func (*NullInvitationsStatus) Scan

func (ns *NullInvitationsStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullInvitationsStatus) Value

func (ns NullInvitationsStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Organization

type Organization struct {
	Identifier string
	Name       string
	IsDefault  bool
	CreatedAt  time.Time
}

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 string) (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 string) (int64, error)

func (*Queries) DeleteDeviceCodeFlowsBeforeCreatedAt

func (q *Queries) DeleteDeviceCodeFlowsBeforeCreatedAt(ctx context.Context, createdAt time.Time) (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 string) (int64, error)

func (*Queries) DeleteGithubOAuthFlowsBeforeCreatedAt

func (q *Queries) DeleteGithubOAuthFlowsBeforeCreatedAt(ctx context.Context, createdAt time.Time) (int64, error)

func (*Queries) DeleteGoogleOAuthFlowByIdentifier

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

func (*Queries) DeleteGoogleOAuthFlowsBeforeCreatedAt

func (q *Queries) DeleteGoogleOAuthFlowsBeforeCreatedAt(ctx context.Context, createdAt time.Time) (int64, error)

func (*Queries) DeleteMagicLinkFlowByIdentifier

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

func (*Queries) DeleteMagicLinkFlowsBeforeCreatedAt

func (q *Queries) DeleteMagicLinkFlowsBeforeCreatedAt(ctx context.Context, createdAt time.Time) (int64, error)

func (*Queries) DeleteSessionByIdentifier

func (q *Queries) DeleteSessionByIdentifier(ctx context.Context, identifier string) (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 string) ([]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 string) (DeviceCodeFlow, error)

func (*Queries) GetDeviceCodeFlowByPoll

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

func (*Queries) GetGithubOAuthFlowByIdentifier

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

func (*Queries) GetGoogleOAuthFlowByIdentifier

func (q *Queries) GetGoogleOAuthFlowByIdentifier(ctx context.Context, identifier string) (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 string) (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 string) ([]Membership, error)

func (*Queries) GetMembershipsByUserIdentifier

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

func (*Queries) GetOrganizationByIdentifier

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

func (*Queries) GetOrganizationsForUserIdentifier

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

func (*Queries) GetSessionByIdentifier

func (q *Queries) GetSessionByIdentifier(ctx context.Context, identifier string) (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 string) (SessionRevocation, error)

func (*Queries) GetUserByIdentifier

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

func (*Queries) IncrementAllSessionGenerationByUserIdentifier

func (q *Queries) IncrementAllSessionGenerationByUserIdentifier(ctx context.Context, userIdentifier string) (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 string) (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 string) (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 *sql.Tx) *Queries

type ServiceKey

type ServiceKey struct {
	Identifier             string
	Salt                   string
	Hash                   []byte
	OrganizationIdentifier string
	UserIdentifier         string
	Role                   string
	ResourceIds            json.RawMessage
	ExpiresAt              time.Time
	CreatedAt              time.Time
}

type Session

type Session struct {
	Identifier             string
	OrganizationIdentifier string
	UserIdentifier         string
	Generation             uint32
	ExpiresAt              time.Time
	CreatedAt              time.Time
}

type SessionInvalidation

type SessionInvalidation struct {
	SessionIdentifier string
	Generation        uint32
	ExpiresAt         time.Time
	CreatedAt         time.Time
}

type SessionRevocation

type SessionRevocation struct {
	SessionIdentifier string
	ExpiresAt         time.Time
	CreatedAt         time.Time
}

type SetConfigurationParams

type SetConfigurationParams struct {
	ConfigurationKey   string
	ConfigurationValue string
}

type UpdateDeviceCodeFlowSessionIdentifierByIdentifierParams

type UpdateDeviceCodeFlowSessionIdentifierByIdentifierParams struct {
	SessionIdentifier sql.NullString
	Identifier        string
}

type UpdateMembershipRoleByUserIdentifierAndOrganizationIdentifierParams

type UpdateMembershipRoleByUserIdentifierAndOrganizationIdentifierParams struct {
	Role                   string
	UserIdentifier         string
	OrganizationIdentifier string
}

type UpdateSessionExpiryByIdentifierParams

type UpdateSessionExpiryByIdentifierParams struct {
	ExpiresAt  time.Time
	Identifier string
}

type UpdateSessionGenerationByIdentifierParams

type UpdateSessionGenerationByIdentifierParams struct {
	Generation uint32
	Identifier string
}

type UpdateUserNameByIdentifierParams

type UpdateUserNameByIdentifierParams struct {
	Name       string
	Identifier string
}

type UpdateUserPrimaryEmailByIdentifierParams

type UpdateUserPrimaryEmailByIdentifierParams struct {
	PrimaryEmail string
	Identifier   string
}

type User

type User struct {
	Identifier                    string
	Name                          string
	PrimaryEmail                  string
	DefaultOrganizationIdentifier string
	LastLogin                     time.Time
	CreatedAt                     time.Time
}

Jump to

Keyboard shortcuts

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