db

package
v0.23.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MPL-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package db package

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrOptimisticLockError is used for optimistic lock exceptions
	ErrOptimisticLockError = te.New(
		"resource version does not match specified version",
		te.WithErrorCode(te.EOptimisticLock),
	)
	// ErrInvalidID is used for invalid resource UUIDs
	ErrInvalidID = te.New(
		"invalid id: the id must be a valid uuid",
		te.WithErrorCode(te.EInvalid),
	)
)

Functions

This section is empty.

Types

type ActivityEventFilter

type ActivityEventFilter struct {
	TimeRangeEnd                   *time.Time
	UserID                         *string
	ServiceAccountID               *string
	NamespacePath                  *string
	TimeRangeStart                 *time.Time
	NamespaceMembershipRequirement *ActivityEventNamespaceMembershipRequirement
	ActivityEventIDs               []string
	Actions                        []models.ActivityEventAction
	TargetTypes                    []models.ActivityEventTargetType
	IncludeNested                  bool
}

ActivityEventFilter contains the supported fields for filtering activity event resources

type ActivityEventNamespaceMembershipRequirement

type ActivityEventNamespaceMembershipRequirement struct {
	UserID           *string
	ServiceAccountID *string
}

ActivityEventNamespaceMembershipRequirement specifies the namespace requirements for returning activity events

type ActivityEventSortableField

type ActivityEventSortableField string

ActivityEventSortableField represents the fields that an activity event can be sorted by

const (
	ActivityEventSortableFieldCreatedAtAsc      ActivityEventSortableField = "CREATED_ASC"
	ActivityEventSortableFieldCreatedAtDesc     ActivityEventSortableField = "CREATED_DESC"
	ActivityEventSortableFieldNamespacePathAsc  ActivityEventSortableField = "NAMESPACE_PATH_ASC"
	ActivityEventSortableFieldNamespacePathDesc ActivityEventSortableField = "NAMESPACE_PATH_DESC"
	ActivityEventSortableFieldActionAsc         ActivityEventSortableField = "ACTION_ASC"
	ActivityEventSortableFieldActionDesc        ActivityEventSortableField = "ACTION_DESC"
)

ActivityEventSortableField constants

type ActivityEvents

type ActivityEvents interface {
	GetActivityEvents(ctx context.Context, input *GetActivityEventsInput) (*ActivityEventsResult, error)
	CreateActivityEvent(ctx context.Context, input *models.ActivityEvent) (*models.ActivityEvent, error)
}

ActivityEvents encapsulates the logic to access activity events from the database

func NewActivityEvents

func NewActivityEvents(dbClient *Client) ActivityEvents

NewActivityEvents returns an instance of the ActivityEvents interface

type ActivityEventsResult

type ActivityEventsResult struct {
	PageInfo       *pagination.PageInfo
	ActivityEvents []models.ActivityEvent
}

ActivityEventsResult contains the response data and page information

type Applies

type Applies interface {
	// GetApply returns a apply by ID
	GetApply(ctx context.Context, id string) (*models.Apply, error)
	// GetApplies returns a list of applies
	GetApplies(ctx context.Context, input *GetAppliesInput) (*AppliesResult, error)
	// CreateApply will create a new apply
	CreateApply(ctx context.Context, apply *models.Apply) (*models.Apply, error)
	// UpdateApply updates an existing apply
	UpdateApply(ctx context.Context, apply *models.Apply) (*models.Apply, error)
}

Applies encapsulates the logic to access applies from the database

func NewApplies

func NewApplies(dbClient *Client) Applies

NewApplies returns an instance of the Apply interface

type AppliesResult

type AppliesResult struct {
	PageInfo *pagination.PageInfo
	Applies  []models.Apply
}

AppliesResult contains the response data and page information

type ApplyFilter

type ApplyFilter struct {
	ApplyIDs []string
}

ApplyFilter contains the supported fields for filtering Apply resources

type ApplySortableField

type ApplySortableField string

ApplySortableField represents the fields that an apply can be sorted by

const (
	ApplySortableFieldUpdatedAtAsc  ApplySortableField = "UPDATED_AT_ASC"
	ApplySortableFieldUpdatedAtDesc ApplySortableField = "UPDATED_AT_DESC"
)

ApplySortableField constants

type Client

type Client struct {
	Events                           Events
	Groups                           Groups
	Runs                             Runs
	Jobs                             Jobs
	Plans                            Plans
	Applies                          Applies
	ConfigurationVersions            ConfigurationVersions
	StateVersionOutputs              StateVersionOutputs
	Workspaces                       Workspaces
	StateVersions                    StateVersions
	ManagedIdentities                ManagedIdentities
	ServiceAccounts                  ServiceAccounts
	Users                            Users
	NamespaceMemberships             NamespaceMemberships
	Teams                            Teams
	TeamMembers                      TeamMembers
	Transactions                     Transactions
	Variables                        Variables
	TerraformProviders               TerraformProviders
	TerraformProviderVersions        TerraformProviderVersions
	TerraformProviderPlatforms       TerraformProviderPlatforms
	TerraformModules                 TerraformModules
	TerraformModuleVersions          TerraformModuleVersions
	TerraformModuleAttestations      TerraformModuleAttestations
	GPGKeys                          GPGKeys
	SCIMTokens                       SCIMTokens
	VCSProviders                     VCSProviders
	WorkspaceVCSProviderLinks        WorkspaceVCSProviderLinks
	ActivityEvents                   ActivityEvents
	VCSEvents                        VCSEvents
	Roles                            Roles
	Runners                          Runners
	ResourceLimits                   ResourceLimits
	TerraformProviderVersionMirrors  TerraformProviderVersionMirrors
	TerraformProviderPlatformMirrors TerraformProviderPlatformMirrors
	MaintenanceModes                 MaintenanceModes
	LogStreams                       LogStreams
	RunnerSessions                   RunnerSessions
	// contains filtered or unexported fields
}

Client acts as a facade for the database

func NewClient

func NewClient(
	ctx context.Context,
	dbHost string,
	dbPort int,
	dbName string,
	dbSslMode string,
	dbUsername string,
	dbPassword string,
	dbMaxConnections int,
	dbAutoMigrateEnabled bool,
	logger logger.Logger,
) (*Client, error)

NewClient creates a new Client

func (*Client) Close

func (db *Client) Close(_ context.Context)

Close will close the database connections

func (*Client) RetryOnOLE added in v0.17.0

func (db *Client) RetryOnOLE(ctx context.Context, fn func() error) error

RetryOnOLE will retry the given function if an optimistic lock error occurs

type ConfigurationVersionFilter

type ConfigurationVersionFilter struct {
	ConfigurationVersionIDs []string
}

ConfigurationVersionFilter contains the supported fields for filtering ConfigurationVersion resources

type ConfigurationVersionSortableField

type ConfigurationVersionSortableField string

ConfigurationVersionSortableField represents the fields that a list of configuration versions can be sorted by

const (
	ConfigurationVersionSortableFieldUpdatedAtAsc  ConfigurationVersionSortableField = "UPDATED_AT_ASC"
	ConfigurationVersionSortableFieldUpdatedAtDesc ConfigurationVersionSortableField = "UPDATED_AT_DESC"
)

ConfigurationVersionSortableField constants

type ConfigurationVersions

type ConfigurationVersions interface {
	GetConfigurationVersions(ctx context.Context, input *GetConfigurationVersionsInput) (*ConfigurationVersionsResult, error)
	// GetConfigurationVersion returns a configuration version
	GetConfigurationVersion(ctx context.Context, id string) (*models.ConfigurationVersion, error)
	// CreateConfigurationVersion creates a new configuration version
	CreateConfigurationVersion(ctx context.Context, configurationVersion models.ConfigurationVersion) (*models.ConfigurationVersion, error)
	// UpdateConfigurationVersion updates a configuration version in the database
	UpdateConfigurationVersion(ctx context.Context, configurationVersion models.ConfigurationVersion) (*models.ConfigurationVersion, error)
}

ConfigurationVersions encapsulates the logic to access configuration version from the database

func NewConfigurationVersions

func NewConfigurationVersions(dbClient *Client) ConfigurationVersions

NewConfigurationVersions returns an instance of the ConfigurationVersions interface

type ConfigurationVersionsResult

type ConfigurationVersionsResult struct {
	PageInfo              *pagination.PageInfo
	ConfigurationVersions []models.ConfigurationVersion
}

ConfigurationVersionsResult contains the response data and page information

type CreateNamespaceMembershipInput

type CreateNamespaceMembershipInput struct {
	UserID           *string
	ServiceAccountID *string
	TeamID           *string
	NamespacePath    string
	RoleID           string
}

CreateNamespaceMembershipInput is the input for creating a new namespace membership

type Event

type Event struct {
	Table  string `json:"table"`
	Action string `json:"action"`
	ID     string `json:"id"`
}

Event contains information related to the database row that was changed

type Events

type Events interface {
	// Listen for async events from the database
	Listen(ctx context.Context) (<-chan Event, <-chan error)
}

Events provides the ability to listen for async events from the database

func NewEvents

func NewEvents(dbClient *Client) Events

NewEvents returns an instance of the Events interface

type GPGKeyFilter

type GPGKeyFilter struct {
	GPGKeyID       *uint64
	KeyIDs         []string
	NamespacePaths []string
}

GPGKeyFilter contains the supported fields for filtering GPGKey resources

type GPGKeySortableField

type GPGKeySortableField string

GPGKeySortableField represents the fields that a gpg key can be sorted by

const (
	GPGKeySortableFieldUpdatedAtAsc   GPGKeySortableField = "UPDATED_AT_ASC"
	GPGKeySortableFieldUpdatedAtDesc  GPGKeySortableField = "UPDATED_AT_DESC"
	GPGKeySortableFieldGroupLevelAsc  GPGKeySortableField = "GROUP_LEVEL_ASC"
	GPGKeySortableFieldGroupLevelDesc GPGKeySortableField = "GROUP_LEVEL_DESC"
)

GPGKeySortableField constants

type GPGKeys

type GPGKeys interface {
	GetGPGKeyByID(ctx context.Context, id string) (*models.GPGKey, error)
	GetGPGKeys(ctx context.Context, input *GetGPGKeysInput) (*GPGKeysResult, error)
	CreateGPGKey(ctx context.Context, gpgKey *models.GPGKey) (*models.GPGKey, error)
	DeleteGPGKey(ctx context.Context, gpgKey *models.GPGKey) error
}

GPGKeys encapsulates the logic to access gpg keys from the database

func NewGPGKeys

func NewGPGKeys(dbClient *Client) GPGKeys

NewGPGKeys returns an instance of the GPGKeys interface

type GPGKeysResult

type GPGKeysResult struct {
	PageInfo *pagination.PageInfo
	GPGKeys  []models.GPGKey
}

GPGKeysResult contains the response data and page information

type GetActivityEventsInput

type GetActivityEventsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *ActivityEventSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter contains the supported fields for filtering ActivityEvent resources
	Filter *ActivityEventFilter
}

GetActivityEventsInput is the input for listing activity events

type GetAppliesInput

type GetAppliesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *ApplySortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *ApplyFilter
}

GetAppliesInput is the input for listing workspaces

type GetConfigurationVersionsInput

type GetConfigurationVersionsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *ConfigurationVersionSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *ConfigurationVersionFilter
}

GetConfigurationVersionsInput is the input for listing configuration versions

type GetGPGKeysInput

type GetGPGKeysInput struct {
	// Sort specifies the field to sort on and direction
	Sort *GPGKeySortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *GPGKeyFilter
}

GetGPGKeysInput is the input for listing GPG keys

type GetGroupsInput

type GetGroupsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *GroupSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *GroupFilter
}

GetGroupsInput is the input for listing groups

type GetJobsInput

type GetJobsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *JobSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *JobFilter
}

GetJobsInput is the input for listing jobs

type GetLogStreamsInput added in v0.17.0

type GetLogStreamsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *LogStreamSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *LogStreamFilter
}

GetLogStreamsInput is the input for listing log streams

type GetManagedIdentitiesInput

type GetManagedIdentitiesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *ManagedIdentitySortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *ManagedIdentityFilter
}

GetManagedIdentitiesInput is the input for listing managed identities

type GetManagedIdentityAccessRulesInput

type GetManagedIdentityAccessRulesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *ManagedIdentityAccessRuleSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *ManagedIdentityAccessRuleFilter
}

GetManagedIdentityAccessRulesInput is the input for listing managed identity access rules

type GetModuleAttestationsInput

type GetModuleAttestationsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformModuleAttestationSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TerraformModuleAttestationFilter
}

GetModuleAttestationsInput is the input for listing terraform moduleAttestations

type GetModuleVersionsInput

type GetModuleVersionsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformModuleVersionSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TerraformModuleVersionFilter
}

GetModuleVersionsInput is the input for listing terraform module versions

type GetModulesInput

type GetModulesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformModuleSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TerraformModuleFilter
}

GetModulesInput is the input for listing terraform modules

type GetNamespaceMembershipsInput

type GetNamespaceMembershipsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *NamespaceMembershipSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *NamespaceMembershipFilter
}

GetNamespaceMembershipsInput is the input for listing namespace memberships

type GetPlansInput

type GetPlansInput struct {
	// Sort specifies the field to sort on and direction
	Sort *PlanSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *PlanFilter
}

GetPlansInput is the input for listing workspaces

type GetProviderPlatformMirrorsInput added in v0.12.0

type GetProviderPlatformMirrorsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformProviderPlatformMirrorSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TerraformProviderPlatformMirrorFilter
}

GetProviderPlatformMirrorsInput is the input for listing TerraformProviderPlatformMirror.

type GetProviderPlatformsInput

type GetProviderPlatformsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformProviderPlatformSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TerraformProviderPlatformFilter
}

GetProviderPlatformsInput is the input for listing terraform provider platforms

type GetProviderVersionMirrorsInput added in v0.12.0

type GetProviderVersionMirrorsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformProviderVersionMirrorSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TerraformProviderVersionMirrorFilter
}

GetProviderVersionMirrorsInput is the input for listing TerraformProviderVersionMirrors.

type GetProviderVersionsInput

type GetProviderVersionsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformProviderVersionSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TerraformProviderVersionFilter
}

GetProviderVersionsInput is the input for listing terraform provider versions

type GetProvidersInput

type GetProvidersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformProviderSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TerraformProviderFilter
}

GetProvidersInput is the input for listing terraform providers

type GetRolesInput added in v0.9.0

type GetRolesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *RoleSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *RoleFilter
}

GetRolesInput is the input for listing roles

type GetRunnerSessionsInput added in v0.17.0

type GetRunnerSessionsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *RunnerSessionSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *RunnerSessionFilter
}

GetRunnerSessionsInput is the input for listing sessions

type GetRunnersInput added in v0.8.0

type GetRunnersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *RunnerSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *RunnerFilter
}

GetRunnersInput is the input for listing runners

type GetRunsInput

type GetRunsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *RunSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *RunFilter
}

GetRunsInput is the input for listing runs

type GetServiceAccountsInput

type GetServiceAccountsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *ServiceAccountSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *ServiceAccountFilter
}

GetServiceAccountsInput is the input for listing service accounts

type GetStateVersionsInput

type GetStateVersionsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *StateVersionSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *StateVersionFilter
}

GetStateVersionsInput is the input for listing state versions

type GetTeamMembersInput

type GetTeamMembersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TeamMemberSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TeamMemberFilter
}

GetTeamMembersInput is the input for listing team members

type GetTeamsInput

type GetTeamsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TeamSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *TeamFilter
}

GetTeamsInput is the input for listing teams

type GetUsersInput

type GetUsersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *UserSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *UserFilter
}

GetUsersInput is the input for listing users

type GetVCSEventsInput

type GetVCSEventsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *VCSEventSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter contains the supported fields for filtering VCSEvent resources
	Filter *VCSEventFilter
}

GetVCSEventsInput is the input for listing vcs events

type GetVCSProvidersInput

type GetVCSProvidersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *VCSProviderSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *VCSProviderFilter
}

GetVCSProvidersInput is the input for listing VCS providers.

type GetVariablesInput

type GetVariablesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *VariableSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *VariableFilter
}

GetVariablesInput is the input for listing variables

type GetWorkspacesInput

type GetWorkspacesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *WorkspaceSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Filter is used to filter the results
	Filter *WorkspaceFilter
}

GetWorkspacesInput is the input for listing workspaces

type GroupFilter

type GroupFilter struct {
	ParentID               *string
	UserMemberID           *string
	ServiceAccountMemberID *string
	Search                 *string
	GroupIDs               []string
	NamespaceIDs           []string
	RootOnly               bool
}

GroupFilter contains the supported fields for filtering Group resources

