queries

package
v0.0.0-...-4673371 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: EUPL-1.2 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOrganizationUserParams

type AddOrganizationUserParams struct {
	OrganizationID int64 `json:"organization_id"`
	UserID         int64 `json:"user_id"`
	Role           int32 `json:"role"`
}

type AddUserToOrganizationParams

type AddUserToOrganizationParams struct {
	OrganizationID int64 `json:"organization_id"`
	UserID         int64 `json:"user_id"`
	Role           int32 `json:"role"`
}

type BindScanToWorkerParams

type BindScanToWorkerParams struct {
	ID       int64         `json:"id"`
	WorkerID sql.NullInt64 `json:"worker_id"`
}

type BruteforcedPassword

type BruteforcedPassword struct {
	ID               int64          `json:"id"`
	Hash             string         `json:"hash"`
	Username         string         `json:"username"`
	Password         sql.NullString `json:"password"`
	LastBruteforceID sql.NullInt64  `json:"last_bruteforce_id"`
	ProjectID        sql.NullInt64  `json:"project_id"`
}

type CreateBruteforcedPasswordParams

type CreateBruteforcedPasswordParams struct {
	Hash             string         `json:"hash"`
	Username         string         `json:"username"`
	Password         sql.NullString `json:"password"`
	LastBruteforceID sql.NullInt64  `json:"last_bruteforce_id"`
	ProjectID        sql.NullInt64  `json:"project_id"`
}

type CreateDockerImageParams

type CreateDockerImageParams struct {
	ProjectID   int64  `json:"project_id"`
	DockerImage string `json:"docker_image"`
	SaltKey     string `json:"salt_key"`
	Username    string `json:"username"`
	Password    string `json:"password"`
}

type CreateDockerLayerResultsForProjectParams

type CreateDockerLayerResultsForProjectParams struct {
	LayerID       int64          `json:"layer_id"`
	Name          string         `json:"name"`
	Line          string         `json:"line"`
	LineNumber    int32          `json:"line_number"`
	Match         string         `json:"match"`
	Probability   float64        `json:"probability"`
	Username      sql.NullString `json:"username"`
	Password      sql.NullString `json:"password"`
	Filename      string         `json:"filename"`
	PreviousLines string         `json:"previous_lines"`
}

type CreateDockerScanParams

type CreateDockerScanParams struct {
	ImageID int64 `json:"image_id"`
	ScanID  int64 `json:"scan_id"`
}

type CreateDockerScannedLayerForProjectParams

type CreateDockerScannedLayerForProjectParams struct {
	LayerHash string `json:"layer_hash"`
	ImageID   int64  `json:"image_id"`
}

type CreateGitCommitForProjectParams

type CreateGitCommitForProjectParams struct {
	RepositoryID int64              `json:"repository_id"`
	CommitHash   string             `json:"commit_hash"`
	Author       sql.NullString     `json:"author"`
	AuthorEmail  sql.NullString     `json:"author_email"`
	Description  sql.NullString     `json:"description"`
	CommitDate   pgtype.Timestamptz `json:"commit_date"`
}

type CreateGitRepositoryParams

type CreateGitRepositoryParams struct {
	ProjectID     int64  `json:"project_id"`
	GitRepository string `json:"git_repository"`
	SaltKey       string `json:"salt_key"`
	Username      string `json:"username"`
	Password      string `json:"password"`
	PrivateKey    string `json:"private_key"`
}

type CreateGitResultForCommitParams

type CreateGitResultForCommitParams struct {
	Commit      int64          `json:"commit"`
	Name        string         `json:"name"`
	Line        string         `json:"line"`
	LineNumber  int32          `json:"line_number"`
	Match       string         `json:"match"`
	Probability float64        `json:"probability"`
	Username    sql.NullString `json:"username"`
	Password    sql.NullString `json:"password"`
	Filename    string         `json:"filename"`
}

type CreateGitScanParams

type CreateGitScanParams struct {
	RepositoryID int64 `json:"repository_id"`
	ScanID       int64 `json:"scan_id"`
}

type CreateMongoDatabaseParams

type CreateMongoDatabaseParams struct {
	ProjectID    int64          `json:"project_id"`
	DatabaseName string         `json:"database_name"`
	Host         string         `json:"host"`
	Port         int32          `json:"port"`
	Version      sql.NullString `json:"version"`
	SaltKey      string         `json:"salt_key"`
	Username     string         `json:"username"`
	Password     string         `json:"password"`
}

type CreateMongoScanParams

type CreateMongoScanParams struct {
	ScanID     int64 `json:"scan_id"`
	DatabaseID int64 `json:"database_id"`
}

type CreateMysqlDatabaseParams

type CreateMysqlDatabaseParams struct {
	ProjectID    int64          `json:"project_id"`
	DatabaseName string         `json:"database_name"`
	Host         string         `json:"host"`
	Port         int32          `json:"port"`
	Version      sql.NullString `json:"version"`
	SaltKey      string         `json:"salt_key"`
	Username     string         `json:"username"`
	Password     string         `json:"password"`
}

type CreateMysqlScanParams

type CreateMysqlScanParams struct {
	ScanID     int64 `json:"scan_id"`
	DatabaseID int64 `json:"database_id"`
}

type CreateNvdCPEParams

type CreateNvdCPEParams struct {
	Cpe          string             `json:"cpe"`
	DatabaseType int32              `json:"database_type"`
	Version      string             `json:"version"`
	LastModified pgtype.Timestamptz `json:"last_modified"`
}

type CreateNvdCveCPEParams

type CreateNvdCveCPEParams struct {
	CveID int64 `json:"cve_id"`
	CpeID int64 `json:"cpe_id"`
}

type CreateNvdCveParams

type CreateNvdCveParams struct {
	CveID        string             `json:"cve_id"`
	Description  string             `json:"description"`
	Published    pgtype.Timestamptz `json:"published"`
	LastModified pgtype.Timestamptz `json:"last_modified"`
	Score        float64            `json:"score"`
}

type CreatePostgresDatabaseParams

type CreatePostgresDatabaseParams struct {
	ProjectID    int64          `json:"project_id"`
	DatabaseName string         `json:"database_name"`
	Host         string         `json:"host"`
	Port         int32          `json:"port"`
	Version      sql.NullString `json:"version"`
	SaltKey      string         `json:"salt_key"`
	Username     string         `json:"username"`
	Password     string         `json:"password"`
}

type CreatePostgresScanParams

type CreatePostgresScanParams struct {
	ScanID     int64 `json:"scan_id"`
	DatabaseID int64 `json:"database_id"`
}

type CreateProjectParams

type CreateProjectParams struct {
	OrganizationID int64  `json:"organization_id"`
	Name           string `json:"name"`
	Remote         bool   `json:"remote"`
}

type CreateRedisDatabaseParams

type CreateRedisDatabaseParams struct {
	ProjectID int64          `json:"project_id"`
	Host      string         `json:"host"`
	Port      int32          `json:"port"`
	Version   sql.NullString `json:"version"`
	SaltKey   string         `json:"salt_key"`
	Username  string         `json:"username"`
	Password  string         `json:"password"`
}

type CreateRedisScanParams

type CreateRedisScanParams struct {
	ScanID     int64 `json:"scan_id"`
	DatabaseID int64 `json:"database_id"`
}

type CreateRememberMeTokenParams

type CreateRememberMeTokenParams struct {
	UserID int64  `json:"user_id"`
	Token  string `json:"token"`
}

type CreateResetPasswordTokenParams

type CreateResetPasswordTokenParams struct {
	ID     uuid.UUID `json:"id"`
	UserID int64     `json:"user_id"`
}

type CreateScanBruteforceResultParams

type CreateScanBruteforceResultParams struct {
	ScanID   int64          `json:"scan_id"`
	ScanType int32          `json:"scan_type"`
	Username string         `json:"username"`
	Password sql.NullString `json:"password"`
	Tried    int32          `json:"tried"`
	Total    int32          `json:"total"`
}

type CreateScanGroupParams

type CreateScanGroupParams struct {
	ProjectID int64         `json:"project_id"`
	CreatedBy sql.NullInt64 `json:"created_by"`
}

type CreateScanParams

type CreateScanParams struct {
	Status      int32         `json:"status"`
	WorkerID    sql.NullInt64 `json:"worker_id"`
	ScanGroupID int64         `json:"scan_group_id"`
	ScanType    int32         `json:"scan_type"`
}

type CreateScanResultParams

type CreateScanResultParams struct {
	ScanID     int64  `json:"scan_id"`
	Severity   int32  `json:"severity"`
	Message    string `json:"message"`
	ScanSource int32  `json:"scan_source"`
}

type CreateTOTPSecretForUserParams

type CreateTOTPSecretForUserParams struct {
	UserID     int64  `json:"user_id"`
	TotpSecret string `json:"totp_secret"`
	Valid      bool   `json:"valid"`
}

type CreateUserParams

type CreateUserParams struct {
	Username          string             `json:"username"`
	Password          string             `json:"password"`
	Email             string             `json:"email"`
	RecoveryCodes     sql.NullString     `json:"recovery_codes"`
	TotpSecret        sql.NullString     `json:"totp_secret"`
	RecoverSelector   sql.NullString     `json:"recover_selector"`
	RecoverVerifier   sql.NullString     `json:"recover_verifier"`
	RecoverExpiry     pgtype.Timestamptz `json:"recover_expiry"`
	LoginAttemptCount int32              `json:"login_attempt_count"`
	LoginLastAttempt  pgtype.Timestamptz `json:"login_last_attempt"`
	Locked            pgtype.Timestamptz `json:"locked"`
	ConfirmSelector   sql.NullString     `json:"confirm_selector"`
	ConfirmVerifier   sql.NullString     `json:"confirm_verifier"`
	Confirmed         bool               `json:"confirmed"`
}

type CreateWebauthnCredentialParams

type CreateWebauthnCredentialParams struct {
	UserID          int64    `json:"user_id"`
	CredentialID    []byte   `json:"credential_id"`
	Name            string   `json:"name"`
	PublicKey       []byte   `json:"public_key"`
	AttestationType string   `json:"attestation_type"`
	Transport       []string `json:"transport"`
	UserPresent     bool     `json:"user_present"`
	UserVerified    bool     `json:"user_verified"`
	BackupEligible  bool     `json:"backup_eligible"`
	BackupState     bool     `json:"backup_state"`
	AaGuid          []byte   `json:"aa_guid"`
	SignCount       int32    `json:"sign_count"`
	CloneWarning    bool     `json:"clone_warning"`
	Attachment      string   `json:"attachment"`
}

type CreateWorkerParams

type CreateWorkerParams struct {
	Organization int64  `json:"organization"`
	Name         string `json:"name"`
	Token        string `json:"token"`
}

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
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type DefaultBruteforcePassword

