db

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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       *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 *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
	// 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(ctx context.Context)

Close will close the database connections

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              *PageInfo
	ConfigurationVersions []models.ConfigurationVersion
}

ConfigurationVersionsResult contains the response data and page information

type CreateNamespaceMembershipInput

type CreateNamespaceMembershipInput struct {
	NamespacePath    string
	UserID           *string
	ServiceAccountID *string
	TeamID           *string
	Role             models.Role
}

CreateNamespaceMembershipInput is the input for creating a new namespace membership

type CursorFunc

type CursorFunc func(item interface{}) (*string, error)

CursorFunc creates an opaque cursor string

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"
)

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 *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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// Filter is used to filter the results
	Filter *JobFilter
}

GetJobsInput is the input for listing jobs

type GetManagedIdentitiesInput

type GetManagedIdentitiesInput struct {
	// Sort specifies the field to sort on and direction
	Sort *ManagedIdentitySortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// Filter is used to filter the results
	Filter *PlanFilter
}

GetPlansInput is the input for listing workspaces

type GetProviderPlatformsInput

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

GetProviderPlatformsInput is the input for listing terraform provider platforms

type GetProviderVersionsInput

type GetProviderVersionsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *TerraformProviderVersionSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// 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 *PaginationOptions
	// Filter is used to filter the results
	Filter *TerraformProviderFilter
}

GetProvidersInput is the input for listing terraform providers

type GetRunsInput

type GetRunsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *RunSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// 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 *PaginationOptions
	// Filter is used to filter the results
	Filter *WorkspaceFilter
}

GetWorkspacesInput is the input for listing workspaces

type GroupFilter

type GroupFilter struct {
	ParentID     *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"
)

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)
}

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 *PageInfo
	Groups   []models.Group
}

GroupsResult contains the response data and page information

type JobFilter

type JobFilter struct {
	RunID       *string
	WorkspaceID *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"
	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)
	GetJobLogDescriptor(ctx context.Context, id string) (*models.JobLogDescriptor, error)
	GetJobLogDescriptorByJobID(ctx context.Context, jobID string) (*models.JobLogDescriptor, error)
	CreateJobLogDescriptor(ctx context.Context, descriptor *models.JobLogDescriptor) (*models.JobLogDescriptor, error)
	UpdateJobLogDescriptor(ctx context.Context, descriptor *models.JobLogDescriptor) (*models.JobLogDescriptor, 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 *PageInfo
	Jobs     []models.Job
}

JobsResult contains the response data and page information

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          *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                   *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"
)

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) 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) 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) CreateJobLogDescriptor

func (_m *MockJobs) CreateJobLogDescriptor(ctx context.Context, descriptor *models.JobLogDescriptor) (*models.JobLogDescriptor, error)

CreateJobLogDescriptor provides a mock function with given fields: ctx, descriptor

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) GetJobLogDescriptor

func (_m *MockJobs) GetJobLogDescriptor(ctx context.Context, id string) (*models.JobLogDescriptor, error)

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

func (*MockJobs) GetJobLogDescriptorByJobID

func (_m *MockJobs) GetJobLogDescriptorByJobID(ctx context.Context, jobID string) (*models.JobLogDescriptor, error)

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

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

func (*MockJobs) UpdateJobLogDescriptor

func (_m *MockJobs) UpdateJobLogDescriptor(ctx context.Context, descriptor *models.JobLogDescriptor) (*models.JobLogDescriptor, error)

UpdateJobLogDescriptor provides a mock function with given fields: ctx, descriptor

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 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) 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) 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 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 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 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 Mockconnection

type Mockconnection struct {
	mock.Mock
}

Mockconnection is an autogenerated mock type for the connection type

func NewMockconnection

func NewMockconnection(t mockConstructorTestingTNewMockconnection) *Mockconnection

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

func (*Mockconnection) Begin

func (_m *Mockconnection) Begin(ctx context.Context) (pgx.Tx, error)

Begin provides a mock function with given fields: ctx

func (*Mockconnection) Exec

func (_m *Mockconnection) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)

Exec provides a mock function with given fields: ctx, sql, arguments

func (*Mockconnection) Query

func (_m *Mockconnection) Query(ctx context.Context, sql string, optionsAndArgs ...interface{}) (pgx.Rows, error)

Query provides a mock function with given fields: ctx, sql, optionsAndArgs

func (*Mockconnection) QueryRow

func (_m *Mockconnection) QueryRow(ctx context.Context, sql string, optionsAndArgs ...interface{}) pgx.Row

QueryRow provides a mock function with given fields: ctx, sql, optionsAndArgs

type ModuleAttestationsResult

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

ModuleAttestationsResult contains the response data and page information

type ModuleVersionsResult

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

ModuleVersionsResult contains the response data and page information

type ModulesResult

type ModulesResult struct {
	PageInfo *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
	NamespacePaths         []string
	NamespaceMembershipIDs []string
}

NamespaceMembershipFilter contains the supported fields for filtering NamespaceMembership resources

type NamespaceMembershipResult

type NamespaceMembershipResult struct {
	PageInfo             *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 PageInfo

type PageInfo struct {
	Cursor          CursorFunc
	TotalCount      int32
	HasNextPage     bool
	HasPreviousPage bool
}

PageInfo contains the page information

type PaginationOptions

type PaginationOptions struct {
	Before *string
	After  *string
	First  *int32
	Last   *int32
}

PaginationOptions contain the cursor based pagination options

func (*PaginationOptions) Validate

func (po *PaginationOptions) Validate() error

Validate returns an error if the options are not valid.

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 *PageInfo
	Plans    []models.Plan
}

PlansResult contains the response data and page information

type ProviderPlatformsResult

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

ProviderPlatformsResult contains the response data and page information

type ProviderVersionsResult

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

ProviderVersionsResult contains the response data and page information

type ProvidersResult

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

ProvidersResult contains the response data and page information

type RunFilter

type RunFilter struct {
	PlanID      *string
	ApplyID     *string
	WorkspaceID *string
	GroupID     *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 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 *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
	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"
)

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
}

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        *PageInfo
	ServiceAccounts []models.ServiceAccount
}

ServiceAccountsResult contains the response data and page information

type SortDirection

type SortDirection string

SortDirection indicates the direction for sorting results

const (
	AscSort  SortDirection = "ASC"
	DescSort SortDirection = "DESC"
)

SortDirection constants

type StateVersionFilter

type StateVersionFilter struct {
	WorkspaceID     *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)
	// GetStateVersionByRunID returns the state version associated with the specified run
	GetStateVersionByRunID(ctx context.Context, runID 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      *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    *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 *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           *string
	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 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 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 *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  *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"
)

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     *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  *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
	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   *PageInfo
	Workspaces []models.Workspace
}

WorkspacesResult contains the response data and page information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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