type GroupSortableField

type GroupSortableField string

GroupSortableField represents the fields that a group can be sorted by

const (
	GroupSortableFieldFullPathAsc    GroupSortableField = "FULL_PATH_ASC"
	GroupSortableFieldFullPathDesc   GroupSortableField = "FULL_PATH_DESC"
	GroupSortableFieldGroupLevelAsc  GroupSortableField = "GROUP_LEVEL_ASC"
	GroupSortableFieldGroupLevelDesc GroupSortableField = "GROUP_LEVEL_DESC"
)

GroupSortableField constants

type Groups

type Groups interface {
	// GetGroupByID returns a group by ID
	GetGroupByID(ctx context.Context, id string) (*models.Group, error)
	// GetGroupByFullPath returns a group by full path
	GetGroupByFullPath(ctx context.Context, path string) (*models.Group, error)
	// DeleteGroup deletes a group
	DeleteGroup(ctx context.Context, group *models.Group) error
	// GetGroups returns a list of groups
	GetGroups(ctx context.Context, input *GetGroupsInput) (*GroupsResult, error)
	// CreateGroup creates a new group
	CreateGroup(ctx context.Context, group *models.Group) (*models.Group, error)
	// UpdateGroup updates an existing group
	UpdateGroup(ctx context.Context, group *models.Group) (*models.Group, error)
	// GetChildDepth returns the depth of tree containing this group and its descendants.
	GetChildDepth(ctx context.Context, group *models.Group) (int, error)
	// MigrateGroup re-parents an existing group
	MigrateGroup(ctx context.Context, group, newParentGroup *models.Group) (*models.Group, error)
}

Groups encapsulates the logic to access groups from the database

func NewGroups

func NewGroups(dbClient *Client) Groups

NewGroups returns an instance of the Groups interface

type GroupsResult

type GroupsResult struct {
	PageInfo *pagination.PageInfo
	Groups   []models.Group
}

GroupsResult contains the response data and page information

type JobFilter

type JobFilter struct {
	RunID       *string
	WorkspaceID *string
	RunnerID    *string
	JobType     *models.JobType
	JobStatus   *models.JobStatus
	JobIDs      []string
}

JobFilter contains the supported fields for filtering Job resources

type JobSortableField

type JobSortableField string

JobSortableField represents the fields that a job can be sorted by

const (
	JobSortableFieldCreatedAtAsc  JobSortableField = "CREATED_AT_ASC"
	JobSortableFieldCreatedAtDesc JobSortableField = "CREATED_AT_DESC"
	JobSortableFieldUpdatedAtAsc  JobSortableField = "UPDATED_AT_ASC"
	JobSortableFieldUpdatedAtDesc JobSortableField = "UPDATED_AT_DESC"
)

GroupSortableField constants

type Jobs

type Jobs interface {
	GetJobByID(ctx context.Context, id string) (*models.Job, error)
	GetLatestJobByType(ctx context.Context, runID string, jobType models.JobType) (*models.Job, error)
	GetJobs(ctx context.Context, input *GetJobsInput) (*JobsResult, error)
	UpdateJob(ctx context.Context, job *models.Job) (*models.Job, error)
	CreateJob(ctx context.Context, job *models.Job) (*models.Job, error)
	GetJobCountForRunner(ctx context.Context, runnerID string) (int, error)
}

Jobs encapsulates the logic to access jobs from the database

func NewJobs

func NewJobs(dbClient *Client) Jobs

NewJobs returns an instance of the Jobs interface

type JobsResult

type JobsResult struct {
	PageInfo *pagination.PageInfo
	Jobs     []models.Job
}

JobsResult contains the response data and page information

type LogStreamFilter added in v0.17.0

type LogStreamFilter struct {
	RunnerSessionIDs []string
	JobIDs           []string
}

LogStreamFilter contains the supported fields for filtering log stream resources

type LogStreamSortableField added in v0.17.0

type LogStreamSortableField string

LogStreamSortableField represents the fields that a log stream can be sorted by

const (
	LogStreamSortableFieldUpdatedAtAsc  LogStreamSortableField = "UPDATED_AT_ASC"
	LogStreamSortableFieldUpdatedAtDesc LogStreamSortableField = "UPDATED_AT_DESC"
)

LogStreamSortableField constants

type LogStreams added in v0.17.0

type LogStreams interface {
	GetLogStreamByID(ctx context.Context, id string) (*models.LogStream, error)
	GetLogStreamByJobID(ctx context.Context, jobID string) (*models.LogStream, error)
	GetLogStreamByRunnerSessionID(ctx context.Context, sessionID string) (*models.LogStream, error)
	GetLogStreams(ctx context.Context, input *GetLogStreamsInput) (*LogStreamsResult, error)
	CreateLogStream(ctx context.Context, logStream *models.LogStream) (*models.LogStream, error)
	UpdateLogStream(ctx context.Context, logStream *models.LogStream) (*models.LogStream, error)
}

LogStreams encapsulates the logic to access LogStreams from the database

func NewLogStreams added in v0.17.0

func NewLogStreams(dbClient *Client) LogStreams

NewLogStreams returns an instance of the LogStreams interface

type LogStreamsResult added in v0.17.0

type LogStreamsResult struct {
	PageInfo   *pagination.PageInfo
	LogStreams []models.LogStream
}

LogStreamsResult contains the response data and page information

type MaintenanceModes added in v0.17.0

type MaintenanceModes interface {
	GetMaintenanceMode(ctx context.Context) (*models.MaintenanceMode, error)
	CreateMaintenanceMode(ctx context.Context, mode *models.MaintenanceMode) (*models.MaintenanceMode, error)
	DeleteMaintenanceMode(ctx context.Context, mode *models.MaintenanceMode) error
}

MaintenanceModes encapsulates the logic to access maintenance modes from the database

func NewMaintenanceModes added in v0.17.0

func NewMaintenanceModes(dbClient *Client) MaintenanceModes

NewMaintenanceModes returns an instance of the MaintenanceModes interface.

type ManagedIdentities

type ManagedIdentities interface {
	GetManagedIdentityByID(ctx context.Context, id string) (*models.ManagedIdentity, error)
	GetManagedIdentityByPath(ctx context.Context, path string) (*models.ManagedIdentity, error)
	GetManagedIdentitiesForWorkspace(ctx context.Context, workspaceID string) ([]models.ManagedIdentity, error)
	AddManagedIdentityToWorkspace(ctx context.Context, managedIdentityID string, workspaceID string) error
	RemoveManagedIdentityFromWorkspace(ctx context.Context, managedIdentityID string, workspaceID string) error
	CreateManagedIdentity(ctx context.Context, managedIdentity *models.ManagedIdentity) (*models.ManagedIdentity, error)
	UpdateManagedIdentity(ctx context.Context, managedIdentity *models.ManagedIdentity) (*models.ManagedIdentity, error)
	GetManagedIdentities(ctx context.Context, input *GetManagedIdentitiesInput) (*ManagedIdentitiesResult, error)
	DeleteManagedIdentity(ctx context.Context, managedIdentity *models.ManagedIdentity) error
	GetManagedIdentityAccessRules(ctx context.Context, input *GetManagedIdentityAccessRulesInput) (*ManagedIdentityAccessRulesResult, error)
	GetManagedIdentityAccessRule(ctx context.Context, ruleID string) (*models.ManagedIdentityAccessRule, error)
	CreateManagedIdentityAccessRule(ctx context.Context, rule *models.ManagedIdentityAccessRule) (*models.ManagedIdentityAccessRule, error)
	UpdateManagedIdentityAccessRule(ctx context.Context, rule *models.ManagedIdentityAccessRule) (*models.ManagedIdentityAccessRule, error)
	DeleteManagedIdentityAccessRule(ctx context.Context, rule *models.ManagedIdentityAccessRule) error
}

ManagedIdentities encapsulates the logic to access managed identities from the database

func NewManagedIdentities

func NewManagedIdentities(dbClient *Client) ManagedIdentities

NewManagedIdentities returns an instance of the ManagedIdentity interface

type ManagedIdentitiesResult

type ManagedIdentitiesResult struct {
	PageInfo          *pagination.PageInfo
	ManagedIdentities []models.ManagedIdentity
}

ManagedIdentitiesResult contains the response data and page information

type ManagedIdentityAccessRuleFilter

type ManagedIdentityAccessRuleFilter struct {
	ManagedIdentityID            *string
	ManagedIdentityAccessRuleIDs []string
}

ManagedIdentityAccessRuleFilter contains the supported fields for filtering ManagedIdentityAccessRule resources

type ManagedIdentityAccessRuleSortableField

type ManagedIdentityAccessRuleSortableField string

ManagedIdentityAccessRuleSortableField represents the fields that a managed identity access rule can be sorted by

type ManagedIdentityAccessRulesResult

type ManagedIdentityAccessRulesResult struct {
	PageInfo                   *pagination.PageInfo
	ManagedIdentityAccessRules []models.ManagedIdentityAccessRule
}

ManagedIdentityAccessRulesResult contains the response data and page information

type ManagedIdentityFilter

type ManagedIdentityFilter struct {
	Search             *string
	AliasSourceID      *string
	NamespacePaths     []string
	ManagedIdentityIDs []string
}

ManagedIdentityFilter contains the supported fields for filtering ManagedIdentity resources

type ManagedIdentitySortableField

type ManagedIdentitySortableField string

ManagedIdentitySortableField represents the fields that a managed identity can be sorted by

const (
	ManagedIdentitySortableFieldCreatedAtAsc   ManagedIdentitySortableField = "CREATED_AT_ASC"
	ManagedIdentitySortableFieldCreatedAtDesc  ManagedIdentitySortableField = "CREATED_AT_DESC"
	ManagedIdentitySortableFieldUpdatedAtAsc   ManagedIdentitySortableField = "UPDATED_AT_ASC"
	ManagedIdentitySortableFieldUpdatedAtDesc  ManagedIdentitySortableField = "UPDATED_AT_DESC"
	ManagedIdentitySortableFieldGroupLevelAsc  ManagedIdentitySortableField = "GROUP_LEVEL_ASC"
	ManagedIdentitySortableFieldGroupLevelDesc ManagedIdentitySortableField = "GROUP_LEVEL_DESC"
)

ManagedIdentitySortableField constants

type MockActivityEvents

type MockActivityEvents struct {
	mock.Mock
}

MockActivityEvents is an autogenerated mock type for the ActivityEvents type

func NewMockActivityEvents

func NewMockActivityEvents(t mockConstructorTestingTNewMockActivityEvents) *MockActivityEvents

NewMockActivityEvents creates a new instance of MockActivityEvents. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockActivityEvents) CreateActivityEvent

func (_m *MockActivityEvents) CreateActivityEvent(ctx context.Context, input *models.ActivityEvent) (*models.ActivityEvent, error)

CreateActivityEvent provides a mock function with given fields: ctx, input

func (*MockActivityEvents) GetActivityEvents

func (_m *MockActivityEvents) GetActivityEvents(ctx context.Context, input *GetActivityEventsInput) (*ActivityEventsResult, error)

GetActivityEvents provides a mock function with given fields: ctx, input

type MockApplies

type MockApplies struct {
	mock.Mock
}

MockApplies is an autogenerated mock type for the Applies type

func NewMockApplies

func NewMockApplies(t mockConstructorTestingTNewMockApplies) *MockApplies

NewMockApplies creates a new instance of MockApplies. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockApplies) CreateApply

func (_m *MockApplies) CreateApply(ctx context.Context, apply *models.Apply) (*models.Apply, error)

CreateApply provides a mock function with given fields: ctx, apply

func (*MockApplies) GetApplies

func (_m *MockApplies) GetApplies(ctx context.Context, input *GetAppliesInput) (*AppliesResult, error)

GetApplies provides a mock function with given fields: ctx, input

func (*MockApplies) GetApply

func (_m *MockApplies) GetApply(ctx context.Context, id string) (*models.Apply, error)

GetApply provides a mock function with given fields: ctx, id

func (*MockApplies) UpdateApply

func (_m *MockApplies) UpdateApply(ctx context.Context, apply *models.Apply) (*models.Apply, error)

UpdateApply provides a mock function with given fields: ctx, apply

type MockConfigurationVersions

type MockConfigurationVersions struct {
	mock.Mock
}

MockConfigurationVersions is an autogenerated mock type for the ConfigurationVersions type

func NewMockConfigurationVersions

func NewMockConfigurationVersions(t mockConstructorTestingTNewMockConfigurationVersions) *MockConfigurationVersions

NewMockConfigurationVersions creates a new instance of MockConfigurationVersions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockConfigurationVersions) CreateConfigurationVersion

func (_m *MockConfigurationVersions) CreateConfigurationVersion(ctx context.Context, configurationVersion models.ConfigurationVersion) (*models.ConfigurationVersion, error)

CreateConfigurationVersion provides a mock function with given fields: ctx, configurationVersion

func (*MockConfigurationVersions) GetConfigurationVersion

func (_m *MockConfigurationVersions) GetConfigurationVersion(ctx context.Context, id string) (*models.ConfigurationVersion, error)

GetConfigurationVersion provides a mock function with given fields: ctx, id

func (*MockConfigurationVersions) GetConfigurationVersions

GetConfigurationVersions provides a mock function with given fields: ctx, input

func (*MockConfigurationVersions) UpdateConfigurationVersion

func (_m *MockConfigurationVersions) UpdateConfigurationVersion(ctx context.Context, configurationVersion models.ConfigurationVersion) (*models.ConfigurationVersion, error)

UpdateConfigurationVersion provides a mock function with given fields: ctx, configurationVersion

type MockEvents

type MockEvents struct {
	mock.Mock
}

MockEvents is an autogenerated mock type for the Events type

func NewMockEvents

func NewMockEvents(t mockConstructorTestingTNewMockEvents) *MockEvents

NewMockEvents creates a new instance of MockEvents. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockEvents) Listen

func (_m *MockEvents) Listen(ctx context.Context) (<-chan Event, <-chan error)

Listen provides a mock function with given fields: ctx

type MockGPGKeys

type MockGPGKeys struct {
	mock.Mock
}

MockGPGKeys is an autogenerated mock type for the GPGKeys type

func NewMockGPGKeys

func NewMockGPGKeys(t mockConstructorTestingTNewMockGPGKeys) *MockGPGKeys

NewMockGPGKeys creates a new instance of MockGPGKeys. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockGPGKeys) CreateGPGKey

func (_m *MockGPGKeys) CreateGPGKey(ctx context.Context, gpgKey *models.GPGKey) (*models.GPGKey, error)

CreateGPGKey provides a mock function with given fields: ctx, gpgKey

func (*MockGPGKeys) DeleteGPGKey

func (_m *MockGPGKeys) DeleteGPGKey(ctx context.Context, gpgKey *models.GPGKey) error

DeleteGPGKey provides a mock function with given fields: ctx, gpgKey

func (*MockGPGKeys) GetGPGKeyByID

func (_m *MockGPGKeys) GetGPGKeyByID(ctx context.Context, id string) (*models.GPGKey, error)

GetGPGKeyByID provides a mock function with given fields: ctx, id

func (*MockGPGKeys) GetGPGKeys

func (_m *MockGPGKeys) GetGPGKeys(ctx context.Context, input *GetGPGKeysInput) (*GPGKeysResult, error)

GetGPGKeys provides a mock function with given fields: ctx, input

type MockGroups

type MockGroups struct {
	mock.Mock
}

MockGroups is an autogenerated mock type for the Groups type

func NewMockGroups

func NewMockGroups(t mockConstructorTestingTNewMockGroups) *MockGroups

NewMockGroups creates a new instance of MockGroups. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockGroups) CreateGroup

func (_m *MockGroups) CreateGroup(ctx context.Context, group *models.Group) (*models.Group, error)

CreateGroup provides a mock function with given fields: ctx, group

func (*MockGroups) DeleteGroup

func (_m *MockGroups) DeleteGroup(ctx context.Context, group *models.Group) error

DeleteGroup provides a mock function with given fields: ctx, group

func (*MockGroups) GetChildDepth added in v0.11.0

func (_m *MockGroups) GetChildDepth(ctx context.Context, group *models.Group) (int, error)

GetChildDepth provides a mock function with given fields: ctx, group

func (*MockGroups) GetGroupByFullPath

func (_m *MockGroups) GetGroupByFullPath(ctx context.Context, path string) (*models.Group, error)

GetGroupByFullPath provides a mock function with given fields: ctx, path

func (*MockGroups) GetGroupByID

func (_m *MockGroups) GetGroupByID(ctx context.Context, id string) (*models.Group, error)