type DefaultBruteforcePassword struct {
	ID       int64  `json:"id"`
	Password string `json:"password"`
}

type DeleteRememberMeTokenByUserAndTokenParams

type DeleteRememberMeTokenByUserAndTokenParams struct {
	UserID int64  `json:"user_id"`
	Token  string `json:"token"`
}

type DockerImage

type DockerImage struct {
	ID                            int64              `json:"id"`
	ProjectID                     int64              `json:"project_id"`
	DockerImage                   string             `json:"docker_image"`
	Username                      string             `json:"username"`
	Password                      string             `json:"password"`
	MinProbability                sql.NullFloat64    `json:"min_probability"`
	ProbabilityDecreaseMultiplier sql.NullFloat64    `json:"probability_decrease_multiplier"`
	ProbabilityIncreaseMultiplier sql.NullFloat64    `json:"probability_increase_multiplier"`
	EntropyThreshold              sql.NullFloat64    `json:"entropy_threshold"`
	LogisticGrowthRate            sql.NullFloat64    `json:"logistic_growth_rate"`
	CreatedAt                     pgtype.Timestamptz `json:"created_at"`
}

type DockerLayer

type DockerLayer struct {
	ID        int64              `json:"id"`
	ImageID   int64              `json:"image_id"`
	LayerHash string             `json:"layer_hash"`
	ScannedAt pgtype.Timestamptz `json:"scanned_at"`
}

type DockerResult

type DockerResult struct {
	ID            int64              `json:"id"`
	LayerID       int64              `json:"layer_id"`
	Name          string             `json:"name"`
	Line          string             `json:"line"`
	LineNumber    int32              `json:"line_number"`
	PreviousLines string             `json:"previous_lines"`
	Match         string             `json:"match"`
	Probability   float64            `json:"probability"`
	Username      sql.NullString     `json:"username"`
	Password      sql.NullString     `json:"password"`
	Filename      string             `json:"filename"`
	CreatedAt     pgtype.Timestamptz `json:"created_at"`
}

type DockerScan

type DockerScan struct {
	ID      int64 `json:"id"`
	ScanID  int64 `json:"scan_id"`
	ImageID int64 `json:"image_id"`
}

type GetAllOrganizationMembersForOrganizationsThatContainUserRow

type GetAllOrganizationMembersForOrganizationsThatContainUserRow struct {
	User               User               `json:"user"`
	OrganizationMember OrganizationMember `json:"organization_member"`
}

type GetAllOrganizationProjectsForUserRow

type GetAllOrganizationProjectsForUserRow struct {
	ID             int64              `json:"id"`
	Name           string             `json:"name"`
	OrganizationID int64              `json:"organization_id"`
	Remote         bool               `json:"remote"`
	CreatedAt      pgtype.Timestamptz `json:"created_at"`
	Scans          int64              `json:"scans"`
}

type GetBruteforcePasswordsPaginatedParams

type GetBruteforcePasswordsPaginatedParams struct {
	LastID    int64 `json:"last_id"`
	Limit     int32 `json:"limit"`
	ProjectID int64 `json:"project_id"`
}

type GetBruteforcedPasswordsParams

type GetBruteforcedPasswordsParams struct {
	Hash      string        `json:"hash"`
	Username  string        `json:"username"`
	ProjectID sql.NullInt64 `json:"project_id"`
}

type GetCPEByProductAndVersionParams

type GetCPEByProductAndVersionParams struct {
	DatabaseType int32  `json:"database_type"`
	Version      string `json:"version"`
}

type GetCveCpeByCveAndCpeParams

type GetCveCpeByCveAndCpeParams struct {
	CveID int64 `json:"cve_id"`
	CpeID int64 `json:"cpe_id"`
}

type GetCvesByProductAndVersionParams

type GetCvesByProductAndVersionParams struct {
	DatabaseType int32  `json:"database_type"`
	Version      string `json:"version"`
}

type GetCvesByProductAndVersionRow

type GetCvesByProductAndVersionRow struct {
	NvdCfe NvdCfe `json:"nvd_cfe"`
}

type GetDockerImageParams

type GetDockerImageParams struct {
	ID      int64  `json:"id"`
	SaltKey string `json:"salt_key"`
}

type GetDockerImageRow

type GetDockerImageRow struct {
	ID          int64  `json:"id"`
	ProjectID   int64  `json:"project_id"`
	DockerImage string `json:"docker_image"`
	Username    string `json:"username"`
	Password    string `json:"password"`
}

type GetDockerImagesForProjectParams

type GetDockerImagesForProjectParams struct {
	ProjectID int64  `json:"project_id"`
	SaltKey   string `json:"salt_key"`
}

type GetDockerImagesForProjectRow

type GetDockerImagesForProjectRow struct {
	ID          int64  `json:"id"`
	ProjectID   int64  `json:"project_id"`
	DockerImage string `json:"docker_image"`
	Username    string `json:"username"`
	Password    string `json:"password"`
}

type GetDockerLayersAndResultsForImageRow

type GetDockerLayersAndResultsForImageRow struct {
	Lid           int64              `json:"lid"`
	ImageID       int64              `json:"image_id"`
	LayerHash     string             `json:"layer_hash"`
	ScannedAt     pgtype.Timestamptz `json:"scanned_at"`
	ID            pgtype.Int8        `json:"id"`
	LayerID       sql.NullInt64      `json:"layer_id"`
	Name          sql.NullString     `json:"name"`
	Line          sql.NullString     `json:"line"`
	LineNumber    sql.NullInt32      `json:"line_number"`
	PreviousLines sql.NullString     `json:"previous_lines"`
	Match         sql.NullString     `json:"match"`
	Probability   sql.NullFloat64    `json:"probability"`
	Username      sql.NullString     `json:"username"`
	Password      sql.NullString     `json:"password"`
	Filename      sql.NullString     `json:"filename"`
	CreatedAt     pgtype.Timestamptz `json:"created_at"`
}

type GetDockerScanByScanAndRepoParams

type GetDockerScanByScanAndRepoParams struct {
	ScanGroupID int64 `json:"scan_group_id"`
	ImageID     int64 `json:"image_id"`
}

type GetDockerScanByScanAndRepoRow

type GetDockerScanByScanAndRepoRow struct {
	DockerScan DockerScan `json:"docker_scan"`
	Scan       Scan       `json:"scan"`
}

type GetGitCommitsWithResultsRow

