postgresql_db

package
v0.0.0-...-a87dae0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiToken

type ApiToken struct {
	ID              int64     `json:"id"`
	ApiToken        uuid.UUID `json:"api_token"`
	Name            string    `json:"name"`
	CompanyID       int32     `json:"company_id"`
	GroupID         int32     `json:"group_id"`
	RoleID          int32     `json:"role_id"`
	CreatedByUserID int64     `json:"created_by_user_id"`
	CreatedAt       time.Time `json:"created_at"`
	UpdatedAt       time.Time `json:"updated_at"`
}

type AuditLog

type AuditLog struct {
	ID        int64     `json:"id"`
	Event     string    `json:"event"`
	Action    string    `json:"action"`
	Resources string    `json:"resources"`
	Success   bool      `json:"success"`
	UserEmail string    `json:"user_email"`
	UserRole  string    `json:"user_role"`
	CreatedAt time.Time `json:"created_at"`
}

type Company

type Company struct {
	ID          int32     `json:"id"`
	Name        string    `json:"name"`
	EmailDomain string    `json:"email_domain"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	Namespace   string    `json:"namespace"`
}

type ContainerRegistry

type ContainerRegistry struct {
	ID              int32           `json:"id"`
	Name            string          `json:"name"`
	RegistryType    string          `json:"registry_type"`
	EncryptedSecret json.RawMessage `json:"encrypted_secret"`
	NonSecret       json.RawMessage `json:"non_secret"`
	Extras          json.RawMessage `json:"extras"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
}

type CreateApiTokenParams

type CreateApiTokenParams struct {
	ApiToken        uuid.UUID `json:"api_token"`
	Name            string    `json:"name"`
	CompanyID       int32     `json:"company_id"`
	RoleID          int32     `json:"role_id"`
	GroupID         int32     `json:"group_id"`
	CreatedByUserID int64     `json:"created_by_user_id"`
}

type CreateAuditLogParams

type CreateAuditLogParams struct {
	Event     string    `json:"event"`
	Action    string    `json:"action"`
	Resources string    `json:"resources"`
	Success   bool      `json:"success"`
	UserEmail string    `json:"user_email"`
	UserRole  string    `json:"user_role"`
	CreatedAt time.Time `json:"created_at"`
}

type CreateCompanyParams

type CreateCompanyParams struct {
	Name        string `json:"name"`
	EmailDomain string `json:"email_domain"`
	Namespace   string `json:"namespace"`
}

type CreateContainerRegistryParams

type CreateContainerRegistryParams struct {
	Name            string          `json:"name"`
	RegistryType    string          `json:"registry_type"`
	EncryptedSecret json.RawMessage `json:"encrypted_secret"`
	NonSecret       json.RawMessage `json:"non_secret"`
	Extras          json.RawMessage `json:"extras"`
}

type CreateIntegrationParams

type CreateIntegrationParams struct {
	Resource        string          `json:"resource"`
	Filters         json.RawMessage `json:"filters"`
	IntegrationType string          `json:"integration_type"`
	IntervalMinutes int32           `json:"interval_minutes"`
	Config          json.RawMessage `json:"config"`
	CreatedByUserID int64           `json:"created_by_user_id"`
}

type CreatePasswordResetParams

type CreatePasswordResetParams struct {
	Code   uuid.UUID `json:"code"`
	Expiry time.Time `json:"expiry"`
	UserID int64     `json:"user_id"`
}

type CreateScheduleParams

type CreateScheduleParams struct {
	Action      string          `json:"action"`
	Description string          `json:"description"`
	CronExpr    string          `json:"cron_expr"`
	Payload     json.RawMessage `json:"payload"`
	IsEnabled   bool            `json:"is_enabled"`
	IsSystem    bool            `json:"is_system"`
}

type CreateSettingParams

type CreateSettingParams struct {
	Key           string          `json:"key"`
	Value         json.RawMessage `json:"value"`
	IsVisibleOnUi bool            `json:"is_visible_on_ui"`
}

type CreateUserGroupParams

type CreateUserGroupParams struct {
	Name      string `json:"name"`
	CompanyID int32  `json:"company_id"`
	IsSystem  bool   `json:"is_system"`
}