GetGroupByID provides a mock function with given fields: ctx, id

func (*MockGroups) GetGroups

func (_m *MockGroups) GetGroups(ctx context.Context, input *GetGroupsInput) (*GroupsResult, error)

GetGroups provides a mock function with given fields: ctx, input

func (*MockGroups) MigrateGroup added in v0.8.0

func (_m *MockGroups) MigrateGroup(ctx context.Context, group *models.Group, newParentGroup *models.Group) (*models.Group, error)

MigrateGroup provides a mock function with given fields: ctx, group, newParentGroup

func (*MockGroups) UpdateGroup

func (_m *MockGroups) UpdateGroup(ctx context.Context, group *models.Group) (*models.Group, error)

UpdateGroup provides a mock function with given fields: ctx, group

type MockJobs

type MockJobs struct {
	mock.Mock
}

MockJobs is an autogenerated mock type for the Jobs type

func NewMockJobs

func NewMockJobs(t mockConstructorTestingTNewMockJobs) *MockJobs

NewMockJobs creates a new instance of MockJobs. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockJobs) CreateJob

func (_m *MockJobs) CreateJob(ctx context.Context, job *models.Job) (*models.Job, error)

CreateJob provides a mock function with given fields: ctx, job

func (*MockJobs) GetJobByID

func (_m *MockJobs) GetJobByID(ctx context.Context, id string) (*models.Job, error)

GetJobByID provides a mock function with given fields: ctx, id

func (*MockJobs) GetJobCountForRunner

func (_m *MockJobs) GetJobCountForRunner(ctx context.Context, runnerID string) (int, error)

GetJobCountForRunner provides a mock function with given fields: ctx, runnerID

func (*MockJobs) GetJobs

func (_m *MockJobs) GetJobs(ctx context.Context, input *GetJobsInput) (*JobsResult, error)

GetJobs provides a mock function with given fields: ctx, input

func (*MockJobs) GetLatestJobByType

func (_m *MockJobs) GetLatestJobByType(ctx context.Context, runID string, jobType models.JobType) (*models.Job, error)

GetLatestJobByType provides a mock function with given fields: ctx, runID, jobType

func (*MockJobs) UpdateJob

func (_m *MockJobs) UpdateJob(ctx context.Context, job *models.Job) (*models.Job, error)

UpdateJob provides a mock function with given fields: ctx, job

type MockLogStreams added in v0.17.0

type MockLogStreams struct {
	mock.Mock
}

MockLogStreams is an autogenerated mock type for the LogStreams type

func NewMockLogStreams added in v0.17.0

func NewMockLogStreams(t mockConstructorTestingTNewMockLogStreams) *MockLogStreams

NewMockLogStreams creates a new instance of MockLogStreams. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockLogStreams) CreateLogStream added in v0.17.0

func (_m *MockLogStreams) CreateLogStream(ctx context.Context, logStream *models.LogStream) (*models.LogStream, error)

CreateLogStream provides a mock function with given fields: ctx, logStream

func (*MockLogStreams) GetLogStreamByID added in v0.17.0

func (_m *MockLogStreams) GetLogStreamByID(ctx context.Context, id string) (*models.LogStream, error)

GetLogStreamByID provides a mock function with given fields: ctx, id

func (*MockLogStreams) GetLogStreamByJobID added in v0.17.0

func (_m *MockLogStreams) GetLogStreamByJobID(ctx context.Context, jobID string) (*models.LogStream, error)

GetLogStreamByJobID provides a mock function with given fields: ctx, jobID

func (*MockLogStreams) GetLogStreamByRunnerSessionID added in v0.17.0

func (_m *MockLogStreams) GetLogStreamByRunnerSessionID(ctx context.Context, sessionID string) (*models.LogStream, error)

GetLogStreamByRunnerSessionID provides a mock function with given fields: ctx, sessionID

func (*MockLogStreams) GetLogStreams added in v0.17.0

func (_m *MockLogStreams) GetLogStreams(ctx context.Context, input *GetLogStreamsInput) (*LogStreamsResult, error)

GetLogStreams provides a mock function with given fields: ctx, input

func (*MockLogStreams) UpdateLogStream added in v0.17.0

func (_m *MockLogStreams) UpdateLogStream(ctx context.Context, logStream *models.LogStream) (*models.LogStream, error)

UpdateLogStream provides a mock function with given fields: ctx, logStream

type MockMaintenanceModes added in v0.17.0

type MockMaintenanceModes struct {
	mock.Mock
}

MockMaintenanceModes is an autogenerated mock type for the MaintenanceModes type

func NewMockMaintenanceModes added in v0.17.0

func NewMockMaintenanceModes(t mockConstructorTestingTNewMockMaintenanceModes) *MockMaintenanceModes

NewMockMaintenanceModes creates a new instance of MockMaintenanceModes. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockMaintenanceModes) CreateMaintenanceMode added in v0.17.0

func (_m *MockMaintenanceModes) CreateMaintenanceMode(ctx context.Context, mode *models.MaintenanceMode) (*models.MaintenanceMode, error)

CreateMaintenanceMode provides a mock function with given fields: ctx, mode

func (*MockMaintenanceModes) DeleteMaintenanceMode added in v0.17.0

func (_m *MockMaintenanceModes) DeleteMaintenanceMode(ctx context.Context, mode *models.MaintenanceMode) error

DeleteMaintenanceMode provides a mock function with given fields: ctx, mode

func (*MockMaintenanceModes) GetMaintenanceMode added in v0.17.0

func (_m *MockMaintenanceModes) GetMaintenanceMode(ctx context.Context) (*models.MaintenanceMode, error)

GetMaintenanceMode provides a mock function with given fields: ctx

type MockManagedIdentities

type MockManagedIdentities struct {
	mock.Mock
}

MockManagedIdentities is an autogenerated mock type for the ManagedIdentities type

func NewMockManagedIdentities

func NewMockManagedIdentities(t mockConstructorTestingTNewMockManagedIdentities) *MockManagedIdentities

NewMockManagedIdentities creates a new instance of MockManagedIdentities. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockManagedIdentities) AddManagedIdentityToWorkspace

func (_m *MockManagedIdentities) AddManagedIdentityToWorkspace(ctx context.Context, managedIdentityID string, workspaceID string) error

AddManagedIdentityToWorkspace provides a mock function with given fields: ctx, managedIdentityID, workspaceID

func (*MockManagedIdentities) CreateManagedIdentity

func (_m *MockManagedIdentities) CreateManagedIdentity(ctx context.Context, managedIdentity *models.ManagedIdentity) (*models.ManagedIdentity, error)

CreateManagedIdentity provides a mock function with given fields: ctx, managedIdentity

func (*MockManagedIdentities) CreateManagedIdentityAccessRule

func (_m *MockManagedIdentities) CreateManagedIdentityAccessRule(ctx context.Context, rule *models.ManagedIdentityAccessRule) (*models.ManagedIdentityAccessRule, error)

CreateManagedIdentityAccessRule provides a mock function with given fields: ctx, rule

func (*MockManagedIdentities) DeleteManagedIdentity

func (_m *MockManagedIdentities) DeleteManagedIdentity(ctx context.Context, managedIdentity *models.ManagedIdentity) error

DeleteManagedIdentity provides a mock function with given fields: ctx, managedIdentity

func (*MockManagedIdentities) DeleteManagedIdentityAccessRule

func (_m *MockManagedIdentities) DeleteManagedIdentityAccessRule(ctx context.Context, rule *models.ManagedIdentityAccessRule) error

DeleteManagedIdentityAccessRule provides a mock function with given fields: ctx, rule

func (*MockManagedIdentities) GetManagedIdentities

GetManagedIdentities provides a mock function with given fields: ctx, input

func (*MockManagedIdentities) GetManagedIdentitiesForWorkspace

func (_m *MockManagedIdentities) GetManagedIdentitiesForWorkspace(ctx context.Context, workspaceID string) ([]models.ManagedIdentity, error)

GetManagedIdentitiesForWorkspace provides a mock function with given fields: ctx, workspaceID

func (*MockManagedIdentities) GetManagedIdentityAccessRule

func (_m *MockManagedIdentities) GetManagedIdentityAccessRule(ctx context.Context, ruleID string) (*models.ManagedIdentityAccessRule, error)

GetManagedIdentityAccessRule provides a mock function with given fields: ctx, ruleID

func (*MockManagedIdentities) GetManagedIdentityAccessRules

GetManagedIdentityAccessRules provides a mock function with given fields: ctx, input

func (*MockManagedIdentities) GetManagedIdentityByID

func (_m *MockManagedIdentities) GetManagedIdentityByID(ctx context.Context, id string) (*models.ManagedIdentity, error)

GetManagedIdentityByID provides a mock function with given fields: ctx, id

func (*MockManagedIdentities) GetManagedIdentityByPath

func (_m *MockManagedIdentities) GetManagedIdentityByPath(ctx context.Context, path string) (*models.ManagedIdentity, error)

GetManagedIdentityByPath provides a mock function with given fields: ctx, path

func (*MockManagedIdentities) RemoveManagedIdentityFromWorkspace

func (_m *MockManagedIdentities) RemoveManagedIdentityFromWorkspace(ctx context.Context, managedIdentityID string, workspaceID string) error

RemoveManagedIdentityFromWorkspace provides a mock function with given fields: ctx, managedIdentityID, workspaceID

func (*MockManagedIdentities) UpdateManagedIdentity

func (_m *MockManagedIdentities) UpdateManagedIdentity(ctx context.Context, managedIdentity *models.ManagedIdentity) (*models.ManagedIdentity, error)

UpdateManagedIdentity provides a mock function with given fields: ctx, managedIdentity

func (*MockManagedIdentities) UpdateManagedIdentityAccessRule

func (_m *MockManagedIdentities) UpdateManagedIdentityAccessRule(ctx context.Context, rule *models.ManagedIdentityAccessRule) (*models.ManagedIdentityAccessRule, error)

UpdateManagedIdentityAccessRule provides a mock function with given fields: ctx, rule

type MockNamespaceMemberships

type MockNamespaceMemberships struct {
	mock.Mock
}

MockNamespaceMemberships is an autogenerated mock type for the NamespaceMemberships type

func NewMockNamespaceMemberships

func NewMockNamespaceMemberships(t mockConstructorTestingTNewMockNamespaceMemberships) *MockNamespaceMemberships

NewMockNamespaceMemberships creates a new instance of MockNamespaceMemberships. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockNamespaceMemberships) CreateNamespaceMembership

CreateNamespaceMembership provides a mock function with given fields: ctx, input

func (*MockNamespaceMemberships) DeleteNamespaceMembership

func (_m *MockNamespaceMemberships) DeleteNamespaceMembership(ctx context.Context, namespaceMembership *models.NamespaceMembership) error

DeleteNamespaceMembership provides a mock function with given fields: ctx, namespaceMembership

func (*MockNamespaceMemberships) GetNamespaceMembershipByID

func (_m *MockNamespaceMemberships) GetNamespaceMembershipByID(ctx context.Context, id string) (*models.NamespaceMembership, error)

GetNamespaceMembershipByID provides a mock function with given fields: ctx, id

func (*MockNamespaceMemberships) GetNamespaceMemberships

GetNamespaceMemberships provides a mock function with given fields: ctx, input

func (*MockNamespaceMemberships) UpdateNamespaceMembership

func (_m *MockNamespaceMemberships) UpdateNamespaceMembership(ctx context.Context, namespaceMembership *models.NamespaceMembership) (*models.NamespaceMembership, error)

UpdateNamespaceMembership provides a mock function with given fields: ctx, namespaceMembership

type MockPlans

type MockPlans struct {
	mock.Mock
}

MockPlans is an autogenerated mock type for the Plans type

func NewMockPlans

func NewMockPlans(t mockConstructorTestingTNewMockPlans) *MockPlans

NewMockPlans creates a new instance of MockPlans. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockPlans) CreatePlan

func (_m *MockPlans) CreatePlan(ctx context.Context, plan *models.Plan) (*models.Plan, error)

CreatePlan provides a mock function with given fields: ctx, plan

func (*MockPlans) GetPlan

func (_m *MockPlans) GetPlan(ctx context.Context, id string) (*models.Plan, error)

GetPlan provides a mock function with given fields: ctx, id

func (*MockPlans) GetPlans

func (_m *MockPlans) GetPlans(ctx context.Context, input *GetPlansInput) (*PlansResult, error)

GetPlans provides a mock function with given fields: ctx, input

func (*MockPlans) UpdatePlan

func (_m *MockPlans) UpdatePlan(ctx context.Context, plan *models.Plan) (*models.Plan, error)

UpdatePlan provides a mock function with given fields: ctx, plan

type MockResourceLimits added in v0.11.0

type MockResourceLimits struct {
	mock.Mock
}

MockResourceLimits is an autogenerated mock type for the ResourceLimits type

func NewMockResourceLimits added in v0.11.0

func NewMockResourceLimits(t mockConstructorTestingTNewMockResourceLimits) *MockResourceLimits

NewMockResourceLimits creates a new instance of MockResourceLimits. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockResourceLimits) GetResourceLimit added in v0.11.0

func (_m *MockResourceLimits) GetResourceLimit(ctx context.Context, name string) (*models.ResourceLimit, error)

GetResourceLimit provides a mock function with given fields: ctx, name

func (*MockResourceLimits) GetResourceLimits added in v0.11.0

func (_m *MockResourceLimits) GetResourceLimits(ctx context.Context) ([]models.ResourceLimit, error)

GetResourceLimits provides a mock function with given fields: ctx

func (*MockResourceLimits) UpdateResourceLimit added in v0.11.0

func (_m *MockResourceLimits) UpdateResourceLimit(ctx context.Context, resourceLimit *models.ResourceLimit) (*models.ResourceLimit, error)

UpdateResourceLimit provides a mock function with given fields: ctx, resourceLimit

type MockRoles added in v0.9.0

type MockRoles struct {
	mock.Mock
}

MockRoles is an autogenerated mock type for the Roles type

func NewMockRoles added in v0.9.0

func NewMockRoles(t mockConstructorTestingTNewMockRoles) *MockRoles

NewMockRoles creates a new instance of MockRoles. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockRoles) CreateRole added in v0.9.0

func (_m *MockRoles) CreateRole(ctx context.Context, role *models.Role) (*models.Role, error)

CreateRole provides a mock function with given fields: ctx, role

func (*MockRoles) DeleteRole added in v0.9.0

func (_m *MockRoles) DeleteRole(ctx context.Context, role *models.Role) error

DeleteRole provides a mock function with given fields: ctx, role

func (*MockRoles) GetRoleByID added in v0.9.0

func (_m *MockRoles) GetRoleByID(ctx context.Context, id string) (*models.Role, error)

GetRoleByID provides a mock function with given fields: ctx, id

func (*MockRoles) GetRoleByName added in v0.9.0

func (_m *MockRoles) GetRoleByName(ctx context.Context, name string) (*models.Role, error)

GetRoleByName provides a mock function with given fields: ctx, name

func (*MockRoles) GetRoles added in v0.9.0

func (_m *MockRoles) GetRoles(ctx context.Context, input *GetRolesInput) (*RolesResult, error)

GetRoles provides a mock function with given fields: ctx, input

func (*MockRoles) UpdateRole added in v0.9.0

func (_m *MockRoles) UpdateRole(ctx context.Context, role *models.Role) (*models.Role, error)

UpdateRole provides a mock function with given fields: ctx, role

type MockRunnerSessions added in v0.17.0

type MockRunnerSessions struct {
	mock.Mock
}

MockRunnerSessions is an autogenerated mock type for the RunnerSessions type

func NewMockRunnerSessions added in v0.17.0

func NewMockRunnerSessions(t mockConstructorTestingTNewMockRunnerSessions) *MockRunnerSessions

NewMockRunnerSessions creates a new instance of MockRunnerSessions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockRunnerSessions) CreateRunnerSession added in v0.17.0

func (_m *MockRunnerSessions) CreateRunnerSession(ctx context.Context, session *models.RunnerSession) (*models.RunnerSession, error)

CreateRunnerSession provides a mock function with given fields: ctx, session

func (*MockRunnerSessions) DeleteRunnerSession added in v0.17.0

func (_m *MockRunnerSessions) DeleteRunnerSession(ctx context.Context, session *models.RunnerSession) error

DeleteRunnerSession provides a mock function with given fields: ctx, session

func (*MockRunnerSessions) GetRunnerSessionByID added in v0.17.0

func (_m *MockRunnerSessions) GetRunnerSessionByID(ctx context.Context, id string) (*models.RunnerSession, error)

GetRunnerSessionByID provides a mock function with given fields: ctx, id