type GetGitCommitsWithResultsRow struct {
	CommitID        int64              `json:"commit_id"`
	RepositoryID    int64              `json:"repository_id"`
	CommitHash      string             `json:"commit_hash"`
	Author          sql.NullString     `json:"author"`
	AuthorEmail     sql.NullString     `json:"author_email"`
	CommitDate      pgtype.Timestamptz `json:"commit_date"`
	Description     sql.NullString     `json:"description"`
	CommitCreatedAt pgtype.Timestamptz `json:"commit_created_at"`
	ID              pgtype.Int8        `json:"id"`
	Commit          sql.NullInt64      `json:"commit"`
	Name            sql.NullString     `json:"name"`
	Line            sql.NullString     `json:"line"`
	LineNumber      sql.NullInt32      `json:"line_number"`
	Match           sql.NullString     `json:"match"`
	Probability     sql.NullFloat64    `json:"probability"`
	Username        sql.NullString     `json:"username"`
	Password        sql.NullString     `json:"password"`
	Filename        sql.NullString     `json:"filename"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
}

type GetGitRepositoriesForProjectParams

type GetGitRepositoriesForProjectParams struct {
	ProjectID int64  `json:"project_id"`
	SaltKey   string `json:"salt_key"`
}

type GetGitRepositoriesForProjectRow

type GetGitRepositoriesForProjectRow struct {
	ID            int64  `json:"id"`
	ProjectID     int64  `json:"project_id"`
	GitRepository string `json:"git_repository"`
	Username      string `json:"username"`
	Password      string `json:"password"`
	PrivateKey    string `json:"private_key"`
}

type GetGitRepositoryParams

type GetGitRepositoryParams struct {
	ID      int64  `json:"id"`
	SaltKey string `json:"salt_key"`
}

type GetGitRepositoryRow

type GetGitRepositoryRow struct {
	ID            int64  `json:"id"`
	ProjectID     int64  `json:"project_id"`
	GitRepository string `json:"git_repository"`
	Username      string `json:"username"`
	Password      string `json:"password"`
	PrivateKey    string `json:"private_key"`
}

type GetGitScanByScanAndRepoParams

type GetGitScanByScanAndRepoParams struct {
	ScanGroupID  int64 `json:"scan_group_id"`
	RepositoryID int64 `json:"repository_id"`
}

type GetGitScanByScanAndRepoRow

type GetGitScanByScanAndRepoRow struct {
	GitScan GitScan `json:"git_scan"`
	Scan    Scan    `json:"scan"`
}

type GetGitScannedCommitsForProjectBatchParams

type GetGitScannedCommitsForProjectBatchParams struct {
	ProjectID    int64    `json:"project_id"`
	CommitHashes []string `json:"commit_hashes"`
}

type GetMongoDatabaseParams

type GetMongoDatabaseParams struct {
	ID      int64  `json:"id"`
	SaltKey string `json:"salt_key"`
}

type GetMongoDatabaseRow

type GetMongoDatabaseRow struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
	ScanCount    int64              `json:"scan_count"`
}

type GetMongoDatabasesForProjectParams

type GetMongoDatabasesForProjectParams struct {
	ProjectID int64  `json:"project_id"`
	SaltKey   string `json:"salt_key"`
}

type GetMongoDatabasesForProjectRow

type GetMongoDatabasesForProjectRow struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type GetMysqlDatabaseParams

type GetMysqlDatabaseParams struct {
	ID      int64  `json:"id"`
	SaltKey string `json:"salt_key"`
}

type GetMysqlDatabaseRow

type GetMysqlDatabaseRow struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
	ScanCount    int64              `json:"scan_count"`
}

type GetMysqlDatabasesForProjectParams

type GetMysqlDatabasesForProjectParams struct {
	ProjectID int64  `json:"project_id"`
	SaltKey   string `json:"salt_key"`
}

type GetMysqlDatabasesForProjectRow

type GetMysqlDatabasesForProjectRow struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type GetOrganizationMembersRow

type GetOrganizationMembersRow struct {
	OrganizationMember OrganizationMember `json:"organization_member"`
	User               User               `json:"user"`
}

type GetOrganizationPermissionForUserParams

type GetOrganizationPermissionForUserParams struct {
	OrganizationID int64 `json:"organization_id"`
	UserID         int64 `json:"user_id"`
}

type GetOrganizationProjectsRow

type GetOrganizationProjectsRow struct {
	ID             int64              `json:"id"`
	Name           string             `json:"name"`
	OrganizationID int64              `json:"organization_id"`
	Remote         bool               `json:"remote"`
	CreatedAt      pgtype.Timestamptz `json:"created_at"`
	Scans          int64              `json:"scans"`
}

type GetOrganizationUserParams

type GetOrganizationUserParams struct {
	OrganizationID int64 `json:"organization_id"`
	UserID         int64 `json:"user_id"`
}

type GetOrganizationsByUserRow

type GetOrganizationsByUserRow struct {
	Organization    Organization `json:"organization"`
	Users           int64        `json:"users"`
	Projects        int64        `json:"projects"`
	Scans           int64        `json:"scans"`
	MaximumSeverity int32        `json:"maximum_severity"`
}

type GetPostgresDatabaseParams

type GetPostgresDatabaseParams struct {
	ID      int64  `json:"id"`
	SaltKey string `json:"salt_key"`
}

type GetPostgresDatabaseRow

type GetPostgresDatabaseRow struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
	ScanCount    int64              `json:"scan_count"`
}

type GetPostgresDatabasesForProjectParams

type GetPostgresDatabasesForProjectParams struct {
	ProjectID int64  `json:"project_id"`
	SaltKey   string `json:"salt_key"`
}

type GetPostgresDatabasesForProjectRow

type GetPostgresDatabasesForProjectRow struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type GetProjectByOrganizationAndNameParams

type GetProjectByOrganizationAndNameParams struct {
	OrganizationID int64  `json:"organization_id"`
	Name           string `json:"name"`
}

type GetProjectInfoForMongoScanByScanIDParams

type GetProjectInfoForMongoScanByScanIDParams struct {
	ScanID  int64  `json:"scan_id"`
	SaltKey string `json:"salt_key"`
}

type GetProjectInfoForMongoScanByScanIDRow

type GetProjectInfoForMongoScanByScanIDRow struct {
	Project              Project            `json:"project"`
	DatabaseID           int64              `json:"database_id"`
	DatabaseProjectID    int64              `json:"database_project_id"`
	DatabaseHost         string             `json:"database_host"`
	DatabasePort         int32              `json:"database_port"`
	DatabaseDatabaseName string             `json:"database_database_name"`
	DatabaseUsername     string             `json:"database_username"`
	DatabasePassword     string             `json:"database_password"`
	DatabaseVersion      sql.NullString     `json:"database_version"`
	DatabaseCreatedAt    pgtype.Timestamptz `json:"database_created_at"`
	MongoScan            MongoScan          `json:"mongo_scan"`
}

type GetProjectInfoForMysqlScanByScanIDParams

type GetProjectInfoForMysqlScanByScanIDParams struct {
	ScanID  int64  `json:"scan_id"`
	SaltKey string `json:"salt_key"`
}

type GetProjectInfoForMysqlScanByScanIDRow

type GetProjectInfoForMysqlScanByScanIDRow struct {
	Project              Project            `json:"project"`
	DatabaseID           int64              `json:"database_id"`
	DatabaseProjectID    int64              `json:"database_project_id"`
	DatabaseHost         string             `json:"database_host"`
	DatabasePort         int32              `json:"database_port"`
	DatabaseDatabaseName string             `json:"database_database_name"`
	DatabaseUsername     string             `json:"database_username"`
	DatabasePassword     string             `json:"database_password"`
	DatabaseVersion      sql.NullString     `json:"database_version"`
	DatabaseCreatedAt    pgtype.Timestamptz `json:"database_created_at"`
	MysqlScan            MysqlScan          `json:"mysql_scan"`
}

type GetProjectInfoForPostgresScanByScanIDParams

type GetProjectInfoForPostgresScanByScanIDParams struct {
	ScanID  int64  `json:"scan_id"`
	SaltKey string `json:"salt_key"`
}

type GetProjectInfoForPostgresScanByScanIDRow

type GetProjectInfoForPostgresScanByScanIDRow struct {
	Project              Project            `json:"project"`
	DatabaseID           int64              `json:"database_id"`
	DatabaseProjectID    int64              `json:"database_project_id"`
	DatabaseHost         string             `json:"database_host"`
	DatabasePort         int32              `json:"database_port"`
	DatabaseDatabaseName string             `json:"database_database_name"`
	DatabaseUsername     string             `json:"database_username"`
	DatabasePassword     string             `json:"database_password"`
	DatabaseVersion      sql.NullString     `json:"database_version"`
	DatabaseCreatedAt    pgtype.Timestamptz `json:"database_created_at"`
	PostgresScan         PostgresScan       `json:"postgres_scan"`
}

type GetProjectInfoForRedisScanByScanIDParams

type GetProjectInfoForRedisScanByScanIDParams struct {
	ScanID  int64  `json:"scan_id"`
	SaltKey string `json:"salt_key"`
}

type GetProjectInfoForRedisScanByScanIDRow

type GetProjectInfoForRedisScanByScanIDRow struct {
	Project           Project            `json:"project"`
	DatabaseID        int64              `json:"database_id"`
	DatabaseProjectID int64              `json:"database_project_id"`
	DatabaseHost      string             `json:"database_host"`
	DatabasePort      int32              `json:"database_port"`
	DatabaseUsername  string             `json:"database_username"`
	DatabasePassword  string             `json:"database_password"`
	DatabaseVersion   sql.NullString     `json:"database_version"`
	DatabaseCreatedAt pgtype.Timestamptz `json:"database_created_at"`
	RedisScan         RedisScan          `json:"redis_scan"`
}

type GetProjectWithStatsRow

type GetProjectWithStatsRow struct {
	ID             int64              `json:"id"`
	Name           string             `json:"name"`
	OrganizationID int64              `json:"organization_id"`
	Remote         bool               `json:"remote"`
	CreatedAt      pgtype.Timestamptz `json:"created_at"`
	Scans          int64              `json:"scans"`
}

type GetRedisDatabaseParams

type GetRedisDatabaseParams struct {
	ID      int64  `json:"id"`
	SaltKey string `json:"salt_key"`
}

type GetRedisDatabaseRow

type GetRedisDatabaseRow struct {
	ID        int64              `json:"id"`
	ProjectID int64              `json:"project_id"`
	Host      string             `json:"host"`
	Port      int32              `json:"port"`
	Username  string             `json:"username"`
	Password  string             `json:"password"`
	Version   sql.NullString     `json:"version"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	ScanCount int64              `json:"scan_count"`
}

type GetRedisDatabasesForProjectParams

type GetRedisDatabasesForProjectParams struct {
	ProjectID int64  `json:"project_id"`
	SaltKey   string `json:"salt_key"`
}

type GetRedisDatabasesForProjectRow

type GetRedisDatabasesForProjectRow struct {
	ID        int64              `json:"id"`
	ProjectID int64              `json:"project_id"`
	Host      string             `json:"host"`
	Port      int32              `json:"port"`
	Username  string             `json:"username"`
	Password  string             `json:"password"`
	Version   sql.NullString     `json:"version"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type GetScanGroupsForProjectRow

type GetScanGroupsForProjectRow struct {
	ScanGroup       ScanGroup `json:"scan_group"`
	Scan            Scan      `json:"scan"`
	MaximumSeverity int32     `json:"maximum_severity"`
}

type GetScanResultsByScanIdAndScanSourceParams

type GetScanResultsByScanIdAndScanSourceParams struct {
	ScanID     int64 `json:"scan_id"`
	ScanSource int32 `json:"scan_source"`
}

type GetScanRow

type GetScanRow struct {
	Scan            Scan  `json:"scan"`
	MaximumSeverity int32 `json:"maximum_severity"`
}

type GetScansForProjectRow

type GetScansForProjectRow struct {
	Scan            Scan  `json:"scan"`
	MaximumSeverity int32 `json:"maximum_severity"`
	PostgresScan    int64 `json:"postgres_scan"`
}

type GetScansForScanGroupRow

type GetScansForScanGroupRow struct {
	ID              int64              `json:"id"`
	ScanGroupID     int64              `json:"scan_group_id"`
	ScanType        int32              `json:"scan_type"`
	Status          int32              `json:"status"`
	Error           sql.NullString     `json:"error"`
	WorkerID        sql.NullInt64      `json:"worker_id"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
	EndedAt         pgtype.Timestamptz `json:"ended_at"`
	MaximumSeverity int32              `json:"maximum_severity"`
}

type GetSpecificBruteforcePasswordIDParams

type GetSpecificBruteforcePasswordIDParams struct {
	Password  string `json:"password"`
	ProjectID int64  `json:"project_id"`
}

type GetUserByUsernameOrEmailParams

type GetUserByUsernameOrEmailParams struct {
	Username string `json:"username"`
	Email    string `json:"email"`
}

type GetUserByWebauthnCredentialIDRow

type GetUserByWebauthnCredentialIDRow struct {
	User User `json:"user"`
}

type GetWorkerForProjectParams

type GetWorkerForProjectParams struct {
	Token     string `json:"token"`
	ProjectID int64  `json:"project_id"`
}

type GitCommit

type GitCommit struct {
	ID           int64              `json:"id"`
	RepositoryID int64              `json:"repository_id"`
	CommitHash   string             `json:"commit_hash"`
	Author       sql.NullString     `json:"author"`
	AuthorEmail  sql.NullString     `json:"author_email"`
	CommitDate   pgtype.Timestamptz `json:"commit_date"`
	Description  sql.NullString     `json:"description"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type GitRepository

type GitRepository struct {
	ID            int64              `json:"id"`
	ProjectID     int64              `json:"project_id"`
	GitRepository string             `json:"git_repository"`
	Username      string             `json:"username"`
	Password      string             `json:"password"`
	PrivateKey    string             `json:"private_key"`
	CreatedAt     pgtype.Timestamptz `json:"created_at"`
}

type GitResult

type GitResult struct {
	ID          int64              `json:"id"`
	Commit      int64              `json:"commit"`
	Name        string             `json:"name"`
	Line        string             `json:"line"`
	LineNumber  int32              `json:"line_number"`
	Match       string             `json:"match"`
	Probability float64            `json:"probability"`
	Username    sql.NullString     `json:"username"`
	Password    sql.NullString     `json:"password"`
	Filename    string             `json:"filename"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
}

type GitScan

type GitScan struct {
	ID           int64 `json:"id"`
	ScanID       int64 `json:"scan_id"`
	RepositoryID int64 `json:"repository_id"`
}

type ListUsersPaginatedParams

type ListUsersPaginatedParams struct {
	StartID      int64 `json:"start_id"`
	ItemsPerPage int32 `json:"items_per_page"`
}

type MongoDatabase

type MongoDatabase struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type MongoScan

type MongoScan struct {
	ID         int64 `json:"id"`
	ScanID     int64 `json:"scan_id"`
	DatabaseID int64 `json:"database_id"`
}

type MysqlDatabase

type MysqlDatabase struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type MysqlScan

type MysqlScan struct {
	ID         int64 `json:"id"`
	ScanID     int64 `json:"scan_id"`
	DatabaseID int64 `json:"database_id"`
}