type CreateUserInviteParams

type CreateUserInviteParams struct {
	Email           string    `json:"email"`
	Code            uuid.UUID `json:"code"`
	CreatedByUserID int64     `json:"created_by_user_id"`
	RoleID          int32     `json:"role_id"`
	CompanyID       int32     `json:"company_id"`
	Accepted        bool      `json:"accepted"`
	Expiry          time.Time `json:"expiry"`
}

type CreateUserParams

type CreateUserParams struct {
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	Email               string          `json:"email"`
	RoleID              int32           `json:"role_id"`
	GroupIds            json.RawMessage `json:"group_ids"`
	CompanyID           int32           `json:"company_id"`
	PasswordHash        string          `json:"password_hash"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
}

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 GetActiveUsersByCompanyIDRow

type GetActiveUsersByCompanyIDRow struct {
	ID                  int64           `json:"id"`
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	Email               string          `json:"email"`
	RoleID              int32           `json:"role_id"`
	RoleName            string          `json:"role_name"`
	GroupIds            json.RawMessage `json:"group_ids"`
	CompanyID           int32           `json:"company_id"`
	CompanyName         string          `json:"company_name"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
	CreatedAt           time.Time       `json:"created_at"`
	UpdatedAt           time.Time       `json:"updated_at"`
	CompanyNamespace    string          `json:"company_namespace"`
}

type GetActiveUsersRow

type GetActiveUsersRow struct {
	ID                  int64           `json:"id"`
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	Email               string          `json:"email"`
	RoleID              int32           `json:"role_id"`
	RoleName            string          `json:"role_name"`
	GroupIds            json.RawMessage `json:"group_ids"`
	CompanyID           int32           `json:"company_id"`
	CompanyName         string          `json:"company_name"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
	CreatedAt           time.Time       `json:"created_at"`
	UpdatedAt           time.Time       `json:"updated_at"`
	CompanyNamespace    string          `json:"company_namespace"`
}

type GetApiTokenByTokenRow

type GetApiTokenByTokenRow struct {
	ApiToken                uuid.UUID `json:"api_token"`
	Name                    string    `json:"name"`
	CompanyID               int32     `json:"company_id"`
	RoleID                  int32     `json:"role_id"`
	GroupID                 int32     `json:"group_id"`
	CreatedByUserID         int64     `json:"created_by_user_id"`
	FirstName               string    `json:"first_name"`
	LastName                string    `json:"last_name"`
	Email                   string    `json:"email"`
	RoleName                string    `json:"role_name"`
	CompanyName             string    `json:"company_name"`
	CompanyNamespace        string    `json:"company_namespace"`
	IsUserActive            bool      `json:"is_user_active"`
	UserPasswordInvalidated bool      `json:"user_password_invalidated"`
	CreatedAt               time.Time `json:"created_at"`
	UpdatedAt               time.Time `json:"updated_at"`
}

type GetAuditLogsLast5MinutesRow

type GetAuditLogsLast5MinutesRow struct {
	Event     string    `json:"event"`
	Action    string    `json:"action"`
	Resources string    `json:"resources"`
	Success   bool      `json:"success"`
	Email     string    `json:"email"`
	Role      string    `json:"role"`
	CreatedAt time.Time `json:"created_at"`
}

type GetAuditLogsParams

type GetAuditLogsParams struct {
	Offset int32 `json:"offset"`
	Limit  int32 `json:"limit"`
}

type GetAuditLogsRow

type GetAuditLogsRow struct {
	Event     string    `json:"event"`
	Action    string    `json:"action"`
	Resources string    `json:"resources"`
	Success   bool      `json:"success"`
	Email     string    `json:"email"`
	Role      string    `json:"role"`
	CreatedAt time.Time `json:"created_at"`
}

type GetContainerRegistriesRow

type GetContainerRegistriesRow struct {
	ID              int32           `json:"id"`
	Name            string          `json:"name"`
	RegistryType    string          `json:"registry_type"`
	EncryptedSecret json.RawMessage `json:"encrypted_secret"`
	NonSecret       json.RawMessage `json:"non_secret"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
	Extras          json.RawMessage `json:"extras"`
}