func (*MockRunnerSessions) GetRunnerSessions added in v0.17.0

func (_m *MockRunnerSessions) GetRunnerSessions(ctx context.Context, input *GetRunnerSessionsInput) (*RunnerSessionsResult, error)

GetRunnerSessions provides a mock function with given fields: ctx, input

func (*MockRunnerSessions) UpdateRunnerSession added in v0.17.0

func (_m *MockRunnerSessions) UpdateRunnerSession(ctx context.Context, session *models.RunnerSession) (*models.RunnerSession, error)

UpdateRunnerSession provides a mock function with given fields: ctx, session

type MockRunners added in v0.8.0

type MockRunners struct {
	mock.Mock
}

MockRunners is an autogenerated mock type for the Runners type

func NewMockRunners added in v0.8.0

func NewMockRunners(t mockConstructorTestingTNewMockRunners) *MockRunners

NewMockRunners creates a new instance of MockRunners. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockRunners) CreateRunner added in v0.8.0

func (_m *MockRunners) CreateRunner(ctx context.Context, runner *models.Runner) (*models.Runner, error)

CreateRunner provides a mock function with given fields: ctx, runner

func (*MockRunners) DeleteRunner added in v0.8.0

func (_m *MockRunners) DeleteRunner(ctx context.Context, runner *models.Runner) error

DeleteRunner provides a mock function with given fields: ctx, runner

func (*MockRunners) GetRunnerByID added in v0.8.0

func (_m *MockRunners) GetRunnerByID(ctx context.Context, id string) (*models.Runner, error)

GetRunnerByID provides a mock function with given fields: ctx, id

func (*MockRunners) GetRunnerByPath added in v0.8.0

func (_m *MockRunners) GetRunnerByPath(ctx context.Context, path string) (*models.Runner, error)

GetRunnerByPath provides a mock function with given fields: ctx, path

func (*MockRunners) GetRunners added in v0.8.0

func (_m *MockRunners) GetRunners(ctx context.Context, input *GetRunnersInput) (*RunnersResult, error)

GetRunners provides a mock function with given fields: ctx, input

func (*MockRunners) UpdateRunner added in v0.8.0

func (_m *MockRunners) UpdateRunner(ctx context.Context, runner *models.Runner) (*models.Runner, error)

UpdateRunner provides a mock function with given fields: ctx, runner

type MockRuns

type MockRuns struct {
	mock.Mock
}

MockRuns is an autogenerated mock type for the Runs type

func NewMockRuns

func NewMockRuns(t mockConstructorTestingTNewMockRuns) *MockRuns

NewMockRuns creates a new instance of MockRuns. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockRuns) CreateRun

func (_m *MockRuns) CreateRun(ctx context.Context, run *models.Run) (*models.Run, error)

CreateRun provides a mock function with given fields: ctx, run

func (*MockRuns) GetRun

func (_m *MockRuns) GetRun(ctx context.Context, id string) (*models.Run, error)

GetRun provides a mock function with given fields: ctx, id

func (*MockRuns) GetRunByApplyID

func (_m *MockRuns) GetRunByApplyID(ctx context.Context, applyID string) (*models.Run, error)

GetRunByApplyID provides a mock function with given fields: ctx, applyID

func (*MockRuns) GetRunByPlanID

func (_m *MockRuns) GetRunByPlanID(ctx context.Context, planID string) (*models.Run, error)

GetRunByPlanID provides a mock function with given fields: ctx, planID

func (*MockRuns) GetRuns

func (_m *MockRuns) GetRuns(ctx context.Context, input *GetRunsInput) (*RunsResult, error)

GetRuns provides a mock function with given fields: ctx, input

func (*MockRuns) UpdateRun

func (_m *MockRuns) UpdateRun(ctx context.Context, run *models.Run) (*models.Run, error)

UpdateRun provides a mock function with given fields: ctx, run

type MockSCIMTokens

type MockSCIMTokens struct {
	mock.Mock
}

MockSCIMTokens is an autogenerated mock type for the SCIMTokens type

func NewMockSCIMTokens

func NewMockSCIMTokens(t mockConstructorTestingTNewMockSCIMTokens) *MockSCIMTokens

NewMockSCIMTokens creates a new instance of MockSCIMTokens. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockSCIMTokens) CreateToken

func (_m *MockSCIMTokens) CreateToken(ctx context.Context, token *models.SCIMToken) (*models.SCIMToken, error)

CreateToken provides a mock function with given fields: ctx, token

func (*MockSCIMTokens) DeleteToken

func (_m *MockSCIMTokens) DeleteToken(ctx context.Context, token *models.SCIMToken) error

DeleteToken provides a mock function with given fields: ctx, token

func (*MockSCIMTokens) GetTokenByNonce

func (_m *MockSCIMTokens) GetTokenByNonce(ctx context.Context, nonce string) (*models.SCIMToken, error)

GetTokenByNonce provides a mock function with given fields: ctx, nonce

func (*MockSCIMTokens) GetTokens

func (_m *MockSCIMTokens) GetTokens(ctx context.Context) ([]models.SCIMToken, error)

GetTokens provides a mock function with given fields: ctx

type MockServiceAccounts

type MockServiceAccounts struct {
	mock.Mock
}

MockServiceAccounts is an autogenerated mock type for the ServiceAccounts type

func NewMockServiceAccounts

func NewMockServiceAccounts(t mockConstructorTestingTNewMockServiceAccounts) *MockServiceAccounts

NewMockServiceAccounts creates a new instance of MockServiceAccounts. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockServiceAccounts) AssignServiceAccountToRunner added in v0.8.0

func (_m *MockServiceAccounts) AssignServiceAccountToRunner(ctx context.Context, serviceAccountID string, runnerID string) error

AssignServiceAccountToRunner provides a mock function with given fields: ctx, serviceAccountID, runnerID

func (*MockServiceAccounts) CreateServiceAccount

func (_m *MockServiceAccounts) CreateServiceAccount(ctx context.Context, serviceAccount *models.ServiceAccount) (*models.ServiceAccount, error)

CreateServiceAccount provides a mock function with given fields: ctx, serviceAccount

func (*MockServiceAccounts) DeleteServiceAccount

func (_m *MockServiceAccounts) DeleteServiceAccount(ctx context.Context, serviceAccount *models.ServiceAccount) error

DeleteServiceAccount provides a mock function with given fields: ctx, serviceAccount

func (*MockServiceAccounts) GetServiceAccountByID

func (_m *MockServiceAccounts) GetServiceAccountByID(ctx context.Context, id string) (*models.ServiceAccount, error)

GetServiceAccountByID provides a mock function with given fields: ctx, id

func (*MockServiceAccounts) GetServiceAccountByPath

func (_m *MockServiceAccounts) GetServiceAccountByPath(ctx context.Context, path string) (*models.ServiceAccount, error)

GetServiceAccountByPath provides a mock function with given fields: ctx, path

func (*MockServiceAccounts) GetServiceAccounts

GetServiceAccounts provides a mock function with given fields: ctx, input

func (*MockServiceAccounts) UnassignServiceAccountFromRunner added in v0.8.0

func (_m *MockServiceAccounts) UnassignServiceAccountFromRunner(ctx context.Context, serviceAccountID string, runnerID string) error

UnassignServiceAccountFromRunner provides a mock function with given fields: ctx, serviceAccountID, runnerID

func (*MockServiceAccounts) UpdateServiceAccount

func (_m *MockServiceAccounts) UpdateServiceAccount(ctx context.Context, serviceAccount *models.ServiceAccount) (*models.ServiceAccount, error)

UpdateServiceAccount provides a mock function with given fields: ctx, serviceAccount

type MockStateVersions added in v0.5.2

type MockStateVersions struct {
	mock.Mock
}

MockStateVersions is an autogenerated mock type for the StateVersions type

func NewMockStateVersions added in v0.5.2

func NewMockStateVersions(t mockConstructorTestingTNewMockStateVersions) *MockStateVersions

NewMockStateVersions creates a new instance of MockStateVersions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockStateVersions) CreateStateVersion added in v0.5.2

func (_m *MockStateVersions) CreateStateVersion(ctx context.Context, stateVersion *models.StateVersion) (*models.StateVersion, error)

CreateStateVersion provides a mock function with given fields: ctx, stateVersion

func (*MockStateVersions) GetStateVersion added in v0.5.2

func (_m *MockStateVersions) GetStateVersion(ctx context.Context, id string) (*models.StateVersion, error)

GetStateVersion provides a mock function with given fields: ctx, id

func (*MockStateVersions) GetStateVersions added in v0.5.2

func (_m *MockStateVersions) GetStateVersions(ctx context.Context, input *GetStateVersionsInput) (*StateVersionsResult, error)

GetStateVersions provides a mock function with given fields: ctx, input

type MockTeamMembers

type MockTeamMembers struct {
	mock.Mock
}

MockTeamMembers is an autogenerated mock type for the TeamMembers type

func NewMockTeamMembers

func NewMockTeamMembers(t mockConstructorTestingTNewMockTeamMembers) *MockTeamMembers

NewMockTeamMembers creates a new instance of MockTeamMembers. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTeamMembers) AddUserToTeam

func (_m *MockTeamMembers) AddUserToTeam(ctx context.Context, teamMember *models.TeamMember) (*models.TeamMember, error)

AddUserToTeam provides a mock function with given fields: ctx, teamMember

func (*MockTeamMembers) GetTeamMember

func (_m *MockTeamMembers) GetTeamMember(ctx context.Context, userID string, teamID string) (*models.TeamMember, error)

GetTeamMember provides a mock function with given fields: ctx, userID, teamID

func (*MockTeamMembers) GetTeamMemberByID

func (_m *MockTeamMembers) GetTeamMemberByID(ctx context.Context, teamMemberID string) (*models.TeamMember, error)

GetTeamMemberByID provides a mock function with given fields: ctx, teamMemberID

func (*MockTeamMembers) GetTeamMembers

func (_m *MockTeamMembers) GetTeamMembers(ctx context.Context, input *GetTeamMembersInput) (*TeamMembersResult, error)

GetTeamMembers provides a mock function with given fields: ctx, input

func (*MockTeamMembers) RemoveUserFromTeam

func (_m *MockTeamMembers) RemoveUserFromTeam(ctx context.Context, teamMember *models.TeamMember) error

RemoveUserFromTeam provides a mock function with given fields: ctx, teamMember

func (*MockTeamMembers) UpdateTeamMember

func (_m *MockTeamMembers) UpdateTeamMember(ctx context.Context, teamMember *models.TeamMember) (*models.TeamMember, error)

UpdateTeamMember provides a mock function with given fields: ctx, teamMember

type MockTeams

type MockTeams struct {
	mock.Mock
}

MockTeams is an autogenerated mock type for the Teams type

func NewMockTeams

func NewMockTeams(t mockConstructorTestingTNewMockTeams) *MockTeams

NewMockTeams creates a new instance of MockTeams. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTeams) CreateTeam

func (_m *MockTeams) CreateTeam(ctx context.Context, team *models.Team) (*models.Team, error)

CreateTeam provides a mock function with given fields: ctx, team

func (*MockTeams) DeleteTeam

func (_m *MockTeams) DeleteTeam(ctx context.Context, team *models.Team) error

DeleteTeam provides a mock function with given fields: ctx, team

func (*MockTeams) GetTeamByID

func (_m *MockTeams) GetTeamByID(ctx context.Context, id string) (*models.Team, error)

GetTeamByID provides a mock function with given fields: ctx, id

func (*MockTeams) GetTeamByName

func (_m *MockTeams) GetTeamByName(ctx context.Context, name string) (*models.Team, error)

GetTeamByName provides a mock function with given fields: ctx, name

func (*MockTeams) GetTeamBySCIMExternalID

func (_m *MockTeams) GetTeamBySCIMExternalID(ctx context.Context, scimExternalID string) (*models.Team, error)

GetTeamBySCIMExternalID provides a mock function with given fields: ctx, scimExternalID

func (*MockTeams) GetTeams

func (_m *MockTeams) GetTeams(ctx context.Context, input *GetTeamsInput) (*TeamsResult, error)

GetTeams provides a mock function with given fields: ctx, input

func (*MockTeams) UpdateTeam

func (_m *MockTeams) UpdateTeam(ctx context.Context, team *models.Team) (*models.Team, error)

UpdateTeam provides a mock function with given fields: ctx, team

type MockTerraformModuleAttestations

type MockTerraformModuleAttestations struct {
	mock.Mock
}

MockTerraformModuleAttestations is an autogenerated mock type for the TerraformModuleAttestations type

func NewMockTerraformModuleAttestations

func NewMockTerraformModuleAttestations(t mockConstructorTestingTNewMockTerraformModuleAttestations) *MockTerraformModuleAttestations

NewMockTerraformModuleAttestations creates a new instance of MockTerraformModuleAttestations. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTerraformModuleAttestations) CreateModuleAttestation

CreateModuleAttestation provides a mock function with given fields: ctx, moduleAttestation

func (*MockTerraformModuleAttestations) DeleteModuleAttestation

func (_m *MockTerraformModuleAttestations) DeleteModuleAttestation(ctx context.Context, moduleAttestation *models.TerraformModuleAttestation) error

DeleteModuleAttestation provides a mock function with given fields: ctx, moduleAttestation

func (*MockTerraformModuleAttestations) GetModuleAttestationByID

GetModuleAttestationByID provides a mock function with given fields: ctx, id

func (*MockTerraformModuleAttestations) GetModuleAttestations

GetModuleAttestations provides a mock function with given fields: ctx, input

func (*MockTerraformModuleAttestations) UpdateModuleAttestation

UpdateModuleAttestation provides a mock function with given fields: ctx, moduleAttestation

type MockTerraformModuleVersions

type MockTerraformModuleVersions struct {
	mock.Mock
}

MockTerraformModuleVersions is an autogenerated mock type for the TerraformModuleVersions type

func NewMockTerraformModuleVersions

func NewMockTerraformModuleVersions(t mockConstructorTestingTNewMockTerraformModuleVersions) *MockTerraformModuleVersions

NewMockTerraformModuleVersions creates a new instance of MockTerraformModuleVersions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTerraformModuleVersions) CreateModuleVersion

CreateModuleVersion provides a mock function with given fields: ctx, moduleVersion

func (*MockTerraformModuleVersions) DeleteModuleVersion

func (_m *MockTerraformModuleVersions) DeleteModuleVersion(ctx context.Context, moduleVersion *models.TerraformModuleVersion) error

DeleteModuleVersion provides a mock function with given fields: ctx, moduleVersion

func (*MockTerraformModuleVersions) GetModuleVersionByID

GetModuleVersionByID provides a mock function with given fields: ctx, id

func (*MockTerraformModuleVersions) GetModuleVersions

GetModuleVersions provides a mock function with given fields: ctx, input

func (*MockTerraformModuleVersions) UpdateModuleVersion

UpdateModuleVersion provides a mock function with given fields: ctx, moduleVersion

type MockTerraformModules

type MockTerraformModules struct {
	mock.Mock
}

MockTerraformModules is an autogenerated mock type for the TerraformModules type

func NewMockTerraformModules

func NewMockTerraformModules(t mockConstructorTestingTNewMockTerraformModules) *MockTerraformModules

NewMockTerraformModules creates a new instance of MockTerraformModules. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTerraformModules) CreateModule

CreateModule provides a mock function with given fields: ctx, module

func (*MockTerraformModules) DeleteModule

func (_m *MockTerraformModules) DeleteModule(ctx context.Context, module *models.TerraformModule) error

DeleteModule provides a mock function with given fields: ctx, module

func (*MockTerraformModules) GetModuleByID

func (_m *MockTerraformModules) GetModuleByID(ctx context.Context, id string) (*models.TerraformModule, error)

GetModuleByID provides a mock function with given fields: ctx, id

func (*MockTerraformModules) GetModuleByPath

func (_m *MockTerraformModules) GetModuleByPath(ctx context.Context, path string) (*models.TerraformModule, error)

GetModuleByPath provides a mock function with given fields: ctx, path

func (*MockTerraformModules) GetModules

func (_m *MockTerraformModules) GetModules(ctx context.Context, input *GetModulesInput) (*ModulesResult, error)

GetModules provides a mock function with given fields: ctx, input

func (*MockTerraformModules) UpdateModule

UpdateModule provides a mock function with given fields: ctx, module

type MockTerraformProviderPlatformMirrors added in v0.12.0

type MockTerraformProviderPlatformMirrors struct {
	mock.Mock
}

MockTerraformProviderPlatformMirrors is an autogenerated mock type for the TerraformProviderPlatformMirrors type