type NvdCfe

type NvdCfe struct {
	ID           int64              `json:"id"`
	CveID        string             `json:"cve_id"`
	Description  string             `json:"description"`
	Published    pgtype.Timestamptz `json:"published"`
	LastModified pgtype.Timestamptz `json:"last_modified"`
	Score        float64            `json:"score"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type NvdCpe

type NvdCpe struct {
	ID           int64              `json:"id"`
	Cpe          string             `json:"cpe"`
	DatabaseType int32              `json:"database_type"`
	Version      string             `json:"version"`
	LastModified pgtype.Timestamptz `json:"last_modified"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type NvdCveCpe

type NvdCveCpe struct {
	ID    int64 `json:"id"`
	CveID int64 `json:"cve_id"`
	CpeID int64 `json:"cpe_id"`
}

type Organization

type Organization struct {
	ID            int64              `json:"id"`
	Name          string             `json:"name"`
	EncryptionKey []byte             `json:"encryption_key"`
	CreatedAt     pgtype.Timestamptz `json:"created_at"`
}

type OrganizationMember

type OrganizationMember struct {
	ID             int64              `json:"id"`
	OrganizationID int64              `json:"organization_id"`
	UserID         int64              `json:"user_id"`
	Role           int32              `json:"role"`
	CreatedAt      pgtype.Timestamptz `json:"created_at"`
}

type PostgresDatabase

type PostgresDatabase struct {
	ID           int64              `json:"id"`
	ProjectID    int64              `json:"project_id"`
	Host         string             `json:"host"`
	Port         int32              `json:"port"`
	DatabaseName string             `json:"database_name"`
	Username     string             `json:"username"`
	Password     string             `json:"password"`
	Version      sql.NullString     `json:"version"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

type PostgresScan

type PostgresScan struct {
	ID         int64 `json:"id"`
	ScanID     int64 `json:"scan_id"`
	DatabaseID int64 `json:"database_id"`
}

type Project

type Project struct {
	ID             int64              `json:"id"`
	Name           string             `json:"name"`
	OrganizationID int64              `json:"organization_id"`
	Remote         bool               `json:"remote"`
	CreatedAt      pgtype.Timestamptz `json:"created_at"`
}

type Querier

type Querier interface {
	AddOrganizationUser(ctx context.Context, arg AddOrganizationUserParams) (*OrganizationMember, error)
	AddUserToOrganization(ctx context.Context, arg AddUserToOrganizationParams) error
	BindScanToWorker(ctx context.Context, arg BindScanToWorkerParams) (*Scan, error)
	CountUsers(ctx context.Context) (int64, error)
	CreateBruteforcedPassword(ctx context.Context, arg CreateBruteforcedPasswordParams) (*BruteforcedPassword, error)
	CreateDockerImage(ctx context.Context, arg CreateDockerImageParams) (*DockerImage, error)
	CreateDockerLayerResultsForProject(ctx context.Context, arg []CreateDockerLayerResultsForProjectParams) (int64, error)
	CreateDockerScan(ctx context.Context, arg CreateDockerScanParams) (*DockerScan, error)
	CreateDockerScannedLayerForProject(ctx context.Context, arg CreateDockerScannedLayerForProjectParams) (*DockerLayer, error)
	CreateGitCommitForProject(ctx context.Context, arg CreateGitCommitForProjectParams) (*GitCommit, error)
	CreateGitRepository(ctx context.Context, arg CreateGitRepositoryParams) (*GitRepository, error)
	CreateGitResultForCommit(ctx context.Context, arg []CreateGitResultForCommitParams) (int64, error)
	CreateGitScan(ctx context.Context, arg CreateGitScanParams) (*GitScan, error)
	CreateMongoDatabase(ctx context.Context, arg CreateMongoDatabaseParams) (*MongoDatabase, error)
	CreateMongoScan(ctx context.Context, arg CreateMongoScanParams) (*MongoScan, error)
	CreateMysqlDatabase(ctx context.Context, arg CreateMysqlDatabaseParams) (*MysqlDatabase, error)
	CreateMysqlScan(ctx context.Context, arg CreateMysqlScanParams) (*MysqlScan, error)
	CreateNvdCPE(ctx context.Context, arg CreateNvdCPEParams) (*NvdCpe, error)
	CreateNvdCve(ctx context.Context, arg CreateNvdCveParams) (*NvdCfe, error)
	CreateNvdCveCPE(ctx context.Context, arg CreateNvdCveCPEParams) (*NvdCveCpe, error)
	CreateOrganization(ctx context.Context, name string) (*Organization, error)
	CreatePostgresDatabase(ctx context.Context, arg CreatePostgresDatabaseParams) (*PostgresDatabase, error)
	CreatePostgresScan(ctx context.Context, arg CreatePostgresScanParams) (*PostgresScan, error)
	CreateProject(ctx context.Context, arg CreateProjectParams) (*Project, error)
	CreateRedisDatabase(ctx context.Context, arg CreateRedisDatabaseParams) (*RedisDatabase, error)
	CreateRedisScan(ctx context.Context, arg CreateRedisScanParams) (*RedisScan, error)
	CreateRememberMeToken(ctx context.Context, arg CreateRememberMeTokenParams) (*RememberMeToken, error)
	CreateResetPasswordToken(ctx context.Context, arg CreateResetPasswordTokenParams) (*ResetPasswordToken, error)
	CreateScan(ctx context.Context, arg CreateScanParams) (*Scan, error)
	CreateScanBruteforceResult(ctx context.Context, arg CreateScanBruteforceResultParams) (*ScanBruteforceResult, error)
	CreateScanGroup(ctx context.Context, arg CreateScanGroupParams) (*ScanGroup, error)
	CreateScanResult(ctx context.Context, arg CreateScanResultParams) (*ScanResult, error)
	CreateTOTPSecretForUser(ctx context.Context, arg CreateTOTPSecretForUserParams) (*TotpSecretToken, error)
	CreateUser(ctx context.Context, arg CreateUserParams) (*User, error)
	CreateWebauthnCredential(ctx context.Context, arg CreateWebauthnCredentialParams) (*WebauthnCredential, error)
	CreateWorker(ctx context.Context, arg CreateWorkerParams) (*Worker, error)
	DeleteDockerImage(ctx context.Context, id int64) error
	DeleteGitRepository(ctx context.Context, id int64) error
	DeleteMongoDatabase(ctx context.Context, id int64) error
	DeleteMysqlDatabase(ctx context.Context, id int64) error
	DeleteNvdCveByName(ctx context.Context, cveID string) error
	DeleteOrganization(ctx context.Context, id int64) error
	DeletePostgresDatabase(ctx context.Context, id int64) error
	DeleteProject(ctx context.Context, id int64) (*Project, error)
	DeleteRedisDatabase(ctx context.Context, id int64) error
	DeleteRememberMeTokenByUserAndToken(ctx context.Context, arg DeleteRememberMeTokenByUserAndTokenParams) error
	DeleteRememberMeTokensForUser(ctx context.Context, userID int64) error
	DeleteUser(ctx context.Context, id int64) error
	DeleteWorker(ctx context.Context, id int64) (*Worker, error)
	GetAllOrganizationMembersForOrganizationsThatContainUser(ctx context.Context, userID int64) ([]*GetAllOrganizationMembersForOrganizationsThatContainUserRow, error)
	GetAllOrganizationProjectsForUser(ctx context.Context, userID int64) ([]*GetAllOrganizationProjectsForUserRow, error)
	GetBruteforcePasswordsForProjectCount(ctx context.Context, projectID int64) (int64, error)
	GetBruteforcePasswordsPaginated(ctx context.Context, arg GetBruteforcePasswordsPaginatedParams) ([]*DefaultBruteforcePassword, error)
	GetBruteforcePasswordsSpecificForProject(ctx context.Context, projectID int64) ([]sql.NullString, error)
	GetBruteforcedPasswords(ctx context.Context, arg GetBruteforcedPasswordsParams) (*BruteforcedPassword, error)
	GetCPEByProductAndVersion(ctx context.Context, arg GetCPEByProductAndVersionParams) (*NvdCpe, error)
	GetCountOfScanGroupsForProject(ctx context.Context, projectID int64) (int64, error)
	GetCveByCveID(ctx context.Context, cveID string) (*NvdCfe, error)
	GetCveCpeByCveAndCpe(ctx context.Context, arg GetCveCpeByCveAndCpeParams) (*NvdCveCpe, error)
	GetCvesByProductAndVersion(ctx context.Context, arg GetCvesByProductAndVersionParams) ([]*GetCvesByProductAndVersionRow, error)
	GetDockerImage(ctx context.Context, arg GetDockerImageParams) (*GetDockerImageRow, error)
	GetDockerImagesForProject(ctx context.Context, arg GetDockerImagesForProjectParams) ([]*GetDockerImagesForProjectRow, error)
	GetDockerLayersAndResultsForImage(ctx context.Context, imageID int64) ([]*GetDockerLayersAndResultsForImageRow, error)
	GetDockerScanByScanAndRepo(ctx context.Context, arg GetDockerScanByScanAndRepoParams) (*GetDockerScanByScanAndRepoRow, error)
	GetDockerScannedLayersForImage(ctx context.Context, imageID int64) ([]string, error)
	GetGitCommitsWithResults(ctx context.Context, repositoryID int64) ([]*GetGitCommitsWithResultsRow, error)
	GetGitRepositoriesForProject(ctx context.Context, arg GetGitRepositoriesForProjectParams) ([]*GetGitRepositoriesForProjectRow, error)
	GetGitRepository(ctx context.Context, arg GetGitRepositoryParams) (*GetGitRepositoryRow, error)
	GetGitScanByScan(ctx context.Context, scanID int64) ([]*GitScan, error)
	GetGitScanByScanAndRepo(ctx context.Context, arg GetGitScanByScanAndRepoParams) (*GetGitScanByScanAndRepoRow, error)
	GetGitScannedCommitsForProject(ctx context.Context, projectID int64) ([]string, error)
	GetGitScannedCommitsForProjectBatch(ctx context.Context, arg GetGitScannedCommitsForProjectBatchParams) ([]string, error)
	GetInvalidTOTPSecretForUser(ctx context.Context, userID int64) (*TotpSecretToken, error)
	GetMongoDatabase(ctx context.Context, arg GetMongoDatabaseParams) (*GetMongoDatabaseRow, error)
	GetMongoDatabasesForProject(ctx context.Context, arg GetMongoDatabasesForProjectParams) ([]*GetMongoDatabasesForProjectRow, error)
	GetMongoScan(ctx context.Context, id int64) (*MongoScan, error)
	GetMongoScanByScanID(ctx context.Context, scanID int64) (*MongoScan, error)
	GetMysqlDatabase(ctx context.Context, arg GetMysqlDatabaseParams) (*GetMysqlDatabaseRow, error)
	GetMysqlDatabasesForProject(ctx context.Context, arg GetMysqlDatabasesForProjectParams) ([]*GetMysqlDatabasesForProjectRow, error)
	GetMysqlScan(ctx context.Context, id int64) (*MysqlScan, error)
	GetMysqlScanByScanID(ctx context.Context, scanID int64) (*MysqlScan, error)
	GetNvdCPEsByDBType(ctx context.Context, databaseType int32) ([]*NvdCpe, error)
	GetNvdCveByCveID(ctx context.Context, cveID string) (*NvdCfe, error)
	GetOrganization(ctx context.Context, id int64) (*Organization, error)
	GetOrganizationByName(ctx context.Context, name string) (*Organization, error)
	GetOrganizationMembers(ctx context.Context, organizationID int64) ([]*GetOrganizationMembersRow, error)
	GetOrganizationPermissionForUser(ctx context.Context, arg GetOrganizationPermissionForUserParams) (int32, error)
	GetOrganizationProjects(ctx context.Context, organizationID int64) ([]*GetOrganizationProjectsRow, error)
	GetOrganizationUser(ctx context.Context, arg GetOrganizationUserParams) (*OrganizationMember, error)
	GetOrganizationsByUser(ctx context.Context, userID int64) ([]*GetOrganizationsByUserRow, error)
	GetOrganizationsForUser(ctx context.Context, userID int64) ([]*Organization, error)
	GetPostgresDatabase(ctx context.Context, arg GetPostgresDatabaseParams) (*GetPostgresDatabaseRow, error)
	GetPostgresDatabasesForProject(ctx context.Context, arg GetPostgresDatabasesForProjectParams) ([]*GetPostgresDatabasesForProjectRow, error)
	GetPostgresScan(ctx context.Context, id int64) (*PostgresScan, error)
	GetPostgresScanByScanID(ctx context.Context, scanID int64) (*PostgresScan, error)
	GetProject(ctx context.Context, id int64) (*Project, error)
	GetProjectByOrganizationAndName(ctx context.Context, arg GetProjectByOrganizationAndNameParams) (*Project, error)
	GetProjectInfoForMongoScanByScanID(ctx context.Context, arg GetProjectInfoForMongoScanByScanIDParams) (*GetProjectInfoForMongoScanByScanIDRow, error)
	GetProjectInfoForMysqlScanByScanID(ctx context.Context, arg GetProjectInfoForMysqlScanByScanIDParams) (*GetProjectInfoForMysqlScanByScanIDRow, error)
	GetProjectInfoForPostgresScanByScanID(ctx context.Context, arg GetProjectInfoForPostgresScanByScanIDParams) (*GetProjectInfoForPostgresScanByScanIDRow, error)
	GetProjectInfoForRedisScanByScanID(ctx context.Context, arg GetProjectInfoForRedisScanByScanIDParams) (*GetProjectInfoForRedisScanByScanIDRow, error)
	GetProjectWithStats(ctx context.Context, id int64) (*GetProjectWithStatsRow, error)
	GetProjects(ctx context.Context) ([]*Project, error)
	GetProjectsByOrganization(ctx context.Context, organizationID int64) ([]*Project, error)
	GetRedisDatabase(ctx context.Context, arg GetRedisDatabaseParams) (*GetRedisDatabaseRow, error)
	GetRedisDatabasesForProject(ctx context.Context, arg GetRedisDatabasesForProjectParams) ([]*GetRedisDatabasesForProjectRow, error)
	GetRedisScan(ctx context.Context, id int64) (*RedisScan, error)
	GetRedisScanByScanID(ctx context.Context, scanID int64) (*RedisScan, error)
	GetResetPasswordToken(ctx context.Context, id uuid.UUID) (*ResetPasswordToken, error)
	GetScan(ctx context.Context, id int64) (*GetScanRow, error)
	GetScanBruteforceResults(ctx context.Context, scanID int64) ([]*ScanBruteforceResult, error)
	GetScanGroup(ctx context.Context, id int64) (*ScanGroup, error)
	GetScanGroupsForProject(ctx context.Context, projectID int64) ([]*GetScanGroupsForProjectRow, error)
	GetScanResults(ctx context.Context, scanID int64) ([]*ScanResult, error)
	GetScanResultsByScanIdAndScanSource(ctx context.Context, arg GetScanResultsByScanIdAndScanSourceParams) ([]*ScanResult, error)
	GetScansForProject(ctx context.Context, projectID int64) ([]*GetScansForProjectRow, error)
	GetScansForScanGroup(ctx context.Context, scanGroupID int64) ([]*GetScansForScanGroupRow, error)
	GetSpecificBruteforcePasswordID(ctx context.Context, arg GetSpecificBruteforcePasswordIDParams) (int64, error)
	GetTOTPSecretForUser(ctx context.Context, userID int64) (*TotpSecretToken, error)
	GetUser(ctx context.Context, id int64) (*User, error)
	GetUserByConfirmSelector(ctx context.Context, confirmSelector sql.NullString) (*User, error)
	GetUserByEmail(ctx context.Context, email string) (*User, error)
	GetUserByRecoverSelector(ctx context.Context, recoverSelector sql.NullString) (*User, error)
	GetUserByUsernameOrEmail(ctx context.Context, arg GetUserByUsernameOrEmailParams) (*User, error)
	GetUserByWebauthnCredentialID(ctx context.Context, credentialID []byte) (*GetUserByWebauthnCredentialIDRow, error)
	GetWebauthnCredentialsByUserID(ctx context.Context, userID int64) ([]*WebauthnCredential, error)
	GetWorker(ctx context.Context, id int64) (*Worker, error)
	GetWorkerByToken(ctx context.Context, token string) (*Worker, error)
	GetWorkerForProject(ctx context.Context, arg GetWorkerForProjectParams) (*Worker, error)
	GetWorkerForScan(ctx context.Context, id int64) (*Worker, error)
	GetWorkersByProject(ctx context.Context, projectID int64) ([]*Worker, error)
	GetWorkersForOrganization(ctx context.Context, organization int64) ([]*Worker, error)
	GetWorkersForProject(ctx context.Context, projectID int64) ([]*Worker, error)
	InsertBruteforcePasswords(ctx context.Context, passwords []string) error
	InvalidateResetPasswordToken(ctx context.Context, id uuid.UUID) error
	InvalidateTOTPSecretForUser(ctx context.Context, userID int64) error
	ListUsers(ctx context.Context) ([]*User, error)
	ListUsersPaginated(ctx context.Context, arg ListUsersPaginatedParams) ([]*User, error)
	RemoveOrganizationUser(ctx context.Context, arg RemoveOrganizationUserParams) (*OrganizationMember, error)
	SetOrganizationPermissionsForUser(ctx context.Context, arg SetOrganizationPermissionsForUserParams) (*OrganizationMember, error)
	UpdateBruteforcedPassword(ctx context.Context, arg UpdateBruteforcedPasswordParams) (*BruteforcedPassword, error)
	UpdateDockerImage(ctx context.Context, arg UpdateDockerImageParams) (*DockerImage, error)
	UpdateGitRepository(ctx context.Context, arg UpdateGitRepositoryParams) (*GitRepository, error)
	UpdateMongoDatabase(ctx context.Context, arg UpdateMongoDatabaseParams) error
	UpdateMongoVersion(ctx context.Context, arg UpdateMongoVersionParams) error
	UpdateMysqlDatabase(ctx context.Context, arg UpdateMysqlDatabaseParams) error
	UpdateMysqlVersion(ctx context.Context, arg UpdateMysqlVersionParams) error
	UpdateNvdCPE(ctx context.Context, arg UpdateNvdCPEParams) error
	UpdatePostgresDatabase(ctx context.Context, arg UpdatePostgresDatabaseParams) error
	UpdatePostgresVersion(ctx context.Context, arg UpdatePostgresVersionParams) error
	UpdateProject(ctx context.Context, arg UpdateProjectParams) (*Project, error)
	UpdateRedisDatabase(ctx context.Context, arg UpdateRedisDatabaseParams) error
	UpdateRedisVersion(ctx context.Context, arg UpdateRedisVersionParams) error
	UpdateScanBruteforceResult(ctx context.Context, arg UpdateScanBruteforceResultParams) error
	UpdateScanStatus(ctx context.Context, arg UpdateScanStatusParams) error
	UpdateUser(ctx context.Context, arg UpdateUserParams) error
	UpdateWebauthnCredential(ctx context.Context, arg UpdateWebauthnCredentialParams) (*WebauthnCredential, error)
	ValidateTOTPSecretForUser(ctx context.Context, userID int64) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddOrganizationUser

func (q *Queries) AddOrganizationUser(ctx context.Context, arg AddOrganizationUserParams) (*OrganizationMember, error)

func (*Queries) AddUserToOrganization

func (q *Queries) AddUserToOrganization(ctx context.Context, arg AddUserToOrganizationParams) error

func (*Queries) BindScanToWorker

func (q *Queries) BindScanToWorker(ctx context.Context, arg BindScanToWorkerParams) (*Scan, error)

func (*Queries) CountUsers

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

func (*Queries) CreateBruteforcedPassword

func (q *Queries) CreateBruteforcedPassword(ctx context.Context, arg CreateBruteforcedPasswordParams) (*BruteforcedPassword, error)

func (*Queries) CreateDockerImage

func (q *Queries) CreateDockerImage(ctx context.Context, arg CreateDockerImageParams) (*DockerImage, error)

func (*Queries) CreateDockerLayerResultsForProject

func (q *Queries) CreateDockerLayerResultsForProject(ctx context.Context, arg []CreateDockerLayerResultsForProjectParams) (int64, error)

func (*Queries) CreateDockerScan

func (q *Queries) CreateDockerScan(ctx context.Context, arg CreateDockerScanParams) (*DockerScan, error)

func (*Queries) CreateDockerScannedLayerForProject

func (q *Queries) CreateDockerScannedLayerForProject(ctx context.Context, arg CreateDockerScannedLayerForProjectParams) (*DockerLayer, error)

func (*Queries) CreateGitCommitForProject

func (q *Queries) CreateGitCommitForProject(ctx context.Context, arg CreateGitCommitForProjectParams) (*GitCommit, error)

func (*Queries) CreateGitRepository

func (q *Queries) CreateGitRepository(ctx context.Context, arg CreateGitRepositoryParams) (*GitRepository, error)

func (*Queries) CreateGitResultForCommit

func (q *Queries) CreateGitResultForCommit(ctx context.Context, arg []CreateGitResultForCommitParams) (int64, error)

func (*Queries) CreateGitScan

func (q *Queries) CreateGitScan(ctx context.Context, arg CreateGitScanParams) (*GitScan, error)

func (*Queries) CreateMongoDatabase

func (q *Queries) CreateMongoDatabase(ctx context.Context, arg CreateMongoDatabaseParams) (*MongoDatabase, error)

func (*Queries) CreateMongoScan

func (q *Queries) CreateMongoScan(ctx context.Context, arg CreateMongoScanParams) (*MongoScan, error)

func (*Queries) CreateMysqlDatabase

func (q *Queries) CreateMysqlDatabase(ctx context.Context, arg CreateMysqlDatabaseParams) (*MysqlDatabase, error)

func (*Queries) CreateMysqlScan

func (q *Queries) CreateMysqlScan(ctx context.Context, arg CreateMysqlScanParams) (*MysqlScan, error)

func (*Queries) CreateNvdCPE

func (q *Queries) CreateNvdCPE(ctx context.Context, arg CreateNvdCPEParams) (*NvdCpe, error)

func (*Queries) CreateNvdCve

func (q *Queries) CreateNvdCve(ctx context.Context, arg CreateNvdCveParams) (*NvdCfe, error)

func (*Queries) CreateNvdCveCPE

func (q *Queries) CreateNvdCveCPE(ctx context.Context, arg CreateNvdCveCPEParams) (*NvdCveCpe, error)

func (*Queries) CreateOrganization

func (q *Queries) CreateOrganization(ctx context.Context, name string) (*Organization, error)

func (*Queries) CreatePostgresDatabase

func (q *Queries) CreatePostgresDatabase(ctx context.Context, arg CreatePostgresDatabaseParams) (*PostgresDatabase, error)

func (*Queries) CreatePostgresScan

func (q *Queries) CreatePostgresScan(ctx context.Context, arg CreatePostgresScanParams) (*PostgresScan, error)

func (*Queries) CreateProject

func (q *Queries) CreateProject(ctx context.Context, arg CreateProjectParams) (*Project, error)

func (*Queries) CreateRedisDatabase

func (q *Queries) CreateRedisDatabase(ctx context.Context, arg CreateRedisDatabaseParams) (*RedisDatabase, error)

func (*Queries) CreateRedisScan

func (q *Queries) CreateRedisScan(ctx context.Context, arg CreateRedisScanParams) (*RedisScan, error)

func (*Queries) CreateRememberMeToken

func (q *Queries) CreateRememberMeToken(ctx context.Context, arg CreateRememberMeTokenParams) (*RememberMeToken, error)

func (*Queries) CreateResetPasswordToken

func (q *Queries) CreateResetPasswordToken(ctx context.Context, arg CreateResetPasswordTokenParams) (*ResetPasswordToken, error)

func (*Queries) CreateScan

func (q *Queries) CreateScan(ctx context.Context, arg CreateScanParams) (*Scan, error)

func (*Queries) CreateScanBruteforceResult

func (q *Queries) CreateScanBruteforceResult(ctx context.Context, arg CreateScanBruteforceResultParams) (*ScanBruteforceResult, error)

func (*Queries) CreateScanGroup

func (q *Queries) CreateScanGroup(ctx context.Context, arg CreateScanGroupParams) (*ScanGroup, error)

func (*Queries) CreateScanResult

func (q *Queries) CreateScanResult(ctx context.Context, arg CreateScanResultParams) (*ScanResult, error)

func (*Queries) CreateTOTPSecretForUser

func (q *Queries) CreateTOTPSecretForUser(ctx context.Context, arg CreateTOTPSecretForUserParams) (*TotpSecretToken, error)

func (*Queries) CreateUser

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

func (*Queries) CreateWebauthnCredential

func (q *Queries) CreateWebauthnCredential(ctx context.Context, arg CreateWebauthnCredentialParams) (*WebauthnCredential, error)

func (*Queries) CreateWorker

func (q *Queries) CreateWorker(ctx context.Context, arg CreateWorkerParams) (*Worker, error)

func (*Queries) DeleteDockerImage

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

func (*Queries) DeleteGitRepository

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

func (*Queries) DeleteMongoDatabase

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

func (*Queries) DeleteMysqlDatabase

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

func (*Queries) DeleteNvdCveByName

func (q *Queries) DeleteNvdCveByName(ctx context.Context, cveID string) error

func (*Queries) DeleteOrganization

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

func (*Queries) DeletePostgresDatabase

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

func (*Queries) DeleteProject

func (q *Queries) DeleteProject(ctx context.Context, id int64) (*Project, error)

func (*Queries) DeleteRedisDatabase

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

func (*Queries) DeleteRememberMeTokenByUserAndToken

func (q *Queries) DeleteRememberMeTokenByUserAndToken(ctx context.Context, arg DeleteRememberMeTokenByUserAndTokenParams) error

func (*Queries) DeleteRememberMeTokensForUser

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

func (*Queries) DeleteUser

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

func (*Queries) DeleteWorker

func (q *Queries) DeleteWorker(ctx context.Context, id int64) (*Worker, error)

func (*Queries) GetAllOrganizationMembersForOrganizationsThatContainUser

func (q *Queries) GetAllOrganizationMembersForOrganizationsThatContainUser(ctx context.Context, userID int64) ([]*GetAllOrganizationMembersForOrganizationsThatContainUserRow, error)

func (*Queries) GetAllOrganizationProjectsForUser

func (q *Queries) GetAllOrganizationProjectsForUser(ctx context.Context, userID int64) ([]*GetAllOrganizationProjectsForUserRow, error)

func (*Queries) GetBruteforcePasswordsForProjectCount

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

func (*Queries) GetBruteforcePasswordsPaginated

func (q *Queries) GetBruteforcePasswordsPaginated(ctx context.Context, arg GetBruteforcePasswordsPaginatedParams) ([]*DefaultBruteforcePassword, error)

func (*Queries) GetBruteforcePasswordsSpecificForProject

func (q *Queries) GetBruteforcePasswordsSpecificForProject(ctx context.Context, projectID int64) ([]sql.NullString, error)

func (*Queries) GetBruteforcedPasswords

func (q *Queries) GetBruteforcedPasswords(ctx context.Context, arg GetBruteforcedPasswordsParams) (*BruteforcedPassword, error)

func (*Queries) GetCPEByProductAndVersion

func (q *Queries) GetCPEByProductAndVersion(ctx context.Context, arg GetCPEByProductAndVersionParams) (*NvdCpe, error)

func (*Queries) GetCountOfScanGroupsForProject

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

func (*Queries) GetCveByCveID

func (q *Queries) GetCveByCveID(ctx context.Context, cveID string) (*NvdCfe, error)

func (*Queries) GetCveCpeByCveAndCpe

func (q *Queries) GetCveCpeByCveAndCpe(ctx context.Context, arg GetCveCpeByCveAndCpeParams) (*NvdCveCpe, error)

func (*Queries) GetCvesByProductAndVersion

func (q *Queries) GetCvesByProductAndVersion(ctx context.Context, arg GetCvesByProductAndVersionParams) ([]*GetCvesByProductAndVersionRow, error)

func (*Queries) GetDockerImage

func (q *Queries) GetDockerImage(ctx context.Context, arg GetDockerImageParams) (*GetDockerImageRow, error)

func (*Queries) GetDockerImagesForProject

func (q *Queries) GetDockerImagesForProject(ctx context.Context, arg GetDockerImagesForProjectParams) ([]*GetDockerImagesForProjectRow, error)

func (*Queries) GetDockerLayersAndResultsForImage

func (q *Queries) GetDockerLayersAndResultsForImage(ctx context.Context, imageID int64) ([]*GetDockerLayersAndResultsForImageRow, error)

func (*Queries) GetDockerScannedLayersForImage

func (q *Queries) GetDockerScannedLayersForImage(ctx context.Context, imageID int64) ([]string, error)

func (*Queries) GetGitCommitsWithResults

func (q *Queries) GetGitCommitsWithResults(ctx context.Context, repositoryID int64) ([]*GetGitCommitsWithResultsRow, error)

func (*Queries) GetGitRepository

func (q *Queries) GetGitRepository(ctx context.Context, arg GetGitRepositoryParams) (*GetGitRepositoryRow, error)

func (*Queries) GetGitScanByScan

func (q *Queries) GetGitScanByScan(ctx context.Context, scanID int64) ([]*GitScan, error)

func (*Queries) GetGitScanByScanAndRepo

func (q *Queries) GetGitScanByScanAndRepo(ctx context.Context, arg GetGitScanByScanAndRepoParams) (*GetGitScanByScanAndRepoRow, error)

func (*Queries) GetGitScannedCommitsForProject

func (q *Queries) GetGitScannedCommitsForProject(ctx context.Context, projectID int64) ([]string, error)

func (*Queries) GetGitScannedCommitsForProjectBatch

func (q *Queries) GetGitScannedCommitsForProjectBatch(ctx context.Context, arg GetGitScannedCommitsForProjectBatchParams) ([]string, error)

func (*Queries) GetInvalidTOTPSecretForUser

func (q *Queries) GetInvalidTOTPSecretForUser(ctx context.Context, userID int64) (*TotpSecretToken, error)

func (*Queries) GetMongoDatabase

func (q *Queries) GetMongoDatabase(ctx context.Context, arg GetMongoDatabaseParams) (*GetMongoDatabaseRow, error)

func (*Queries) GetMongoDatabasesForProject

func (q *Queries) GetMongoDatabasesForProject(ctx context.Context, arg GetMongoDatabasesForProjectParams) ([]*GetMongoDatabasesForProjectRow, error)

func (*Queries) GetMongoScan

func (q *Queries) GetMongoScan(ctx context.Context, id int64) (*MongoScan, error)

func (*Queries) GetMongoScanByScanID

func (q *Queries) GetMongoScanByScanID(ctx context.Context, scanID int64) (*MongoScan, error)

func (*Queries) GetMysqlDatabase

func (q *Queries) GetMysqlDatabase(ctx context.Context, arg GetMysqlDatabaseParams) (*GetMysqlDatabaseRow, error)

func (*Queries) GetMysqlDatabasesForProject

func (q *Queries) GetMysqlDatabasesForProject(ctx context.Context, arg GetMysqlDatabasesForProjectParams) ([]*GetMysqlDatabasesForProjectRow, error)

func (*Queries) GetMysqlScan

func (q *Queries) GetMysqlScan(ctx context.Context, id int64) (*MysqlScan, error)

func (*Queries) GetMysqlScanByScanID

func (q *Queries) GetMysqlScanByScanID(ctx context.Context, scanID int64) (*MysqlScan, error)

func (*Queries) GetNvdCPEsByDBType

func (q *Queries) GetNvdCPEsByDBType(ctx context.Context, databaseType int32) ([]*NvdCpe, error)

func (*Queries) GetNvdCveByCveID

func (q *Queries) GetNvdCveByCveID(ctx context.Context, cveID string) (*NvdCfe, error)

func (*Queries) GetOrganization

func (q *Queries) GetOrganization(ctx context.Context, id int64) (*Organization, error)

func (*Queries) GetOrganizationByName

func (q *Queries) GetOrganizationByName(ctx context.Context, name string) (*Organization, error)

func (*Queries) GetOrganizationMembers

func (q *Queries) GetOrganizationMembers(ctx context.Context, organizationID int64) ([]*GetOrganizationMembersRow, error)

func (*Queries) GetOrganizationPermissionForUser

func (q *Queries) GetOrganizationPermissionForUser(ctx context.Context, arg GetOrganizationPermissionForUserParams) (int32, error)

func (*Queries) GetOrganizationProjects

func (q *Queries) GetOrganizationProjects(ctx context.Context, organizationID int64) ([]*GetOrganizationProjectsRow, error)

func (*Queries) GetOrganizationUser

func (q *Queries) GetOrganizationUser(ctx context.Context, arg GetOrganizationUserParams) (*OrganizationMember, error)

func (*Queries) GetOrganizationsByUser

func (q *Queries) GetOrganizationsByUser(ctx context.Context, userID int64) ([]*GetOrganizationsByUserRow, error)

func (*Queries) GetOrganizationsForUser

func (q *Queries) GetOrganizationsForUser(ctx context.Context, userID int64) ([]*Organization, error)

func (*Queries) GetPostgresDatabase

func (q *Queries) GetPostgresDatabase(ctx context.Context, arg GetPostgresDatabaseParams) (*GetPostgresDatabaseRow, error)

func (*Queries) GetPostgresScan

func (q *Queries) GetPostgresScan(ctx context.Context, id int64) (*PostgresScan, error)

func (*Queries) GetPostgresScanByScanID

func (q *Queries) GetPostgresScanByScanID(ctx context.Context, scanID int64) (*PostgresScan, error)

func (*Queries) GetProject

func (q *Queries) GetProject(ctx context.Context, id int64) (*Project, error)

func (*Queries) GetProjectByOrganizationAndName

func (q *Queries) GetProjectByOrganizationAndName(ctx context.Context, arg GetProjectByOrganizationAndNameParams) (*Project, error)

func (*Queries) GetProjectWithStats

func (q *Queries) GetProjectWithStats(ctx context.Context, id int64) (*GetProjectWithStatsRow, error)

func (*Queries) GetProjects

func (q *Queries) GetProjects(ctx context.Context) ([]*Project, error)

func (*Queries) GetProjectsByOrganization

func (q *Queries) GetProjectsByOrganization(ctx context.Context, organizationID int64) ([]*Project, error)

func (*Queries) GetRedisDatabase

func (q *Queries) GetRedisDatabase(ctx context.Context, arg GetRedisDatabaseParams) (*GetRedisDatabaseRow, error)

func (*Queries) GetRedisDatabasesForProject

func (q *Queries) GetRedisDatabasesForProject(ctx context.Context, arg GetRedisDatabasesForProjectParams) ([]*GetRedisDatabasesForProjectRow, error)

func (*Queries) GetRedisScan

func (q *Queries) GetRedisScan(ctx context.Context, id int64) (*RedisScan, error)

func (*Queries) GetRedisScanByScanID

func (q *Queries) GetRedisScanByScanID(ctx context.Context, scanID int64) (*RedisScan, error)

func (*Queries) GetResetPasswordToken

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

func (*Queries) GetScan

func (q *Queries) GetScan(ctx context.Context, id int64) (*GetScanRow, error)

func (*Queries) GetScanBruteforceResults

func (q *Queries) GetScanBruteforceResults(ctx context.Context, scanID int64) ([]*ScanBruteforceResult, error)

func (*Queries) GetScanGroup

func (q *Queries) GetScanGroup(ctx context.Context, id int64) (*ScanGroup, error)

func (*Queries) GetScanGroupsForProject

func (q *Queries) GetScanGroupsForProject(ctx context.Context, projectID int64) ([]*GetScanGroupsForProjectRow, error)

func (*Queries) GetScanResults

func (q *Queries) GetScanResults(ctx context.Context, scanID int64) ([]*ScanResult, error)

func (*Queries) GetScanResultsByScanIdAndScanSource

func (q *Queries) GetScanResultsByScanIdAndScanSource(ctx context.Context, arg GetScanResultsByScanIdAndScanSourceParams) ([]*ScanResult, error)

func (*Queries) GetScansForProject

func (q *Queries) GetScansForProject(ctx context.Context, projectID int64) ([]*GetScansForProjectRow, error)

func (*Queries) GetScansForScanGroup

func (q *Queries) GetScansForScanGroup(ctx context.Context, scanGroupID int64) ([]*GetScansForScanGroupRow, error)

func (*Queries) GetSpecificBruteforcePasswordID

func (q *Queries) GetSpecificBruteforcePasswordID(ctx context.Context, arg GetSpecificBruteforcePasswordIDParams) (int64, error)

func (*Queries) GetTOTPSecretForUser

func (q *Queries) GetTOTPSecretForUser(ctx context.Context, userID int64) (*TotpSecretToken, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, id int64) (*User, error)

func (*Queries) GetUserByConfirmSelector

func (q *Queries) GetUserByConfirmSelector(ctx context.Context, confirmSelector sql.NullString) (*User, error)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (*User, error)

func (*Queries) GetUserByRecoverSelector

func (q *Queries) GetUserByRecoverSelector(ctx context.Context, recoverSelector sql.NullString) (*User, error)

func (*Queries) GetUserByUsernameOrEmail

func (q *Queries) GetUserByUsernameOrEmail(ctx context.Context, arg GetUserByUsernameOrEmailParams) (*User, error)

func (*Queries) GetUserByWebauthnCredentialID

func (q *Queries) GetUserByWebauthnCredentialID(ctx context.Context, credentialID []byte) (*GetUserByWebauthnCredentialIDRow, error)

func (*Queries) GetWebauthnCredentialsByUserID

func (q *Queries) GetWebauthnCredentialsByUserID(ctx context.Context, userID int64) ([]*WebauthnCredential, error)

func (*Queries) GetWorker

func (q *Queries) GetWorker(ctx context.Context, id int64) (*Worker, error)

func (*Queries) GetWorkerByToken

func (q *Queries) GetWorkerByToken(ctx context.Context, token string) (*Worker, error)

func (*Queries) GetWorkerForProject

func (q *Queries) GetWorkerForProject(ctx context.Context, arg GetWorkerForProjectParams) (*Worker, error)

func (*Queries) GetWorkerForScan

func (q *Queries) GetWorkerForScan(ctx context.Context, id int64) (*Worker, error)

func (*Queries) GetWorkersByProject

func (q *Queries) GetWorkersByProject(ctx context.Context, projectID int64) ([]*Worker, error)

func (*Queries) GetWorkersForOrganization

func (q *Queries) GetWorkersForOrganization(ctx context.Context, organization int64) ([]*Worker, error)

func (*Queries) GetWorkersForProject

func (q *Queries) GetWorkersForProject(ctx context.Context, projectID int64) ([]*Worker, error)

func (*Queries) InsertBruteforcePasswords

func (q *Queries) InsertBruteforcePasswords(ctx context.Context, passwords []string) error

func (*Queries) InvalidateResetPasswordToken

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

func (*Queries) InvalidateTOTPSecretForUser

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

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context) ([]*User, error)

func (*Queries) ListUsersPaginated

func (q *Queries) ListUsersPaginated(ctx context.Context, arg ListUsersPaginatedParams) ([]*User, error)

func (*Queries) RemoveOrganizationUser

func (q *Queries) RemoveOrganizationUser(ctx context.Context, arg RemoveOrganizationUserParams) (*OrganizationMember, error)

func (*Queries) SetOrganizationPermissionsForUser

func (q *Queries) SetOrganizationPermissionsForUser(ctx context.Context, arg SetOrganizationPermissionsForUserParams) (*OrganizationMember, error)

func (*Queries) UpdateBruteforcedPassword

func (q *Queries) UpdateBruteforcedPassword(ctx context.Context, arg UpdateBruteforcedPasswordParams) (*BruteforcedPassword, error)

func (*Queries) UpdateDockerImage

func (q *Queries) UpdateDockerImage(ctx context.Context, arg UpdateDockerImageParams) (*DockerImage, error)

func (*Queries) UpdateGitRepository

func (q *Queries) UpdateGitRepository(ctx context.Context, arg UpdateGitRepositoryParams) (*GitRepository, error)

func (*Queries) UpdateMongoDatabase

func (q *Queries) UpdateMongoDatabase(ctx context.Context, arg UpdateMongoDatabaseParams) error

func (*Queries) UpdateMongoVersion

func (q *Queries) UpdateMongoVersion(ctx context.Context, arg UpdateMongoVersionParams) error

func (*Queries) UpdateMysqlDatabase

func (q *Queries) UpdateMysqlDatabase(ctx context.Context, arg UpdateMysqlDatabaseParams) error

func (*Queries) UpdateMysqlVersion

func (q *Queries) UpdateMysqlVersion(ctx context.Context, arg UpdateMysqlVersionParams) error

func (*Queries) UpdateNvdCPE

func (q *Queries) UpdateNvdCPE(ctx context.Context, arg UpdateNvdCPEParams) error

func (*Queries) UpdatePostgresDatabase

func (q *Queries) UpdatePostgresDatabase(ctx context.Context, arg UpdatePostgresDatabaseParams) error

func (*Queries) UpdatePostgresVersion

func (q *Queries) UpdatePostgresVersion(ctx context.Context, arg UpdatePostgresVersionParams) error

func (*Queries) UpdateProject

func (q *Queries) UpdateProject(ctx context.Context, arg UpdateProjectParams) (*Project, error)

func (*Queries) UpdateRedisDatabase

func (q *Queries) UpdateRedisDatabase(ctx context.Context, arg UpdateRedisDatabaseParams) error

func (*Queries) UpdateRedisVersion

func (q *Queries) UpdateRedisVersion(ctx context.Context, arg UpdateRedisVersionParams) error

func (*Queries) UpdateScanBruteforceResult

func (q *Queries) UpdateScanBruteforceResult(ctx context.Context, arg UpdateScanBruteforceResultParams) error

func (*Queries) UpdateScanStatus

func (q *Queries) UpdateScanStatus(ctx context.Context, arg UpdateScanStatusParams) error

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error

func (*Queries) UpdateWebauthnCredential

func (q *Queries) UpdateWebauthnCredential(ctx context.Context, arg UpdateWebauthnCredentialParams) (*WebauthnCredential, error)

func (*Queries) ValidateTOTPSecretForUser

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

func (*Queries) WithTx

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

type RedisDatabase

type RedisDatabase struct {
	ID        int64              `json:"id"`
	ProjectID int64              `json:"project_id"`
	Host      string             `json:"host"`
	Port      int32              `json:"port"`
	Username  string             `json:"username"`
	Password  string             `json:"password"`
	Version   sql.NullString     `json:"version"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type RedisScan

type RedisScan struct {
	ID         int64 `json:"id"`
	ScanID     int64 `json:"scan_id"`
	DatabaseID int64 `json:"database_id"`
}

type RememberMeToken

type RememberMeToken struct {
	ID        int64              `json:"id"`
	UserID    int64              `json:"user_id"`
	Token     string             `json:"token"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type RemoveOrganizationUserParams

type RemoveOrganizationUserParams struct {
	OrganizationID int64 `json:"organization_id"`
	UserID         int64 `json:"user_id"`
}

type ResetPasswordToken

type ResetPasswordToken struct {
	ID        uuid.UUID          `json:"id"`
	UserID    int64              `json:"user_id"`
	Valid     bool               `json:"valid"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type Scan

type Scan struct {
	ID          int64              `json:"id"`
	ScanGroupID int64              `json:"scan_group_id"`
	ScanType    int32              `json:"scan_type"`
	Status      int32              `json:"status"`
	Error       sql.NullString     `json:"error"`
	WorkerID    sql.NullInt64      `json:"worker_id"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
	EndedAt     pgtype.Timestamptz `json:"ended_at"`
}

type ScanBruteforceResult

type ScanBruteforceResult struct {
	ID        int64              `json:"id"`
	ScanID    int64              `json:"scan_id"`
	ScanType  int32              `json:"scan_type"`
	Username  string             `json:"username"`
	Password  sql.NullString     `json:"password"`
	Total     int32              `json:"total"`
	Tried     int32              `json:"tried"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type ScanGroup

type ScanGroup struct {
	ID        int64              `json:"id"`
	ProjectID int64              `json:"project_id"`
	CreatedBy sql.NullInt64      `json:"created_by"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type ScanResult

type ScanResult struct {
	ID         int64              `json:"id"`
	ScanID     int64              `json:"scan_id"`
	Severity   int32              `json:"severity"`
	Message    string             `json:"message"`
	ScanSource int32              `json:"scan_source"`
	CreatedAt  pgtype.Timestamptz `json:"created_at"`
}

type SetOrganizationPermissionsForUserParams

type SetOrganizationPermissionsForUserParams struct {
	OrganizationID int64 `json:"organization_id"`
	UserID         int64 `json:"user_id"`
	Role           int32 `json:"role"`
}

type TotpSecretToken

type TotpSecretToken struct {
	ID         int64              `json:"id"`
	UserID     int64              `json:"user_id"`
	Valid      bool               `json:"valid"`
	TotpSecret string             `json:"totp_secret"`
	CreatedAt  pgtype.Timestamptz `json:"created_at"`
}

type UpdateBruteforcedPasswordParams

type UpdateBruteforcedPasswordParams struct {
	ID               int64          `json:"id"`
	LastBruteforceID sql.NullInt64  `json:"last_bruteforce_id"`
	Password         sql.NullString `json:"password"`
}

type UpdateDockerImageParams

type UpdateDockerImageParams struct {
	ID          int64  `json:"id"`
	DockerImage string `json:"docker_image"`
	ProjectID   int64  `json:"project_id"`
	SaltKey     string `json:"salt_key"`
	Username    string `json:"username"`
	Password    string `json:"password"`
}

type UpdateGitRepositoryParams

type UpdateGitRepositoryParams struct {
	ID            int64  `json:"id"`
	GitRepository string `json:"git_repository"`
	ProjectID     int64  `json:"project_id"`
	SaltKey       string `json:"salt_key"`
	Username      string `json:"username"`
	Password      string `json:"password"`
	PrivateKey    string `json:"private_key"`
}

type UpdateMongoDatabaseParams

type UpdateMongoDatabaseParams struct {
	ID           int64          `json:"id"`
	DatabaseName string         `json:"database_name"`
	Host         string         `json:"host"`
	Port         int32          `json:"port"`
	Version      sql.NullString `json:"version"`
	ProjectID    int64          `json:"project_id"`
	SaltKey      string         `json:"salt_key"`
	Username     string         `json:"username"`
	Password     string         `json:"password"`
}

type UpdateMongoVersionParams

type UpdateMongoVersionParams struct {
	ID      int64          `json:"id"`
	Version sql.NullString `json:"version"`
}

type UpdateMysqlDatabaseParams

type UpdateMysqlDatabaseParams struct {
	ID           int64          `json:"id"`
	DatabaseName string         `json:"database_name"`
	Host         string         `json:"host"`
	Port         int32          `json:"port"`
	Version      sql.NullString `json:"version"`
	ProjectID    int64          `json:"project_id"`
	SaltKey      string         `json:"salt_key"`
	Username     string         `json:"username"`
	Password     string         `json:"password"`
}

type UpdateMysqlVersionParams

type UpdateMysqlVersionParams struct {
	ID      int64          `json:"id"`
	Version sql.NullString `json:"version"`
}

type UpdateNvdCPEParams

type UpdateNvdCPEParams struct {
	ID           int64              `json:"id"`
	Version      sql.NullString     `json:"version"`
	LastModified pgtype.Timestamptz `json:"last_modified"`
}

type UpdatePostgresDatabaseParams

type UpdatePostgresDatabaseParams struct {
	ID           int64          `json:"id"`
	DatabaseName string         `json:"database_name"`
	Host         string         `json:"host"`
	Port         int32          `json:"port"`
	Version      sql.NullString `json:"version"`
	ProjectID    int64          `json:"project_id"`
	SaltKey      string         `json:"salt_key"`
	Username     string         `json:"username"`
	Password     string         `json:"password"`
}

type UpdatePostgresVersionParams

type UpdatePostgresVersionParams struct {
	ID      int64          `json:"id"`
	Version sql.NullString `json:"version"`
}

type UpdateProjectParams

type UpdateProjectParams struct {
	ID     int64 `json:"id"`
	Remote bool  `json:"remote"`
}

type UpdateRedisDatabaseParams

type UpdateRedisDatabaseParams struct {
	ID        int64          `json:"id"`
	Host      string         `json:"host"`
	Port      int32          `json:"port"`
	Version   sql.NullString `json:"version"`
	ProjectID int64          `json:"project_id"`
	SaltKey   string         `json:"salt_key"`
	Username  string         `json:"username"`
	Password  string         `json:"password"`
}

type UpdateRedisVersionParams

type UpdateRedisVersionParams struct {
	ID      int64          `json:"id"`
	Version sql.NullString `json:"version"`
}

type UpdateScanBruteforceResultParams

type UpdateScanBruteforceResultParams struct {
	ID       int64          `json:"id"`
	Password sql.NullString `json:"password"`
	Tried    int32          `json:"tried"`
	Total    int32          `json:"total"`
}

type UpdateScanStatusParams

type UpdateScanStatusParams struct {
	ID      int64              `json:"id"`
	Status  int32              `json:"status"`
	Error   sql.NullString     `json:"error"`
	EndedAt pgtype.Timestamptz `json:"ended_at"`
}

type UpdateUserParams

type UpdateUserParams struct {
	ID                int64              `json:"id"`
	Username          string             `json:"username"`
	Password          string             `json:"password"`
	Email             string             `json:"email"`
	RecoveryCodes     sql.NullString     `json:"recovery_codes"`
	TotpSecret        sql.NullString     `json:"totp_secret"`
	RecoverSelector   sql.NullString     `json:"recover_selector"`
	RecoverVerifier   sql.NullString     `json:"recover_verifier"`
	RecoverExpiry     pgtype.Timestamptz `json:"recover_expiry"`
	LoginAttemptCount int32              `json:"login_attempt_count"`
	LoginLastAttempt  pgtype.Timestamptz `json:"login_last_attempt"`
	Locked            pgtype.Timestamptz `json:"locked"`
	ConfirmSelector   sql.NullString     `json:"confirm_selector"`
	ConfirmVerifier   sql.NullString     `json:"confirm_verifier"`
	Confirmed         bool               `json:"confirmed"`
}

type UpdateWebauthnCredentialParams

type UpdateWebauthnCredentialParams struct {
	UserID          int64    `json:"user_id"`
	CredentialID    []byte   `json:"credential_id"`
	PublicKey       []byte   `json:"public_key"`
	AttestationType string   `json:"attestation_type"`
	Transport       []string `json:"transport"`
	UserPresent     bool     `json:"user_present"`
	UserVerified    bool     `json:"user_verified"`
	BackupEligible  bool     `json:"backup_eligible"`
	BackupState     bool     `json:"backup_state"`
	AaGuid          []byte   `json:"aa_guid"`
	SignCount       int32    `json:"sign_count"`
	CloneWarning    bool     `json:"clone_warning"`
	Attachment      string   `json:"attachment"`
	ID              int64    `json:"id"`
}

type User

type User struct {
	ID                int64              `json:"id"`
	Username          string             `json:"username"`
	Password          string             `json:"password"`
	Email             string             `json:"email"`
	RecoveryCodes     sql.NullString     `json:"recovery_codes"`
	TotpSecret        sql.NullString     `json:"totp_secret"`
	RecoverSelector   sql.NullString     `json:"recover_selector"`
	RecoverVerifier   sql.NullString     `json:"recover_verifier"`
	RecoverExpiry     pgtype.Timestamptz `json:"recover_expiry"`
	LoginAttemptCount int32              `json:"login_attempt_count"`
	LoginLastAttempt  pgtype.Timestamptz `json:"login_last_attempt"`
	Locked            pgtype.Timestamptz `json:"locked"`
	ConfirmSelector   sql.NullString     `json:"confirm_selector"`
	ConfirmVerifier   sql.NullString     `json:"confirm_verifier"`
	Confirmed         bool               `json:"confirmed"`
	CreatedAt         pgtype.Timestamptz `json:"created_at"`
}

type WebauthnCredential

type WebauthnCredential struct {
	ID              int64    `json:"id"`
	UserID          int64    `json:"user_id"`
	Name            string   `json:"name"`
	CredentialID    []byte   `json:"credential_id"`
	PublicKey       []byte   `json:"public_key"`
	AttestationType string   `json:"attestation_type"`
	Transport       []string `json:"transport"`
	UserPresent     bool     `json:"user_present"`
	UserVerified    bool     `json:"user_verified"`
	BackupEligible  bool     `json:"backup_eligible"`
	BackupState     bool     `json:"backup_state"`
	AaGuid          []byte   `json:"aa_guid"`
	SignCount       int32    `json:"sign_count"`
	CloneWarning    bool     `json:"clone_warning"`
	Attachment      string   `json:"attachment"`
}

type Worker

type Worker struct {
	ID           int64              `json:"id"`
	Token        string             `json:"token"`
	Name         string             `json:"name"`
	Organization int64              `json:"organization"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
}

Jump to

Keyboard shortcuts

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