type GetContainerRegistriesSafeRow

type GetContainerRegistriesSafeRow struct {
	ID           int32           `json:"id"`
	Name         string          `json:"name"`
	RegistryType string          `json:"registry_type"`
	NonSecret    json.RawMessage `json:"non_secret"`
	CreatedAt    time.Time       `json:"created_at"`
	UpdatedAt    time.Time       `json:"updated_at"`
}

type GetContainerRegistryByTypeAndNameParams

type GetContainerRegistryByTypeAndNameParams struct {
	RegistryType string `json:"registry_type"`
	Name         string `json:"name"`
}

type GetContainerRegistryByTypeAndNameRow

type GetContainerRegistryByTypeAndNameRow struct {
	ID              int32           `json:"id"`
	Name            string          `json:"name"`
	RegistryType    string          `json:"registry_type"`
	EncryptedSecret json.RawMessage `json:"encrypted_secret"`
	NonSecret       json.RawMessage `json:"non_secret"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
	Extras          json.RawMessage `json:"extras"`
}

type GetContainerRegistryByTypeRow

type GetContainerRegistryByTypeRow struct {
	ID              int32           `json:"id"`
	Name            string          `json:"name"`
	RegistryType    string          `json:"registry_type"`
	EncryptedSecret json.RawMessage `json:"encrypted_secret"`
	NonSecret       json.RawMessage `json:"non_secret"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
	Extras          json.RawMessage `json:"extras"`
}

type GetContainerRegistryRow