func NewMockTerraformProviderPlatformMirrors added in v0.12.0

func NewMockTerraformProviderPlatformMirrors(t mockConstructorTestingTNewMockTerraformProviderPlatformMirrors) *MockTerraformProviderPlatformMirrors

NewMockTerraformProviderPlatformMirrors creates a new instance of MockTerraformProviderPlatformMirrors. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTerraformProviderPlatformMirrors) CreatePlatformMirror added in v0.12.0

CreatePlatformMirror provides a mock function with given fields: ctx, platformMirror

func (*MockTerraformProviderPlatformMirrors) DeletePlatformMirror added in v0.12.0

DeletePlatformMirror provides a mock function with given fields: ctx, platformMirror

func (*MockTerraformProviderPlatformMirrors) GetPlatformMirrorByID added in v0.12.0

GetPlatformMirrorByID provides a mock function with given fields: ctx, id

func (*MockTerraformProviderPlatformMirrors) GetPlatformMirrors added in v0.12.0

GetPlatformMirrors provides a mock function with given fields: ctx, input

type MockTerraformProviderPlatforms

type MockTerraformProviderPlatforms struct {
	mock.Mock
}

MockTerraformProviderPlatforms is an autogenerated mock type for the TerraformProviderPlatforms type

func NewMockTerraformProviderPlatforms

func NewMockTerraformProviderPlatforms(t mockConstructorTestingTNewMockTerraformProviderPlatforms) *MockTerraformProviderPlatforms

NewMockTerraformProviderPlatforms creates a new instance of MockTerraformProviderPlatforms. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTerraformProviderPlatforms) CreateProviderPlatform

CreateProviderPlatform provides a mock function with given fields: ctx, providerPlatform

func (*MockTerraformProviderPlatforms) DeleteProviderPlatform

func (_m *MockTerraformProviderPlatforms) DeleteProviderPlatform(ctx context.Context, providerPlatform *models.TerraformProviderPlatform) error

DeleteProviderPlatform provides a mock function with given fields: ctx, providerPlatform

func (*MockTerraformProviderPlatforms) GetProviderPlatformByID

GetProviderPlatformByID provides a mock function with given fields: ctx, id

func (*MockTerraformProviderPlatforms) GetProviderPlatforms

GetProviderPlatforms provides a mock function with given fields: ctx, input

func (*MockTerraformProviderPlatforms) UpdateProviderPlatform

UpdateProviderPlatform provides a mock function with given fields: ctx, providerPlatform

type MockTerraformProviderVersionMirrors added in v0.12.0

type MockTerraformProviderVersionMirrors struct {
	mock.Mock
}

MockTerraformProviderVersionMirrors is an autogenerated mock type for the TerraformProviderVersionMirrors type

func NewMockTerraformProviderVersionMirrors added in v0.12.0

func NewMockTerraformProviderVersionMirrors(t mockConstructorTestingTNewMockTerraformProviderVersionMirrors) *MockTerraformProviderVersionMirrors

NewMockTerraformProviderVersionMirrors creates a new instance of MockTerraformProviderVersionMirrors. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTerraformProviderVersionMirrors) CreateVersionMirror added in v0.12.0

CreateVersionMirror provides a mock function with given fields: ctx, versionMirror

func (*MockTerraformProviderVersionMirrors) DeleteVersionMirror added in v0.12.0

DeleteVersionMirror provides a mock function with given fields: ctx, versionMirror

func (*MockTerraformProviderVersionMirrors) GetVersionMirrorByID added in v0.12.0

GetVersionMirrorByID provides a mock function with given fields: ctx, id

func (*MockTerraformProviderVersionMirrors) GetVersionMirrors added in v0.12.0

GetVersionMirrors provides a mock function with given fields: ctx, input

type MockTerraformProviderVersions

type MockTerraformProviderVersions struct {
	mock.Mock
}

MockTerraformProviderVersions is an autogenerated mock type for the TerraformProviderVersions type

func NewMockTerraformProviderVersions

func NewMockTerraformProviderVersions(t mockConstructorTestingTNewMockTerraformProviderVersions) *MockTerraformProviderVersions

NewMockTerraformProviderVersions creates a new instance of MockTerraformProviderVersions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTerraformProviderVersions) CreateProviderVersion

CreateProviderVersion provides a mock function with given fields: ctx, providerVersion

func (*MockTerraformProviderVersions) DeleteProviderVersion

func (_m *MockTerraformProviderVersions) DeleteProviderVersion(ctx context.Context, providerVersion *models.TerraformProviderVersion) error

DeleteProviderVersion provides a mock function with given fields: ctx, providerVersion

func (*MockTerraformProviderVersions) GetProviderVersionByID

GetProviderVersionByID provides a mock function with given fields: ctx, id

func (*MockTerraformProviderVersions) GetProviderVersions

GetProviderVersions provides a mock function with given fields: ctx, input

func (*MockTerraformProviderVersions) UpdateProviderVersion

UpdateProviderVersion provides a mock function with given fields: ctx, providerVersion

type MockTerraformProviders

type MockTerraformProviders struct {
	mock.Mock
}

MockTerraformProviders is an autogenerated mock type for the TerraformProviders type

func NewMockTerraformProviders

func NewMockTerraformProviders(t mockConstructorTestingTNewMockTerraformProviders) *MockTerraformProviders

NewMockTerraformProviders creates a new instance of MockTerraformProviders. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTerraformProviders) CreateProvider

CreateProvider provides a mock function with given fields: ctx, provider

func (*MockTerraformProviders) DeleteProvider

func (_m *MockTerraformProviders) DeleteProvider(ctx context.Context, provider *models.TerraformProvider) error

DeleteProvider provides a mock function with given fields: ctx, provider

func (*MockTerraformProviders) GetProviderByID

func (_m *MockTerraformProviders) GetProviderByID(ctx context.Context, id string) (*models.TerraformProvider, error)

GetProviderByID provides a mock function with given fields: ctx, id

func (*MockTerraformProviders) GetProviderByPath

func (_m *MockTerraformProviders) GetProviderByPath(ctx context.Context, path string) (*models.TerraformProvider, error)

GetProviderByPath provides a mock function with given fields: ctx, path

func (*MockTerraformProviders) GetProviders

GetProviders provides a mock function with given fields: ctx, input

func (*MockTerraformProviders) UpdateProvider

UpdateProvider provides a mock function with given fields: ctx, provider

type MockTransactions

type MockTransactions struct {
	mock.Mock
}

MockTransactions is an autogenerated mock type for the Transactions type

func NewMockTransactions

func NewMockTransactions(t mockConstructorTestingTNewMockTransactions) *MockTransactions

NewMockTransactions creates a new instance of MockTransactions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockTransactions) BeginTx

func (_m *MockTransactions) BeginTx(ctx context.Context) (context.Context, error)

BeginTx provides a mock function with given fields: ctx

func (*MockTransactions) CommitTx

func (_m *MockTransactions) CommitTx(ctx context.Context) error

CommitTx provides a mock function with given fields: ctx

func (*MockTransactions) RollbackTx

func (_m *MockTransactions) RollbackTx(ctx context.Context) error

RollbackTx provides a mock function with given fields: ctx

type MockUsers

type MockUsers struct {
	mock.Mock
}

MockUsers is an autogenerated mock type for the Users type

func NewMockUsers

func NewMockUsers(t mockConstructorTestingTNewMockUsers) *MockUsers

NewMockUsers creates a new instance of MockUsers. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockUsers) CreateUser

func (_m *MockUsers) CreateUser(ctx context.Context, user *models.User) (*models.User, error)

CreateUser provides a mock function with given fields: ctx, user

func (*MockUsers) DeleteUser

func (_m *MockUsers) DeleteUser(ctx context.Context, user *models.User) error

DeleteUser provides a mock function with given fields: ctx, user

func (*MockUsers) GetUserByEmail

func (_m *MockUsers) GetUserByEmail(ctx context.Context, email string) (*models.User, error)

GetUserByEmail provides a mock function with given fields: ctx, email

func (*MockUsers) GetUserByExternalID

func (_m *MockUsers) GetUserByExternalID(ctx context.Context, issuer string, externalID string) (*models.User, error)

GetUserByExternalID provides a mock function with given fields: ctx, issuer, externalID

func (*MockUsers) GetUserByID

func (_m *MockUsers) GetUserByID(ctx context.Context, id string) (*models.User, error)

GetUserByID provides a mock function with given fields: ctx, id

func (*MockUsers) GetUserBySCIMExternalID

func (_m *MockUsers) GetUserBySCIMExternalID(ctx context.Context, scimExternalID string) (*models.User, error)

GetUserBySCIMExternalID provides a mock function with given fields: ctx, scimExternalID

func (*MockUsers) GetUserByUsername

func (_m *MockUsers) GetUserByUsername(ctx context.Context, username string) (*models.User, error)

GetUserByUsername provides a mock function with given fields: ctx, username

func (*MockUsers) GetUsers

func (_m *MockUsers) GetUsers(ctx context.Context, input *GetUsersInput) (*UsersResult, error)

GetUsers provides a mock function with given fields: ctx, input

func (*MockUsers) LinkUserWithExternalID

func (_m *MockUsers) LinkUserWithExternalID(ctx context.Context, issuer string, externalID string, userID string) error

LinkUserWithExternalID provides a mock function with given fields: ctx, issuer, externalID, userID

func (*MockUsers) UpdateUser

func (_m *MockUsers) UpdateUser(ctx context.Context, user *models.User) (*models.User, error)

UpdateUser provides a mock function with given fields: ctx, user

type MockVCSEvents

type MockVCSEvents struct {
	mock.Mock
}

MockVCSEvents is an autogenerated mock type for the VCSEvents type

func NewMockVCSEvents

func NewMockVCSEvents(t mockConstructorTestingTNewMockVCSEvents) *MockVCSEvents

NewMockVCSEvents creates a new instance of MockVCSEvents. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockVCSEvents) CreateEvent

func (_m *MockVCSEvents) CreateEvent(ctx context.Context, event *models.VCSEvent) (*models.VCSEvent, error)

CreateEvent provides a mock function with given fields: ctx, event

func (*MockVCSEvents) GetEventByID

func (_m *MockVCSEvents) GetEventByID(ctx context.Context, id string) (*models.VCSEvent, error)

GetEventByID provides a mock function with given fields: ctx, id

func (*MockVCSEvents) GetEvents

func (_m *MockVCSEvents) GetEvents(ctx context.Context, input *GetVCSEventsInput) (*VCSEventsResult, error)

GetEvents provides a mock function with given fields: ctx, input

func (*MockVCSEvents) UpdateEvent

func (_m *MockVCSEvents) UpdateEvent(ctx context.Context, event *models.VCSEvent) (*models.VCSEvent, error)

UpdateEvent provides a mock function with given fields: ctx, event

type MockVCSProviders

type MockVCSProviders struct {
	mock.Mock
}

MockVCSProviders is an autogenerated mock type for the VCSProviders type

func NewMockVCSProviders

func NewMockVCSProviders(t mockConstructorTestingTNewMockVCSProviders) *MockVCSProviders

NewMockVCSProviders creates a new instance of MockVCSProviders. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockVCSProviders) CreateProvider

func (_m *MockVCSProviders) CreateProvider(ctx context.Context, provider *models.VCSProvider) (*models.VCSProvider, error)

CreateProvider provides a mock function with given fields: ctx, provider

func (*MockVCSProviders) DeleteProvider

func (_m *MockVCSProviders) DeleteProvider(ctx context.Context, provider *models.VCSProvider) error

DeleteProvider provides a mock function with given fields: ctx, provider

func (*MockVCSProviders) GetProviderByID

func (_m *MockVCSProviders) GetProviderByID(ctx context.Context, id string) (*models.VCSProvider, error)

GetProviderByID provides a mock function with given fields: ctx, id

func (*MockVCSProviders) GetProviderByOAuthState

func (_m *MockVCSProviders) GetProviderByOAuthState(ctx context.Context, state string) (*models.VCSProvider, error)

GetProviderByOAuthState provides a mock function with given fields: ctx, state

func (*MockVCSProviders) GetProviders

GetProviders provides a mock function with given fields: ctx, input

func (*MockVCSProviders) UpdateProvider

func (_m *MockVCSProviders) UpdateProvider(ctx context.Context, provider *models.VCSProvider) (*models.VCSProvider, error)

UpdateProvider provides a mock function with given fields: ctx, provider

type MockVariables

type MockVariables struct {
	mock.Mock
}

MockVariables is an autogenerated mock type for the Variables type

func NewMockVariables

func NewMockVariables(t mockConstructorTestingTNewMockVariables) *MockVariables

NewMockVariables creates a new instance of MockVariables. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockVariables) CreateVariable

func (_m *MockVariables) CreateVariable(ctx context.Context, input *models.Variable) (*models.Variable, error)

CreateVariable provides a mock function with given fields: ctx, input

func (*MockVariables) CreateVariables

func (_m *MockVariables) CreateVariables(ctx context.Context, namespacePath string, variables []models.Variable) error

CreateVariables provides a mock function with given fields: ctx, namespacePath, variables

func (*MockVariables) DeleteVariable

func (_m *MockVariables) DeleteVariable(ctx context.Context, variable *models.Variable) error

DeleteVariable provides a mock function with given fields: ctx, variable

func (*MockVariables) DeleteVariables

func (_m *MockVariables) DeleteVariables(ctx context.Context, namespacePath string, category models.VariableCategory) error

DeleteVariables provides a mock function with given fields: ctx, namespacePath, category

func (*MockVariables) GetVariableByID

func (_m *MockVariables) GetVariableByID(ctx context.Context, id string) (*models.Variable, error)

GetVariableByID provides a mock function with given fields: ctx, id

func (*MockVariables) GetVariables

func (_m *MockVariables) GetVariables(ctx context.Context, input *GetVariablesInput) (*VariableResult, error)

GetVariables provides a mock function with given fields: ctx, input

func (*MockVariables) UpdateVariable

func (_m *MockVariables) UpdateVariable(ctx context.Context, variable *models.Variable) (*models.Variable, error)

UpdateVariable provides a mock function with given fields: ctx, variable

type MockWorkspaceVCSProviderLinks struct {
	mock.Mock
}

MockWorkspaceVCSProviderLinks is an autogenerated mock type for the WorkspaceVCSProviderLinks type

func NewMockWorkspaceVCSProviderLinks(t mockConstructorTestingTNewMockWorkspaceVCSProviderLinks) *MockWorkspaceVCSProviderLinks

NewMockWorkspaceVCSProviderLinks creates a new instance of MockWorkspaceVCSProviderLinks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

CreateLink provides a mock function with given fields: ctx, link

DeleteLink provides a mock function with given fields: ctx, provider

func (*MockWorkspaceVCSProviderLinks) GetLinkByID

GetLinkByID provides a mock function with given fields: ctx, id

func (*MockWorkspaceVCSProviderLinks) GetLinkByWorkspaceID

func (_m *MockWorkspaceVCSProviderLinks) GetLinkByWorkspaceID(ctx context.Context, workspaceID string) (*models.WorkspaceVCSProviderLink, error)

GetLinkByWorkspaceID provides a mock function with given fields: ctx, workspaceID

func (*MockWorkspaceVCSProviderLinks) GetLinksByProviderID

func (_m *MockWorkspaceVCSProviderLinks) GetLinksByProviderID(ctx context.Context, providerID string) ([]models.WorkspaceVCSProviderLink, error)

GetLinksByProviderID provides a mock function with given fields: ctx, providerID

UpdateLink provides a mock function with given fields: ctx, link

type MockWorkspaces

type MockWorkspaces struct {
	mock.Mock
}

MockWorkspaces is an autogenerated mock type for the Workspaces type

func NewMockWorkspaces

func NewMockWorkspaces(t mockConstructorTestingTNewMockWorkspaces) *MockWorkspaces

NewMockWorkspaces creates a new instance of MockWorkspaces. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockWorkspaces) CreateWorkspace

func (_m *MockWorkspaces) CreateWorkspace(ctx context.Context, workspace *models.Workspace) (*models.Workspace, error)

CreateWorkspace provides a mock function with given fields: ctx, workspace

func (*MockWorkspaces) DeleteWorkspace

func (_m *MockWorkspaces) DeleteWorkspace(ctx context.Context, workspace *models.Workspace) error

DeleteWorkspace provides a mock function with given fields: ctx, workspace

func (*MockWorkspaces) GetWorkspaceByFullPath

func (_m *MockWorkspaces) GetWorkspaceByFullPath(ctx context.Context, path string) (*models.Workspace, error)

GetWorkspaceByFullPath provides a mock function with given fields: ctx, path

func (*MockWorkspaces) GetWorkspaceByID

func (_m *MockWorkspaces) GetWorkspaceByID(ctx context.Context, id string) (*models.Workspace, error)

GetWorkspaceByID provides a mock function with given fields: ctx, id

func (*MockWorkspaces) GetWorkspaces

func (_m *MockWorkspaces) GetWorkspaces(ctx context.Context, input *GetWorkspacesInput) (*WorkspacesResult, error)

GetWorkspaces provides a mock function with given fields: ctx, input

func (*MockWorkspaces) GetWorkspacesForManagedIdentity

func (_m *MockWorkspaces) GetWorkspacesForManagedIdentity(ctx context.Context, managedIdentityID string) ([]models.Workspace, error)

GetWorkspacesForManagedIdentity provides a mock function with given fields: ctx, managedIdentityID

func (*MockWorkspaces) UpdateWorkspace

func (_m *MockWorkspaces) UpdateWorkspace(ctx context.Context, workspace *models.Workspace) (*models.Workspace, error)

UpdateWorkspace provides a mock function with given fields: ctx, workspace

type ModuleAttestationsResult

type ModuleAttestationsResult struct {
	PageInfo           *pagination.PageInfo
	ModuleAttestations []models.TerraformModuleAttestation
}

ModuleAttestationsResult contains the response data and page information

type ModuleVersionsResult

type ModuleVersionsResult struct {
	PageInfo       *pagination.PageInfo
	ModuleVersions []models.TerraformModuleVersion
}

ModuleVersionsResult contains the response data and page information

type ModulesResult

type ModulesResult struct {
	PageInfo *pagination.PageInfo
	Modules  []models.TerraformModule
}

ModulesResult contains the response data and page information

type NamespaceMembershipFilter

type NamespaceMembershipFilter struct {
	UserID                 *string
	ServiceAccountID       *string
	TeamID                 *string
	GroupID                *string
	WorkspaceID            *string
	NamespacePathPrefix    *string
	RoleID                 *string
	NamespacePaths         []string
	NamespaceMembershipIDs []string
}

NamespaceMembershipFilter contains the supported fields for filtering NamespaceMembership resources

type NamespaceMembershipResult

type NamespaceMembershipResult struct {
	PageInfo             *pagination.PageInfo
	NamespaceMemberships []models.NamespaceMembership
}

NamespaceMembershipResult contains the response data and page information

type NamespaceMembershipSortableField

type NamespaceMembershipSortableField string

NamespaceMembershipSortableField represents the fields that a namespace membership can be sorted by

const (
	NamespaceMembershipSortableFieldUpdatedAtAsc      NamespaceMembershipSortableField = "UPDATED_AT_ASC"
	NamespaceMembershipSortableFieldUpdatedAtDesc     NamespaceMembershipSortableField = "UPDATED_AT_DESC"
	NamespaceMembershipSortableFieldNamespacePathAsc  NamespaceMembershipSortableField = "NAMESPACE_PATH_ASC"
	NamespaceMembershipSortableFieldNamespacePathDesc NamespaceMembershipSortableField = "NAMESPACE_PATH_DESC"
)

NamespaceMembershipSortableField constants

type NamespaceMemberships

type NamespaceMemberships interface {
	GetNamespaceMemberships(ctx context.Context, input *GetNamespaceMembershipsInput) (*NamespaceMembershipResult, error)
	GetNamespaceMembershipByID(ctx context.Context, id string) (*models.NamespaceMembership, error)
	CreateNamespaceMembership(ctx context.Context, input *CreateNamespaceMembershipInput) (*models.NamespaceMembership, error)
	UpdateNamespaceMembership(ctx context.Context, namespaceMembership *models.NamespaceMembership) (*models.NamespaceMembership, error)
	DeleteNamespaceMembership(ctx context.Context, namespaceMembership *models.NamespaceMembership) error
}

NamespaceMemberships encapsulates the logic to access namespace memberships from the database

func NewNamespaceMemberships

func NewNamespaceMemberships(dbClient *Client) NamespaceMemberships

NewNamespaceMemberships returns an instance of the NamespaceMemberships interface

type PlanFilter

type PlanFilter struct {
	PlanIDs []string
}

PlanFilter contains the supported fields for filtering Plan resources

type PlanSortableField

type PlanSortableField string

PlanSortableField represents the fields that a plan can be sorted by

const (
	PlanSortableFieldUpdatedAtAsc  PlanSortableField = "UPDATED_AT_ASC"
	PlanSortableFieldUpdatedAtDesc PlanSortableField = "UPDATED_AT_DESC"
)

PlanSortableField constants

type Plans

type Plans interface {
	// GetPlan returns a plan by ID
	GetPlan(ctx context.Context, id string) (*models.Plan, error)
	// GetPlans returns a list of plans
	GetPlans(ctx context.Context, input *GetPlansInput) (*PlansResult, error)
	// CreatePlan will create a new plan
	CreatePlan(ctx context.Context, plan *models.Plan) (*models.Plan, error)
	// UpdatePlan updates an existing plan
	UpdatePlan(ctx context.Context, plan *models.Plan) (*models.Plan, error)
}

Plans encapsulates the logic to access plans from the database

func NewPlans

func NewPlans(dbClient *Client) Plans

NewPlans returns an instance of the Plan interface

type PlansResult

type PlansResult struct {
	PageInfo *pagination.PageInfo
	Plans    []models.Plan
}

PlansResult contains the response data and page information

type ProviderPlatformMirrorsResult added in v0.12.0

type ProviderPlatformMirrorsResult struct {
	PageInfo        *pagination.PageInfo
	PlatformMirrors []models.TerraformProviderPlatformMirror
}

ProviderPlatformMirrorsResult contains the result of listing TerraformProviderPlatformMirror.

type ProviderPlatformsResult

type ProviderPlatformsResult struct {
	PageInfo          *pagination.PageInfo
	ProviderPlatforms []models.TerraformProviderPlatform
}

ProviderPlatformsResult contains the response data and page information

type ProviderVersionMirrorsResult added in v0.12.0

type ProviderVersionMirrorsResult struct {
	PageInfo       *pagination.PageInfo
	VersionMirrors []models.TerraformProviderVersionMirror
}

ProviderVersionMirrorsResult contains the result of listing TerraformProviderVersionMirrors.

type ProviderVersionsResult

type ProviderVersionsResult struct {
	PageInfo         *pagination.PageInfo
	ProviderVersions []models.TerraformProviderVersion
}

ProviderVersionsResult contains the response data and page information

type ProvidersResult

type ProvidersResult struct {
	PageInfo  *pagination.PageInfo
	Providers []models.TerraformProvider
}

ProvidersResult contains the response data and page information

type ResourceLimits added in v0.11.0

type ResourceLimits interface {
	GetResourceLimit(ctx context.Context, name string) (*models.ResourceLimit, error)
	GetResourceLimits(ctx context.Context) ([]models.ResourceLimit, error)
	UpdateResourceLimit(ctx context.Context, resourceLimit *models.ResourceLimit) (*models.ResourceLimit, error)
}

ResourceLimits encapsulates the logic to access resource-limits from the database Because resource limits are all created via the schema, there is no need for a create method or a delete method.

func NewResourceLimits added in v0.11.0

func NewResourceLimits(dbClient *Client) ResourceLimits

NewResourceLimits returns an instance of the ResourceLimits interface

type RoleFilter added in v0.9.0

type RoleFilter struct {
	RoleNamePrefix *string
	RoleIDs        []string
}

RoleFilter contains the supported fields for filtering Role resources

type RoleSortableField added in v0.9.0

type RoleSortableField string

RoleSortableField represents the fields that a role can be sorted by

const (
	RoleSortableFieldNameAsc       RoleSortableField = "NAME_ASC"
	RoleSortableFieldNameDesc      RoleSortableField = "NAME_DESC"
	RoleSortableFieldUpdatedAtAsc  RoleSortableField = "UPDATED_AT_ASC"
	RoleSortableFieldUpdatedAtDesc RoleSortableField = "UPDATED_AT_DESC"
)

RoleSortableField constants

type Roles added in v0.9.0

type Roles interface {
	GetRoleByName(ctx context.Context, name string) (*models.Role, error)
	GetRoleByID(ctx context.Context, id string) (*models.Role, error)
	GetRoles(ctx context.Context, input *GetRolesInput) (*RolesResult, error)
	CreateRole(ctx context.Context, role *models.Role) (*models.Role, error)
	UpdateRole(ctx context.Context, role *models.Role) (*models.Role, error)
	DeleteRole(ctx context.Context, role *models.Role) error
}

Roles encapsulates the logic to access Tharsis roles from the database.

func NewRoles added in v0.9.0

func NewRoles(dbClient *Client) Roles

NewRoles returns an instance of the Roles interface.

type RolesResult added in v0.9.0

type RolesResult struct {
	PageInfo *pagination.PageInfo
	Roles    []models.Role
}

RolesResult contains the response data and page information

type RunFilter

type RunFilter struct {
	PlanID       *string
	ApplyID      *string
	WorkspaceID  *string
	GroupID      *string
	UserMemberID *string
	RunIDs       []string
}

RunFilter contains the supported fields for filtering Run resources

type RunSortableField

type RunSortableField string

RunSortableField represents the fields that a workspace can be sorted by

const (
	RunSortableFieldCreatedAtAsc  RunSortableField = "CREATED_AT_ASC"
	RunSortableFieldCreatedAtDesc RunSortableField = "CREATED_AT_DESC"
	RunSortableFieldUpdatedAtAsc  RunSortableField = "UPDATED_AT_ASC"
	RunSortableFieldUpdatedAtDesc RunSortableField = "UPDATED_AT_DESC"
)

GroupSortableField constants

type RunnerFilter added in v0.8.0

type RunnerFilter struct {
	GroupID        *string
	RunnerName     *string
	RunnerID       *string
	Enabled        *bool
	RunnerType     *models.RunnerType
	RunnerIDs      []string
	NamespacePaths []string
}

RunnerFilter contains the supported fields for filtering Runner resources

type RunnerSessionFilter added in v0.17.0

type RunnerSessionFilter struct {
	RunnerID         *string
	RunnerSessionIDs []string
}

RunnerSessionFilter contains the supported fields for filtering RunnerSession resources

type RunnerSessionSortableField added in v0.17.0

type RunnerSessionSortableField string

RunnerSessionSortableField represents the fields that sessions can be sorted by

const (
	RunnerSessionSortableFieldCreatedAtAsc        RunnerSessionSortableField = "CREATED_AT_ASC"
	RunnerSessionSortableFieldCreatedAtDesc       RunnerSessionSortableField = "CREATED_AT_DESC"
	RunnerSessionSortableFieldLastContactedAtAsc  RunnerSessionSortableField = "LAST_CONTACTED_AT_ASC"
	RunnerSessionSortableFieldLastContactedAtDesc RunnerSessionSortableField = "LAST_CONTACTED_AT_DESC"
)

RunnerSessionSortableField constants

type RunnerSessions added in v0.17.0

type RunnerSessions interface {
	GetRunnerSessionByID(ctx context.Context, id string) (*models.RunnerSession, error)
	GetRunnerSessions(ctx context.Context, input *GetRunnerSessionsInput) (*RunnerSessionsResult, error)
	CreateRunnerSession(ctx context.Context, session *models.RunnerSession) (*models.RunnerSession, error)
	UpdateRunnerSession(ctx context.Context, session *models.RunnerSession) (*models.RunnerSession, error)
	DeleteRunnerSession(ctx context.Context, session *models.RunnerSession) error
}

RunnerSessions encapsulates the logic to access sessions from the database

func NewRunnerSessions added in v0.17.0

func NewRunnerSessions(dbClient *Client) RunnerSessions

NewRunnerSessions returns an instance of the RunnerSessions interface

type RunnerSessionsResult added in v0.17.0

type RunnerSessionsResult struct {
	PageInfo       *pagination.PageInfo
	RunnerSessions []models.RunnerSession
}

RunnerSessionsResult contains the response data and page information

type RunnerSortableField added in v0.8.0

type RunnerSortableField string

RunnerSortableField represents the fields that a runners can be sorted by

const (
	RunnerSortableFieldUpdatedAtAsc   RunnerSortableField = "UPDATED_AT_ASC"
	RunnerSortableFieldUpdatedAtDesc  RunnerSortableField = "UPDATED_AT_DESC"
	RunnerSortableFieldGroupLevelAsc  RunnerSortableField = "GROUP_LEVEL_ASC"
	RunnerSortableFieldGroupLevelDesc RunnerSortableField = "GROUP_LEVEL_DESC"
)

RunnerSortableField constants

type Runners added in v0.8.0

type Runners interface {
	GetRunnerByPath(ctx context.Context, path string) (*models.Runner, error)
	GetRunnerByID(ctx context.Context, id string) (*models.Runner, error)
	GetRunners(ctx context.Context, input *GetRunnersInput) (*RunnersResult, error)
	CreateRunner(ctx context.Context, runner *models.Runner) (*models.Runner, error)
	UpdateRunner(ctx context.Context, runner *models.Runner) (*models.Runner, error)
	DeleteRunner(ctx context.Context, runner *models.Runner) error
}

Runners encapsulates the logic to access runners from the database

func NewRunners added in v0.8.0

func NewRunners(dbClient *Client) Runners

NewRunners returns an instance of the Runners interface

type RunnersResult added in v0.8.0

type RunnersResult struct {
	PageInfo *pagination.PageInfo
	Runners  []models.Runner
}

RunnersResult contains the response data and page information

type Runs

type Runs interface {
	GetRun(ctx context.Context, id string) (*models.Run, error)
	GetRunByPlanID(ctx context.Context, planID string) (*models.Run, error)
	GetRunByApplyID(ctx context.Context, applyID string) (*models.Run, error)
	CreateRun(ctx context.Context, run *models.Run) (*models.Run, error)
	UpdateRun(ctx context.Context, run *models.Run) (*models.Run, error)
	GetRuns(ctx context.Context, input *GetRunsInput) (*RunsResult, error)
}

Runs encapsulates the logic to access runs from the database

func NewRuns

func NewRuns(dbClient *Client) Runs

NewRuns returns an instance of the Run interface

type RunsResult

type RunsResult struct {
	PageInfo *pagination.PageInfo
	Runs     []models.Run
}

RunsResult contains the response data and page information

type SCIMTokens

type SCIMTokens interface {
	GetTokenByNonce(ctx context.Context, nonce string) (*models.SCIMToken, error)
	GetTokens(ctx context.Context) ([]models.SCIMToken, error)
	CreateToken(ctx context.Context, token *models.SCIMToken) (*models.SCIMToken, error)
	DeleteToken(ctx context.Context, token *models.SCIMToken) error
}

SCIMTokens encapsulates the logic to access SCIM tokens from the database

func NewSCIMTokens

func NewSCIMTokens(dbClient *Client) SCIMTokens

NewSCIMTokens returns an instance of the SCIMTokens interface.

type ServiceAccountFilter

type ServiceAccountFilter struct {
	Search            *string
	RunnerID          *string
	ServiceAccountIDs []string
	NamespacePaths    []string
}

ServiceAccountFilter contains the supported fields for filtering ServiceAccount resources

type ServiceAccountSortableField

type ServiceAccountSortableField string

ServiceAccountSortableField represents the fields that a service account can be sorted by

const (
	ServiceAccountSortableFieldCreatedAtAsc        ServiceAccountSortableField = "CREATED_AT_ASC"
	ServiceAccountSortableFieldCreatedAtDesc       ServiceAccountSortableField = "CREATED_AT_DESC"
	ServiceAccountSortableFieldUpdatedAtAsc        ServiceAccountSortableField = "UPDATED_AT_ASC"
	ServiceAccountSortableFieldUpdatedAtDesc       ServiceAccountSortableField = "UPDATED_AT_DESC"
	ServiceAccountSortableFieldFieldGroupLevelAsc  ServiceAccountSortableField = "GROUP_LEVEL_ASC"
	ServiceAccountSortableFieldFieldGroupLevelDesc ServiceAccountSortableField = "GROUP_LEVEL_DESC"
)

ServiceAccountSortableField constants

type ServiceAccounts