type GetContainerRegistryRow struct {
	ID              int32           `json:"id"`
	Name            string          `json:"name"`
	RegistryType    string          `json:"registry_type"`
	EncryptedSecret json.RawMessage `json:"encrypted_secret"`
	NonSecret       json.RawMessage `json:"non_secret"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
	Extras          json.RawMessage `json:"extras"`
}

type GetContainerRegistrySafeRow

type GetContainerRegistrySafeRow struct {
	ID           int32           `json:"id"`
	Name         string          `json:"name"`
	RegistryType string          `json:"registry_type"`
	NonSecret    json.RawMessage `json:"non_secret"`
	CreatedAt    time.Time       `json:"created_at"`
	UpdatedAt    time.Time       `json:"updated_at"`
}

type GetPasswordResetByCodeRow

type GetPasswordResetByCodeRow struct {
	ID        int32     `json:"id"`
	Code      uuid.UUID `json:"code"`
	Expiry    time.Time `json:"expiry"`
	UserID    int64     `json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type GetPasswordResetByIdRow

type GetPasswordResetByIdRow struct {
	ID        int32     `json:"id"`
	Code      uuid.UUID `json:"code"`
	Expiry    time.Time `json:"expiry"`
	UserID    int64     `json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type GetUserByEmailRow

type GetUserByEmailRow struct {
	ID                  int64           `json:"id"`
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	Email               string          `json:"email"`
	RoleID              int32           `json:"role_id"`
	RoleName            string          `json:"role_name"`
	GroupIds            json.RawMessage `json:"group_ids"`
	CompanyID           int32           `json:"company_id"`
	CompanyName         string          `json:"company_name"`
	PasswordHash        string          `json:"password_hash"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
	CreatedAt           time.Time       `json:"created_at"`
	UpdatedAt           time.Time       `json:"updated_at"`
	CompanyNamespace    string          `json:"company_namespace"`
}

type GetUserRow

type GetUserRow struct {
	ID                  int64           `json:"id"`
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	Email               string          `json:"email"`
	RoleID              int32           `json:"role_id"`
	RoleName            string          `json:"role_name"`
	GroupIds            json.RawMessage `json:"group_ids"`
	CompanyID           int32           `json:"company_id"`
	CompanyName         string          `json:"company_name"`
	PasswordHash        string          `json:"password_hash"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
	CreatedAt           time.Time       `json:"created_at"`
	UpdatedAt           time.Time       `json:"updated_at"`
	CompanyNamespace    string          `json:"company_namespace"`
}

type GetUsersByCompanyIDRow

type GetUsersByCompanyIDRow struct {
	ID                  int64           `json:"id"`
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	Email               string          `json:"email"`
	RoleID              int32           `json:"role_id"`
	RoleName            string          `json:"role_name"`
	GroupIds            json.RawMessage `json:"group_ids"`
	CompanyID           int32           `json:"company_id"`
	CompanyName         string          `json:"company_name"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
	CreatedAt           time.Time       `json:"created_at"`
	UpdatedAt           time.Time       `json:"updated_at"`
	CompanyNamespace    string          `json:"company_namespace"`
}

type GetUsersRow

type GetUsersRow struct {
	ID                  int64           `json:"id"`
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	Email               string          `json:"email"`
	RoleID              int32           `json:"role_id"`
	RoleName            string          `json:"role_name"`
	GroupIds            json.RawMessage `json:"group_ids"`
	CompanyID           int32           `json:"company_id"`
	CompanyName         string          `json:"company_name"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
	CreatedAt           time.Time       `json:"created_at"`
	UpdatedAt           time.Time       `json:"updated_at"`
	CompanyNamespace    string          `json:"company_namespace"`
}

type Integration

type Integration struct {
	ID              int32           `json:"id"`
	Resource        string          `json:"resource"`
	Filters         json.RawMessage `json:"filters"`
	IntegrationType string          `json:"integration_type"`
	IntervalMinutes int32           `json:"interval_minutes"`
	LastSentTime    sql.NullTime    `json:"last_sent_time"`
	Config          json.RawMessage `json:"config"`
	ErrorMsg        sql.NullString  `json:"error_msg"`
	CreatedByUserID int64           `json:"created_by_user_id"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
}

type PasswordReset

type PasswordReset struct {
	ID        int32     `json:"id"`
	UserID    int64     `json:"user_id"`
	Code      uuid.UUID `json:"code"`
	Expiry    time.Time `json:"expiry"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CountActiveAdminUsers

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

func (*Queries) CountActiveUsers

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

func (*Queries) CountAuditLogs

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

func (*Queries) CountCompanies

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

func (*Queries) CountContainerRegistry

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

func (*Queries) CountUsers

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

func (*Queries) CreateApiToken

func (q *Queries) CreateApiToken(ctx context.Context, arg CreateApiTokenParams) (ApiToken, error)

func (*Queries) CreateAuditLog

func (q *Queries) CreateAuditLog(ctx context.Context, arg CreateAuditLogParams) error

func (*Queries) CreateCompany

func (q *Queries) CreateCompany(ctx context.Context, arg CreateCompanyParams) (Company, error)

func (*Queries) CreateContainerRegistry

func (q *Queries) CreateContainerRegistry(ctx context.Context, arg CreateContainerRegistryParams) (ContainerRegistry, error)

func (*Queries) CreateIntegration

func (q *Queries) CreateIntegration(ctx context.Context, arg CreateIntegrationParams) (Integration, error)

func (*Queries) CreatePasswordReset

func (q *Queries) CreatePasswordReset(ctx context.Context, arg CreatePasswordResetParams) (PasswordReset, error)

func (*Queries) CreateRole

func (q *Queries) CreateRole(ctx context.Context, name string) (Role, error)

func (*Queries) CreateSchedule

func (q *Queries) CreateSchedule(ctx context.Context, arg CreateScheduleParams) (Scheduler, error)

func (*Queries) CreateSetting

func (q *Queries) CreateSetting(ctx context.Context, arg CreateSettingParams) (Setting, error)

func (*Queries) CreateUser

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

func (*Queries) CreateUserGroup

func (q *Queries) CreateUserGroup(ctx context.Context, arg CreateUserGroupParams) (UserGroup, error)

func (*Queries) CreateUserInvite

func (q *Queries) CreateUserInvite(ctx context.Context, arg CreateUserInviteParams) (UserInvite, error)

func (*Queries) DeleteApiToken

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

func (*Queries) DeleteApiTokensByUserID

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

func (*Queries) DeleteAuditLogsOlderThan30days

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

func (*Queries) DeleteCompany

func (q *Queries) DeleteCompany(ctx context.Context, id int32) error

func (*Queries) DeleteContainerRegistry

func (q *Queries) DeleteContainerRegistry(ctx context.Context, id int32) error

func (*Queries) DeleteCustomSchedule

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

func (*Queries) DeleteIntegration

func (q *Queries) DeleteIntegration(ctx context.Context, id int32) error

func (*Queries) DeleteIntegrationByUserID

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

func (*Queries) DeletePasswordResetByExpiry

func (q *Queries) DeletePasswordResetByExpiry(ctx context.Context) error

func (*Queries) DeletePasswordResetByUserEmail

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

func (*Queries) DeleteSchedule

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

func (*Queries) DeleteSettingByID

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

func (*Queries) DeleteUser

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

func (*Queries) DeleteUserInviteByExpiry

func (q *Queries) DeleteUserInviteByExpiry(ctx context.Context) error

func (*Queries) DeleteUserInviteByUserID

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

func (*Queries) GetActiveSchedules

func (q *Queries) GetActiveSchedules(ctx context.Context) ([]Scheduler, error)

func (*Queries) GetActiveUsers

func (q *Queries) GetActiveUsers(ctx context.Context) ([]GetActiveUsersRow, error)

func (*Queries) GetActiveUsersByCompanyID

func (q *Queries) GetActiveUsersByCompanyID(ctx context.Context, companyID int32) ([]GetActiveUsersByCompanyIDRow, error)

func (*Queries) GetApiToken

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

func (*Queries) GetApiTokenByActiveUser

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

func (*Queries) GetApiTokenByToken

func (q *Queries) GetApiTokenByToken(ctx context.Context, apiToken uuid.UUID) (GetApiTokenByTokenRow, error)

func (*Queries) GetApiTokens

func (q *Queries) GetApiTokens(ctx context.Context, companyID int32) ([]ApiToken, error)

func (*Queries) GetApiTokensByUser

func (q *Queries) GetApiTokensByUser(ctx context.Context, createdByUserID int64) ([]ApiToken, error)

func (*Queries) GetAuditLogs

func (q *Queries) GetAuditLogs(ctx context.Context, arg GetAuditLogsParams) ([]GetAuditLogsRow, error)

func (*Queries) GetAuditLogsLast5Minutes

func (q *Queries) GetAuditLogsLast5Minutes(ctx context.Context) ([]GetAuditLogsLast5MinutesRow, error)

func (*Queries) GetCompanies

func (q *Queries) GetCompanies(ctx context.Context) ([]Company, error)

func (*Queries) GetCompany

func (q *Queries) GetCompany(ctx context.Context, id int32) (Company, error)

func (*Queries) GetCompanyByDomain

func (q *Queries) GetCompanyByDomain(ctx context.Context, emailDomain string) (Company, error)

func (*Queries) GetContainerRegistries

func (q *Queries) GetContainerRegistries(ctx context.Context) ([]GetContainerRegistriesRow, error)

func (*Queries) GetContainerRegistriesSafe

func (q *Queries) GetContainerRegistriesSafe(ctx context.Context) ([]GetContainerRegistriesSafeRow, error)

func (*Queries) GetContainerRegistry

func (q *Queries) GetContainerRegistry(ctx context.Context, id int32) (GetContainerRegistryRow, error)

func (*Queries) GetContainerRegistryByType

func (q *Queries) GetContainerRegistryByType(ctx context.Context, registryType string) ([]GetContainerRegistryByTypeRow, error)

func (*Queries) GetContainerRegistrySafe

func (q *Queries) GetContainerRegistrySafe(ctx context.Context, id int32) (GetContainerRegistrySafeRow, error)

func (*Queries) GetIntegrationFromID

func (q *Queries) GetIntegrationFromID(ctx context.Context, id int32) (Integration, error)

func (*Queries) GetIntegrations

func (q *Queries) GetIntegrations(ctx context.Context) ([]Integration, error)

func (*Queries) GetIntegrationsFromType

func (q *Queries) GetIntegrationsFromType(ctx context.Context, integrationType string) ([]Integration, error)

func (*Queries) GetPasswordHash

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

func (*Queries) GetPasswordResetByCode

func (q *Queries) GetPasswordResetByCode(ctx context.Context, code uuid.UUID) (GetPasswordResetByCodeRow, error)

func (*Queries) GetPasswordResetById

func (q *Queries) GetPasswordResetById(ctx context.Context, id int32) (GetPasswordResetByIdRow, error)

func (*Queries) GetRoleByID

func (q *Queries) GetRoleByID(ctx context.Context, id int32) (Role, error)

func (*Queries) GetRoleByName

func (q *Queries) GetRoleByName(ctx context.Context, name string) (Role, error)

func (*Queries) GetRoles

func (q *Queries) GetRoles(ctx context.Context) ([]Role, error)

func (*Queries) GetSchedule

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

func (*Queries) GetSchedules

func (q *Queries) GetSchedules(ctx context.Context) ([]Scheduler, error)

func (*Queries) GetSetting

func (q *Queries) GetSetting(ctx context.Context, key string) (Setting, error)

func (*Queries) GetSettings

func (q *Queries) GetSettings(ctx context.Context) ([]Setting, error)

func (*Queries) GetUser

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

func (*Queries) GetUserByEmail

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

func (*Queries) GetUserGroupByID

func (q *Queries) GetUserGroupByID(ctx context.Context, id int32) (UserGroup, error)

func (*Queries) GetUserGroups

func (q *Queries) GetUserGroups(ctx context.Context, companyID int32) ([]UserGroup, error)

func (*Queries) GetUserInviteByCode

func (q *Queries) GetUserInviteByCode(ctx context.Context, code uuid.UUID) (UserInvite, error)

func (*Queries) GetUserInviteByEmail

func (q *Queries) GetUserInviteByEmail(ctx context.Context, email string) (UserInvite, error)

func (*Queries) GetUsers

func (q *Queries) GetUsers(ctx context.Context) ([]GetUsersRow, error)

func (*Queries) GetUsersByCompanyID

func (q *Queries) GetUsersByCompanyID(ctx context.Context, companyID int32) ([]GetUsersByCompanyIDRow, error)

func (*Queries) GetVisibleSettings

func (q *Queries) GetVisibleSettings(ctx context.Context) ([]Setting, error)

func (*Queries) UpdateContainerRegistry

func (q *Queries) UpdateContainerRegistry(ctx context.Context, arg UpdateContainerRegistryParams) (ContainerRegistry, error)

func (*Queries) UpdateIntegrationStatus

func (q *Queries) UpdateIntegrationStatus(ctx context.Context, arg UpdateIntegrationStatusParams) error

func (*Queries) UpdatePassword

func (q *Queries) UpdatePassword(ctx context.Context, arg UpdatePasswordParams) error

func (*Queries) UpdateSchedule

func (q *Queries) UpdateSchedule(ctx context.Context, arg UpdateScheduleParams) error

func (*Queries) UpdateScheduleStatus

func (q *Queries) UpdateScheduleStatus(ctx context.Context, arg UpdateScheduleStatusParams) error

func (*Queries) UpdateSetting

func (q *Queries) UpdateSetting(ctx context.Context, arg UpdateSettingParams) error

func (*Queries) UpdateSettingById

func (q *Queries) UpdateSettingById(ctx context.Context, arg UpdateSettingByIdParams) error

func (*Queries) UpdateUser

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

func (*Queries) UpdateUserInvite

func (q *Queries) UpdateUserInvite(ctx context.Context, arg UpdateUserInviteParams) (UserInvite, error)

func (*Queries) WithTx

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

type Role

type Role struct {
	ID        int32     `json:"id"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Scheduler

type Scheduler struct {
	ID          int64           `json:"id"`
	Action      string          `json:"action"`
	Description string          `json:"description"`
	CronExpr    string          `json:"cron_expr"`
	Payload     json.RawMessage `json:"payload"`
	IsEnabled   bool            `json:"is_enabled"`
	IsSystem    bool            `json:"is_system"`
	Status      string          `json:"status"`
	LastRanAt   sql.NullTime    `json:"last_ran_at"`
	CreatedAt   time.Time       `json:"created_at"`
	UpdatedAt   time.Time       `json:"updated_at"`
}

type Setting

type Setting struct {
	ID            int64           `json:"id"`
	Key           string          `json:"key"`
	Value         json.RawMessage `json:"value"`
	IsVisibleOnUi bool            `json:"is_visible_on_ui"`
	CreatedAt     time.Time       `json:"created_at"`
	UpdatedAt     time.Time       `json:"updated_at"`
}

type UpdateContainerRegistryParams

type UpdateContainerRegistryParams struct {
	Name            string          `json:"name"`
	RegistryType    string          `json:"registry_type"`
	EncryptedSecret json.RawMessage `json:"encrypted_secret"`
	NonSecret       json.RawMessage `json:"non_secret"`
	Extras          json.RawMessage `json:"extras"`
	ID              int32           `json:"id"`
}

type UpdateIntegrationStatusParams

type UpdateIntegrationStatusParams struct {
	ID       int32          `json:"id"`
	ErrorMsg sql.NullString `json:"error_msg"`
}

type UpdatePasswordParams

type UpdatePasswordParams struct {
	PasswordHash string `json:"password_hash"`
	ID           int64  `json:"id"`
}

type UpdateScheduleParams

type UpdateScheduleParams struct {
	Description string          `json:"description"`
	CronExpr    string          `json:"cron_expr"`
	Payload     json.RawMessage `json:"payload"`
	IsEnabled   bool            `json:"is_enabled"`
	Status      string          `json:"status"`
	ID          int64           `json:"id"`
}

type UpdateScheduleStatusParams

type UpdateScheduleStatusParams struct {
	Status string `json:"status"`
	ID     int64  `json:"id"`
}

type UpdateSettingByIdParams

type UpdateSettingByIdParams struct {
	Value         json.RawMessage `json:"value"`
	IsVisibleOnUi bool            `json:"is_visible_on_ui"`
	ID            int64           `json:"id"`
}

type UpdateSettingParams

type UpdateSettingParams struct {
	Value         json.RawMessage `json:"value"`
	IsVisibleOnUi bool            `json:"is_visible_on_ui"`
	Key           string          `json:"key"`
}

type UpdateUserInviteParams

type UpdateUserInviteParams struct {
	Code            uuid.UUID `json:"code"`
	CreatedByUserID int64     `json:"created_by_user_id"`
	RoleID          int32     `json:"role_id"`
	CompanyID       int32     `json:"company_id"`
	Accepted        bool      `json:"accepted"`
	Expiry          time.Time `json:"expiry"`
	ID              int32     `json:"id"`
}

type UpdateUserParams

type UpdateUserParams struct {
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	RoleID              int32           `json:"role_id"`
	GroupIds            json.RawMessage `json:"group_ids"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
	ID                  int64           `json:"id"`
}

type User

type User struct {
	ID                  int64           `json:"id"`
	FirstName           string          `json:"first_name"`
	LastName            string          `json:"last_name"`
	Email               string          `json:"email"`
	RoleID              int32           `json:"role_id"`
	GroupIds            json.RawMessage `json:"group_ids"`
	CompanyID           int32           `json:"company_id"`
	PasswordHash        string          `json:"password_hash"`
	IsActive            bool            `json:"is_active"`
	PasswordInvalidated bool            `json:"password_invalidated"`
	CreatedAt           time.Time       `json:"created_at"`
	UpdatedAt           time.Time       `json:"updated_at"`
}

type UserGroup

type UserGroup struct {
	ID        int32     `json:"id"`
	Name      string    `json:"name"`
	IsSystem  bool      `json:"is_system"`
	CompanyID int32     `json:"company_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type UserInvite

type UserInvite struct {
	ID              int32     `json:"id"`
	Email           string    `json:"email"`
	Code            uuid.UUID `json:"code"`
	CreatedByUserID int64     `json:"created_by_user_id"`
	RoleID          int32     `json:"role_id"`
	CompanyID       int32     `json:"company_id"`
	Accepted        bool      `json:"accepted"`
	Expiry          time.Time `json:"expiry"`
	CreatedAt       time.Time `json:"created_at"`
	UpdatedAt       time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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