type ServiceAccounts interface {
	GetServiceAccountByID(ctx context.Context, id string) (*models.ServiceAccount, error)
	GetServiceAccountByPath(ctx context.Context, path string) (*models.ServiceAccount, error)
	CreateServiceAccount(ctx context.Context, serviceAccount *models.ServiceAccount) (*models.ServiceAccount, error)
	UpdateServiceAccount(ctx context.Context, serviceAccount *models.ServiceAccount) (*models.ServiceAccount, error)
	GetServiceAccounts(ctx context.Context, input *GetServiceAccountsInput) (*ServiceAccountsResult, error)
	DeleteServiceAccount(ctx context.Context, serviceAccount *models.ServiceAccount) error
	AssignServiceAccountToRunner(ctx context.Context, serviceAccountID string, runnerID string) error
	UnassignServiceAccountFromRunner(ctx context.Context, serviceAccountID string, runnerID string) error
}

ServiceAccounts encapsulates the logic to access service accounts from the database

func NewServiceAccounts

func NewServiceAccounts(dbClient *Client) ServiceAccounts

NewServiceAccounts returns an instance of the ServiceAccount interface

type ServiceAccountsResult

type ServiceAccountsResult struct {
	PageInfo        *pagination.PageInfo
	ServiceAccounts []models.ServiceAccount
}

ServiceAccountsResult contains the response data and page information

type StateVersionFilter

type StateVersionFilter struct {
	WorkspaceID     *string
	RunIDs          []string
	StateVersionIDs []string
}

StateVersionFilter contains the supported fields for filtering StateVersion resources

type StateVersionOutputs

type StateVersionOutputs interface {
	CreateStateVersionOutput(ctx context.Context, stateVersionOutput *models.StateVersionOutput) (*models.StateVersionOutput, error)
	GetStateVersionOutputs(ctx context.Context, stateVersionID string) ([]models.StateVersionOutput, error)
	GetStateVersionOutputByName(ctx context.Context, stateVersionID, outputName string) (*models.StateVersionOutput, error)
}

StateVersionOutputs encapsulates the logic to access state version outputs from the database

func NewStateVersionOutputs

func NewStateVersionOutputs(dbClient *Client) StateVersionOutputs

NewStateVersionOutputs returns an instance of the StateVersionOutput interface

type StateVersionSortableField

type StateVersionSortableField string

StateVersionSortableField represents the fields that a list of state versions can be sorted by

const (
	StateVersionSortableFieldUpdatedAtAsc  StateVersionSortableField = "UPDATED_AT_ASC"
	StateVersionSortableFieldUpdatedAtDesc StateVersionSortableField = "UPDATED_AT_DESC"
)

StateVersionSortableField constants

type StateVersions

type StateVersions interface {
	GetStateVersions(ctx context.Context, input *GetStateVersionsInput) (*StateVersionsResult, error)
	// GetStateVersion returns a stateVersion by ID
	GetStateVersion(ctx context.Context, id string) (*models.StateVersion, error)
	// CreateStateVersion will create a new stateVersion
	CreateStateVersion(ctx context.Context, stateVersion *models.StateVersion) (*models.StateVersion, error)
}

StateVersions encapsulates the logic to access stateVersions from the database

func NewStateVersions

func NewStateVersions(dbClient *Client) StateVersions

NewStateVersions returns an instance of the StateVersion interface

type StateVersionsResult

type StateVersionsResult struct {
	PageInfo      *pagination.PageInfo
	StateVersions []models.StateVersion
}

StateVersionsResult contains the response data and page information

type TeamFilter

type TeamFilter struct {
	TeamNamePrefix *string
	UserID         *string
	TeamIDs        []string
	SCIMExternalID bool
}

TeamFilter contains the supported fields for filtering Team resources

type TeamMemberFilter

type TeamMemberFilter struct {
	UserID         *string
	TeamIDs        []string
	MaintainerOnly bool
}

TeamMemberFilter contains the supported fields for filtering TeamMember resources

type TeamMemberSortableField

type TeamMemberSortableField string

TeamMemberSortableField represents the fields that a team member can be sorted by

const (
	UsernameAsc  TeamMemberSortableField = "USERNAME_ASC"
	UsernameDesc TeamMemberSortableField = "USERNAME_DESC"
)

TeamMemberSortableField constants

type TeamMembers

type TeamMembers interface {
	GetTeamMemberByID(ctx context.Context, teamMemberID string) (*models.TeamMember, error)
	GetTeamMember(ctx context.Context, userID, teamID string) (*models.TeamMember, error)
	GetTeamMembers(ctx context.Context, input *GetTeamMembersInput) (*TeamMembersResult, error)
	AddUserToTeam(ctx context.Context, teamMember *models.TeamMember) (*models.TeamMember, error)
	UpdateTeamMember(ctx context.Context, teamMember *models.TeamMember) (*models.TeamMember, error)
	RemoveUserFromTeam(ctx context.Context, teamMember *models.TeamMember) error
}

TeamMembers encapsulates the logic to access team members from the database

func NewTeamMembers

func NewTeamMembers(dbClient *Client) TeamMembers

NewTeamMembers returns an instance of the TeamMembers interface

type TeamMembersResult

type TeamMembersResult struct {
	PageInfo    *pagination.PageInfo
	TeamMembers []models.TeamMember
}

TeamMembersResult contains the response data and page information

type TeamSortableField

type TeamSortableField string

TeamSortableField represents the fields that a team can be sorted by

const (
	TeamSortableFieldNameAsc       TeamSortableField = "NAME_ASC"
	TeamSortableFieldNameDesc      TeamSortableField = "NAME_DESC"
	TeamSortableFieldUpdatedAtAsc  TeamSortableField = "UPDATED_AT_ASC"
	TeamSortableFieldUpdatedAtDesc TeamSortableField = "UPDATED_AT_DESC"
)

TeamSortableField constants

type Teams

type Teams interface {
	GetTeamBySCIMExternalID(ctx context.Context, scimExternalID string) (*models.Team, error)
	GetTeamByID(ctx context.Context, id string) (*models.Team, error)
	GetTeamByName(ctx context.Context, name string) (*models.Team, error)
	GetTeams(ctx context.Context, input *GetTeamsInput) (*TeamsResult, error)
	CreateTeam(ctx context.Context, team *models.Team) (*models.Team, error)
	UpdateTeam(ctx context.Context, team *models.Team) (*models.Team, error)
	DeleteTeam(ctx context.Context, team *models.Team) error
}

Teams encapsulates the logic to access teams from the database

func NewTeams

func NewTeams(dbClient *Client) Teams

NewTeams returns an instance of the Teams interface

type TeamsResult

type TeamsResult struct {
	PageInfo *pagination.PageInfo
	Teams    []models.Team
}

TeamsResult contains the response data and page information

type TerraformModuleAttestationFilter

type TerraformModuleAttestationFilter struct {
	Digest               *string
	ModuleID             *string
	ModuleAttestationIDs []string
}

TerraformModuleAttestationFilter contains the supported fields for filtering TerraformModuleAttestation resources

type TerraformModuleAttestationSortableField

type TerraformModuleAttestationSortableField string

TerraformModuleAttestationSortableField represents the fields that a moduleAttestation can be sorted by

const (
	TerraformModuleAttestationSortableFieldPredicateAsc  TerraformModuleAttestationSortableField = "PREDICATE_ASC"
	TerraformModuleAttestationSortableFieldPredicateDesc TerraformModuleAttestationSortableField = "PREDICATE_DESC"
	TerraformModuleAttestationSortableFieldCreatedAtAsc  TerraformModuleAttestationSortableField = "CREATED_AT_ASC"
	TerraformModuleAttestationSortableFieldCreatedAtDesc TerraformModuleAttestationSortableField = "CREATED_AT_DESC"
)

TerraformModuleAttestationSortableField constants

type TerraformModuleAttestations

type TerraformModuleAttestations interface {
	GetModuleAttestationByID(ctx context.Context, id string) (*models.TerraformModuleAttestation, error)
	GetModuleAttestations(ctx context.Context, input *GetModuleAttestationsInput) (*ModuleAttestationsResult, error)
	CreateModuleAttestation(ctx context.Context, moduleAttestation *models.TerraformModuleAttestation) (*models.TerraformModuleAttestation, error)
	UpdateModuleAttestation(ctx context.Context, moduleAttestation *models.TerraformModuleAttestation) (*models.TerraformModuleAttestation, error)
	DeleteModuleAttestation(ctx context.Context, moduleAttestation *models.TerraformModuleAttestation) error
}

TerraformModuleAttestations encapsulates the logic to access terraform module attestationsfrom the database

func NewTerraformModuleAttestations

func NewTerraformModuleAttestations(dbClient *Client) TerraformModuleAttestations

NewTerraformModuleAttestations returns an instance of the TerraformModuleAttestations interface

type TerraformModuleFilter

type TerraformModuleFilter struct {
	Search             *string
	Name               *string
	System             *string
	RootGroupID        *string
	GroupID            *string
	UserID             *string
	ServiceAccountID   *string
	TerraformModuleIDs []string
}

TerraformModuleFilter contains the supported fields for filtering TerraformModule resources

type TerraformModuleSortableField

type TerraformModuleSortableField string

TerraformModuleSortableField represents the fields that a module can be sorted by

const (
	TerraformModuleSortableFieldNameAsc       TerraformModuleSortableField = "NAME_ASC"
	TerraformModuleSortableFieldNameDesc      TerraformModuleSortableField = "NAME_DESC"
	TerraformModuleSortableFieldUpdatedAtAsc  TerraformModuleSortableField = "UPDATED_AT_ASC"
	TerraformModuleSortableFieldUpdatedAtDesc TerraformModuleSortableField = "UPDATED_AT_DESC"
)

TerraformModuleSortableField constants

type TerraformModuleVersionFilter

type TerraformModuleVersionFilter struct {
	ModuleID         *string
	Status           *models.TerraformModuleVersionStatus
	SemanticVersion  *string
	SHASum           []byte
	Latest           *bool
	ModuleVersionIDs []string
}

TerraformModuleVersionFilter contains the supported fields for filtering TerraformModuleVersion resources

type TerraformModuleVersionSortableField

type TerraformModuleVersionSortableField string

TerraformModuleVersionSortableField represents the fields that a module version can be sorted by

const (
	TerraformModuleVersionSortableFieldUpdatedAtAsc  TerraformModuleVersionSortableField = "UPDATED_AT_ASC"
	TerraformModuleVersionSortableFieldUpdatedAtDesc TerraformModuleVersionSortableField = "UPDATED_AT_DESC"
	TerraformModuleVersionSortableFieldCreatedAtAsc  TerraformModuleVersionSortableField = "CREATED_AT_ASC"
	TerraformModuleVersionSortableFieldCreatedAtDesc TerraformModuleVersionSortableField = "CREATED_AT_DESC"
)

TerraformModuleVersionSortableField constants

type TerraformModuleVersions

type TerraformModuleVersions interface {
	GetModuleVersionByID(ctx context.Context, id string) (*models.TerraformModuleVersion, error)
	GetModuleVersions(ctx context.Context, input *GetModuleVersionsInput) (*ModuleVersionsResult, error)
	CreateModuleVersion(ctx context.Context, moduleVersion *models.TerraformModuleVersion) (*models.TerraformModuleVersion, error)
	UpdateModuleVersion(ctx context.Context, moduleVersion *models.TerraformModuleVersion) (*models.TerraformModuleVersion, error)
	DeleteModuleVersion(ctx context.Context, moduleVersion *models.TerraformModuleVersion) error
}

TerraformModuleVersions encapsulates the logic to access terraform module versions from the database

func NewTerraformModuleVersions

func NewTerraformModuleVersions(dbClient *Client) TerraformModuleVersions

NewTerraformModuleVersions returns an instance of the TerraformModuleVersions interface

type TerraformModules

type TerraformModules interface {
	GetModuleByID(ctx context.Context, id string) (*models.TerraformModule, error)
	GetModuleByPath(ctx context.Context, path string) (*models.TerraformModule, error)
	GetModules(ctx context.Context, input *GetModulesInput) (*ModulesResult, error)
	CreateModule(ctx context.Context, module *models.TerraformModule) (*models.TerraformModule, error)
	UpdateModule(ctx context.Context, module *models.TerraformModule) (*models.TerraformModule, error)
	DeleteModule(ctx context.Context, module *models.TerraformModule) error
}

TerraformModules encapsulates the logic to access terraform modules from the database

func NewTerraformModules

func NewTerraformModules(dbClient *Client) TerraformModules

NewTerraformModules returns an instance of the TerraformModules interface

type TerraformProviderFilter

type TerraformProviderFilter struct {
	Search               *string
	Name                 *string
	RootGroupID          *string
	GroupID              *string
	UserID               *string
	ServiceAccountID     *string
	TerraformProviderIDs []string
}

TerraformProviderFilter contains the supported fields for filtering TerraformProvider resources

type TerraformProviderPlatformFilter

type TerraformProviderPlatformFilter struct {
	ProviderID        *string
	ProviderVersionID *string
	BinaryUploaded    *bool
	OperatingSystem   *string
	Architecture      *string
}

TerraformProviderPlatformFilter contains the supported fields for filtering TerraformProviderPlatform resources

type TerraformProviderPlatformMirrorFilter added in v0.12.0

type TerraformProviderPlatformMirrorFilter struct {
	VersionMirrorID *string
	OS              *string
	Architecture    *string
}

TerraformProviderPlatformMirrorFilter represents fields a TerraformProviderPlatformMirror can be filtered by.

type TerraformProviderPlatformMirrorSortableField added in v0.12.0

type TerraformProviderPlatformMirrorSortableField string

TerraformProviderPlatformMirrorSortableField represents fields that a TerraformProviderPlatformMirror can be sorted by.

const (
	TerraformProviderPlatformMirrorSortableFieldCreatedAtAsc  TerraformProviderPlatformMirrorSortableField = "CREATED_AT_ASC"
	TerraformProviderPlatformMirrorSortableFieldCreatedAtDesc TerraformProviderPlatformMirrorSortableField = "CREATED_AT_DESC"
)

TerraformProviderPlatformMirrorSortableField constants

type TerraformProviderPlatformMirrors added in v0.12.0

type TerraformProviderPlatformMirrors interface {
	GetPlatformMirrorByID(ctx context.Context, id string) (*models.TerraformProviderPlatformMirror, error)
	GetPlatformMirrors(ctx context.Context, input *GetProviderPlatformMirrorsInput) (*ProviderPlatformMirrorsResult, error)
	CreatePlatformMirror(ctx context.Context, platformMirror *models.TerraformProviderPlatformMirror) (*models.TerraformProviderPlatformMirror, error)
	DeletePlatformMirror(ctx context.Context, platformMirror *models.TerraformProviderPlatformMirror) error
}

TerraformProviderPlatformMirrors encapsulates the logic to access TerraformProviderPlatform from the DB.

func NewTerraformProviderPlatformMirrors added in v0.12.0

func NewTerraformProviderPlatformMirrors(dbClient *Client) TerraformProviderPlatformMirrors

NewTerraformProviderPlatformMirrors returns a new instance of TerraformProviderPlatformMirrors

type TerraformProviderPlatformSortableField

type TerraformProviderPlatformSortableField string

TerraformProviderPlatformSortableField represents the fields that a provider platform can be sorted by

const (
	TerraformProviderPlatformSortableFieldUpdatedAtAsc  TerraformProviderPlatformSortableField = "UPDATED_AT_ASC"
	TerraformProviderPlatformSortableFieldUpdatedAtDesc TerraformProviderPlatformSortableField = "UPDATED_AT_DESC"
)

TerraformProviderPlatformSortableField constants

type TerraformProviderPlatforms

type TerraformProviderPlatforms interface {
	GetProviderPlatformByID(ctx context.Context, id string) (*models.TerraformProviderPlatform, error)
	GetProviderPlatforms(ctx context.Context, input *GetProviderPlatformsInput) (*ProviderPlatformsResult, error)
	CreateProviderPlatform(ctx context.Context, providerPlatform *models.TerraformProviderPlatform) (*models.TerraformProviderPlatform, error)
	UpdateProviderPlatform(ctx context.Context, providerPlatform *models.TerraformProviderPlatform) (*models.TerraformProviderPlatform, error)
	DeleteProviderPlatform(ctx context.Context, providerPlatform *models.TerraformProviderPlatform) error
}

TerraformProviderPlatforms encapsulates the logic to access terraform provider platforms from the database

func NewTerraformProviderPlatforms

func NewTerraformProviderPlatforms(dbClient *Client) TerraformProviderPlatforms

NewTerraformProviderPlatforms returns an instance of the TerraformProviderPlatforms interface

type TerraformProviderSortableField

type TerraformProviderSortableField string

TerraformProviderSortableField represents the fields that a provider can be sorted by

const (
	TerraformProviderSortableFieldNameAsc       TerraformProviderSortableField = "NAME_ASC"
	TerraformProviderSortableFieldNameDesc      TerraformProviderSortableField = "NAME_DESC"
	TerraformProviderSortableFieldUpdatedAtAsc  TerraformProviderSortableField = "UPDATED_AT_ASC"
	TerraformProviderSortableFieldUpdatedAtDesc TerraformProviderSortableField = "UPDATED_AT_DESC"
)

TerraformProviderSortableField constants

type TerraformProviderVersionFilter

type TerraformProviderVersionFilter struct {
	ProviderID               *string
	SHASumsUploaded          *bool
	SHASumsSignatureUploaded *bool
	SemanticVersion          *string
	Latest                   *bool
	ProviderVersionIDs       []string
}

TerraformProviderVersionFilter contains the supported fields for filtering TerraformProviderVersion resources

type TerraformProviderVersionMirrorFilter added in v0.12.0

type TerraformProviderVersionMirrorFilter struct {
	RegistryHostname  *string
	RegistryNamespace *string
	Type              *string
	SemanticVersion   *string
	GroupID           *string
	VersionMirrorIDs  []string
	NamespacePaths    []string
}

TerraformProviderVersionMirrorFilter represents fields a TerraformProviderVersionMirror can be filtered by.

type TerraformProviderVersionMirrorSortableField added in v0.12.0

type TerraformProviderVersionMirrorSortableField string

TerraformProviderVersionMirrorSortableField represents fields that a TerraformProviderVersionMirror can be sorted by.

const (
	TerraformProviderVersionMirrorSortableFieldCreatedAtAsc        TerraformProviderVersionMirrorSortableField = "CREATED_AT_ASC"
	TerraformProviderVersionMirrorSortableFieldCreatedAtDesc       TerraformProviderVersionMirrorSortableField = "CREATED_AT_DESC"
	TerraformProviderVersionMirrorSortableFieldSemanticVersionAsc  TerraformProviderVersionMirrorSortableField = "SEMANTIC_VERSION_ASC"
	TerraformProviderVersionMirrorSortableFieldSemanticVersionDesc TerraformProviderVersionMirrorSortableField = "SEMANTIC_VERSION_DESC"
)

TerraformProviderVersionMirrorSortableField constants

type TerraformProviderVersionMirrors added in v0.12.0

type TerraformProviderVersionMirrors interface {
	GetVersionMirrorByID(ctx context.Context, id string) (*models.TerraformProviderVersionMirror, error)
	GetVersionMirrors(ctx context.Context, input *GetProviderVersionMirrorsInput) (*ProviderVersionMirrorsResult, error)
	CreateVersionMirror(ctx context.Context, versionMirror *models.TerraformProviderVersionMirror) (*models.TerraformProviderVersionMirror, error)
	DeleteVersionMirror(ctx context.Context, versionMirror *models.TerraformProviderVersionMirror) error
}

TerraformProviderVersionMirrors encapsulates the logic to access Terraform provider version mirrors from the DB

func NewTerraformProviderVersionMirrors added in v0.12.0

func NewTerraformProviderVersionMirrors(dbClient *Client) TerraformProviderVersionMirrors

NewTerraformProviderVersionMirrors returns a new TerraformProviderVersionMirrors instance

type TerraformProviderVersionSortableField

type TerraformProviderVersionSortableField string

TerraformProviderVersionSortableField represents the fields that a provider version can be sorted by

const (
	// TODO: remove version sortable field
	TerraformProviderVersionSortableFieldVersionAsc    TerraformProviderVersionSortableField = "VERSION_ASC"
	TerraformProviderVersionSortableFieldVersionDesc   TerraformProviderVersionSortableField = "VERSION_DESC"
	TerraformProviderVersionSortableFieldUpdatedAtAsc  TerraformProviderVersionSortableField = "UPDATED_AT_ASC"
	TerraformProviderVersionSortableFieldUpdatedAtDesc TerraformProviderVersionSortableField = "UPDATED_AT_DESC"
	TerraformProviderVersionSortableFieldCreatedAtAsc  TerraformProviderVersionSortableField = "CREATED_AT_ASC"
	TerraformProviderVersionSortableFieldCreatedAtDesc TerraformProviderVersionSortableField = "CREATED_AT_DESC"
)

TerraformProviderVersionSortableField constants

type TerraformProviderVersions

type TerraformProviderVersions interface {
	GetProviderVersionByID(ctx context.Context, id string) (*models.TerraformProviderVersion, error)
	GetProviderVersions(ctx context.Context, input *GetProviderVersionsInput) (*ProviderVersionsResult, error)
	CreateProviderVersion(ctx context.Context, providerVersion *models.TerraformProviderVersion) (*models.TerraformProviderVersion, error)
	UpdateProviderVersion(ctx context.Context, providerVersion *models.TerraformProviderVersion) (*models.TerraformProviderVersion, error)
	DeleteProviderVersion(ctx context.Context, providerVersion *models.TerraformProviderVersion) error
}

TerraformProviderVersions encapsulates the logic to access terraform provider versions from the database

func NewTerraformProviderVersions

func NewTerraformProviderVersions(dbClient *Client) TerraformProviderVersions

NewTerraformProviderVersions returns an instance of the TerraformProviderVersions interface

type TerraformProviders

type TerraformProviders interface {
	GetProviderByID(ctx context.Context, id string) (*models.TerraformProvider, error)
	GetProviderByPath(ctx context.Context, path string) (*models.TerraformProvider, error)
	GetProviders(ctx context.Context, input *GetProvidersInput) (*ProvidersResult, error)
	CreateProvider(ctx context.Context, provider *models.TerraformProvider) (*models.TerraformProvider, error)
	UpdateProvider(ctx context.Context, provider *models.TerraformProvider) (*models.TerraformProvider, error)
	DeleteProvider(ctx context.Context, provider *models.TerraformProvider) error
}

TerraformProviders encapsulates the logic to access terraform providers from the database

func NewTerraformProviders

func NewTerraformProviders(dbClient *Client) TerraformProviders

NewTerraformProviders returns an instance of the TerraformProviders interface

type Transactions

type Transactions interface {
	BeginTx(ctx context.Context) (context.Context, error)
	CommitTx(ctx context.Context) error
	RollbackTx(ctx context.Context) error
}

Transactions exposes DB transaction support

func NewTransactions

func NewTransactions(dbClient *Client) Transactions

NewTransactions returns an instance of the Transactions interface

type UserFilter

type UserFilter struct {
	UsernamePrefix *string
	UserIDs        []string
	SCIMExternalID bool
	Active         bool
}

UserFilter contains the supported fields for filtering User resources

type UserSortableField

type UserSortableField string

UserSortableField represents the fields that a user can be sorted by

const (
	UserSortableFieldUpdatedAtAsc  UserSortableField = "UPDATED_AT_ASC"
	UserSortableFieldUpdatedAtDesc UserSortableField = "UPDATED_AT_DESC"
)

UserSortableField constants

type Users

type Users interface {
	GetUserBySCIMExternalID(ctx context.Context, scimExternalID string) (*models.User, error)
	GetUserByExternalID(ctx context.Context, issuer string, externalID string) (*models.User, error)
	LinkUserWithExternalID(ctx context.Context, issuer string, externalID string, userID string) error
	GetUserByID(ctx context.Context, id string) (*models.User, error)
	GetUserByEmail(ctx context.Context, email string) (*models.User, error)
	GetUserByUsername(ctx context.Context, username string) (*models.User, error)
	GetUsers(ctx context.Context, input *GetUsersInput) (*UsersResult, error)
	UpdateUser(ctx context.Context, user *models.User) (*models.User, error)
	CreateUser(ctx context.Context, user *models.User) (*models.User, error)
	DeleteUser(ctx context.Context, user *models.User) error
}

Users encapsulates the logic to access users from the database

func NewUsers

func NewUsers(dbClient *Client) Users

NewUsers returns an instance of the Users interface

type UsersResult

type UsersResult struct {
	PageInfo *pagination.PageInfo
	Users    []models.User
}

UsersResult contains the response data and page information

type VCSEventFilter

type VCSEventFilter struct {
	WorkspaceID *string
	VCSEventIDs []string
}

VCSEventFilter contains the supported fields for filtering vcs event resources

type VCSEventSortableField

type VCSEventSortableField string

VCSEventSortableField represents the fields that a vcs event can be sorted by.

const (
	VCSEventSortableFieldCreatedAtAsc  VCSEventSortableField = "CREATED_AT_ASC"
	VCSEventSortableFieldCreatedAtDesc VCSEventSortableField = "CREATED_AT_DESC"
	VCSEventSortableFieldUpdatedAtAsc  VCSEventSortableField = "UPDATED_AT_ASC"
	VCSEventSortableFieldUpdatedAtDesc VCSEventSortableField = "UPDATED_AT_DESC"
)

VCSEventSortableField constants.

type VCSEvents

type VCSEvents interface {
	GetEventByID(ctx context.Context, id string) (*models.VCSEvent, error)
	GetEvents(ctx context.Context, input *GetVCSEventsInput) (*VCSEventsResult, error)
	CreateEvent(ctx context.Context, event *models.VCSEvent) (*models.VCSEvent, error)
	UpdateEvent(ctx context.Context, event *models.VCSEvent) (*models.VCSEvent, error)
}

VCSEvents encapsulates the logic for accessing vcs events form the database.

func NewVCSEvents

func NewVCSEvents(dbClient *Client) VCSEvents

NewVCSEvents returns an instance of the VCSEvents interface.

type VCSEventsResult

type VCSEventsResult struct {
	PageInfo  *pagination.PageInfo
	VCSEvents []models.VCSEvent
}

VCSEventsResult contains the response data and page information

type VCSProviderFilter

type VCSProviderFilter struct {
	Search         *string
	VCSProviderIDs []string
	NamespacePaths []string
}

VCSProviderFilter contains the supported fields for filtering VCSProvider resources.

type VCSProviderSortableField

type VCSProviderSortableField string

VCSProviderSortableField represents the fields that a VCS provider can be sorted by.

const (
	VCSProviderSortableFieldCreatedAtAsc   VCSProviderSortableField = "CREATED_AT_ASC"
	VCSProviderSortableFieldCreatedAtDesc  VCSProviderSortableField = "CREATED_AT_DESC"
	VCSProviderSortableFieldUpdatedAtAsc   VCSProviderSortableField = "UPDATED_AT_ASC"
	VCSProviderSortableFieldUpdatedAtDesc  VCSProviderSortableField = "UPDATED_AT_DESC"
	VCSProviderSortableFieldGroupLevelAsc  VCSProviderSortableField = "GROUP_LEVEL_ASC"
	VCSProviderSortableFieldGroupLevelDesc VCSProviderSortableField = "GROUP_LEVEL_DESC"
)

VCSProviderSortableField constants

type VCSProviders

type VCSProviders interface {
	GetProviderByID(ctx context.Context, id string) (*models.VCSProvider, error)
	GetProviderByOAuthState(ctx context.Context, state string) (*models.VCSProvider, error)
	GetProviders(ctx context.Context, input *GetVCSProvidersInput) (*VCSProvidersResult, error)
	CreateProvider(ctx context.Context, provider *models.VCSProvider) (*models.VCSProvider, error)
	UpdateProvider(ctx context.Context, provider *models.VCSProvider) (*models.VCSProvider, error)
	DeleteProvider(ctx context.Context, provider *models.VCSProvider) error
}

VCSProviders encapsulates the logic to access VCS providers from the database.

func NewVCSProviders

func NewVCSProviders(dbClient *Client) VCSProviders

NewVCSProviders returns an instance of the VCSProviders interface.

type VCSProvidersResult

type VCSProvidersResult struct {
	PageInfo     *pagination.PageInfo
	VCSProviders []models.VCSProvider
}

VCSProvidersResult contains the response data and page information.

type VariableFilter

type VariableFilter struct {
	NamespacePaths []string
	VariableIDs    []string
}

VariableFilter contains the supported fields for filtering Variable resources

type VariableResult

type VariableResult struct {
	PageInfo  *pagination.PageInfo
	Variables []models.Variable
}

VariableResult contains the response data and page information

type VariableSortableField

type VariableSortableField string

VariableSortableField represents the fields that a variable can be sorted by

const (
	VariableSortableFieldKeyAsc            VariableSortableField = "KEY_ASC"
	VariableSortableFieldKeyDesc           VariableSortableField = "KEY_DESC"
	VariableSortableFieldCreatedAtAsc      VariableSortableField = "CREATED_AT_ASC"
	VariableSortableFieldCreatedAtDesc     VariableSortableField = "CREATED_AT_DESC"
	VariableSortableFieldNamespacePathAsc  VariableSortableField = "NAMESPACE_PATH_ASC"
	VariableSortableFieldNamespacePathDesc VariableSortableField = "NAMESPACE_PATH_DESC"
)

VariableSortableField constants

type Variables

type Variables interface {
	GetVariables(ctx context.Context, input *GetVariablesInput) (*VariableResult, error)
	GetVariableByID(ctx context.Context, id string) (*models.Variable, error)
	CreateVariable(ctx context.Context, input *models.Variable) (*models.Variable, error)
	CreateVariables(ctx context.Context, namespacePath string, variables []models.Variable) error
	UpdateVariable(ctx context.Context, variable *models.Variable) (*models.Variable, error)
	DeleteVariable(ctx context.Context, variable *models.Variable) error
	DeleteVariables(ctx context.Context, namespacePath string, category models.VariableCategory) error
}

Variables encapsulates the logic to access variables from the database

func NewVariables

func NewVariables(dbClient *Client) Variables

NewVariables returns an instance of the Variables interface

type WorkspaceFilter

type WorkspaceFilter struct {
	GroupID                   *string
	UserMemberID              *string
	ServiceAccountMemberID    *string
	Search                    *string
	AssignedManagedIdentityID *string
	WorkspaceIDs              []string
}

WorkspaceFilter contains the supported fields for filtering Workspace resources

type WorkspaceSortableField

type WorkspaceSortableField string

WorkspaceSortableField represents the fields that a workspace can be sorted by

const (
	WorkspaceSortableFieldFullPathAsc   WorkspaceSortableField = "FULL_PATH_ASC"
	WorkspaceSortableFieldFullPathDesc  WorkspaceSortableField = "FULL_PATH_DESC"
	WorkspaceSortableFieldUpdatedAtAsc  WorkspaceSortableField = "UPDATED_AT_ASC"
	WorkspaceSortableFieldUpdatedAtDesc WorkspaceSortableField = "UPDATED_AT_DESC"
)

WorkspaceSortableField constants

type WorkspaceVCSProviderLinks interface {
	GetLinksByProviderID(ctx context.Context, providerID string) ([]models.WorkspaceVCSProviderLink, error)
	GetLinkByID(ctx context.Context, id string) (*models.WorkspaceVCSProviderLink, error)
	GetLinkByWorkspaceID(ctx context.Context, workspaceID string) (*models.WorkspaceVCSProviderLink, error)
	CreateLink(ctx context.Context, link *models.WorkspaceVCSProviderLink) (*models.WorkspaceVCSProviderLink, error)
	UpdateLink(ctx context.Context, link *models.WorkspaceVCSProviderLink) (*models.WorkspaceVCSProviderLink, error)
	DeleteLink(ctx context.Context, provider *models.WorkspaceVCSProviderLink) error
}

WorkspaceVCSProviderLinks encapsulates the logic to access workspace vcs provider links from the database.

func NewWorkspaceVCSProviderLinks(dbClient *Client) WorkspaceVCSProviderLinks

NewWorkspaceVCSProviderLinks returns an instance of the VCSProviderLinks interface.

type Workspaces

type Workspaces interface {
	GetWorkspaceByFullPath(ctx context.Context, path string) (*models.Workspace, error)
	GetWorkspaceByID(ctx context.Context, id string) (*models.Workspace, error)
	GetWorkspaces(ctx context.Context, input *GetWorkspacesInput) (*WorkspacesResult, error)
	UpdateWorkspace(ctx context.Context, workspace *models.Workspace) (*models.Workspace, error)
	CreateWorkspace(ctx context.Context, workspace *models.Workspace) (*models.Workspace, error)
	DeleteWorkspace(ctx context.Context, workspace *models.Workspace) error
	GetWorkspacesForManagedIdentity(ctx context.Context, managedIdentityID string) ([]models.Workspace, error)
}

Workspaces encapsulates the logic to access workspaces from the database

func NewWorkspaces

func NewWorkspaces(dbClient *Client) Workspaces

NewWorkspaces returns an instance of the Workspaces interface

type WorkspacesResult

type WorkspacesResult struct {
	PageInfo   *pagination.PageInfo
	Workspaces []models.Workspace
}

WorkspacesResult contains the response data and page information

Source Files

Jump to

Keyboard shortcuts

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