Versions in this module Expand all Collapse all v0 v0.0.7 Sep 19, 2021 Changes in this version + func New(path string, opts ...Option) (*gorm.DB, error) + type Apply struct + ExternalID string + LogsBlobID string + ResourceAdditions int + ResourceChanges int + ResourceDestructions int + RunID uint + Status tfe.ApplyStatus + StatusTimestamps *ApplyStatusTimestamps + func (model *Apply) FromDomain(domain *otf.Apply) + func (model *Apply) ToDomain() *otf.Apply + func (model *Apply) Update(fn func(*otf.Apply) error) error + type ApplyList []Apply + func (l ApplyList) ToDomain() (dl []*otf.Apply) + type ApplyStatusTimestamps struct + CanceledAt sql.NullTime + ErroredAt sql.NullTime + FinishedAt sql.NullTime + ForceCanceledAt sql.NullTime + QueuedAt sql.NullTime + StartedAt sql.NullTime + type ConfigurationVersion struct + AutoQueueRuns bool + BlobID string + Error string + ErrorMessage string + ExternalID string + Source tfe.ConfigurationSource + Speculative bool + Status tfe.ConfigurationStatus + StatusTimestamps *tfe.CVStatusTimestamps + Workspace *Workspace + WorkspaceID uint + func (model *ConfigurationVersion) FromDomain(domain *otf.ConfigurationVersion) + func (model *ConfigurationVersion) ToDomain() *otf.ConfigurationVersion + func (model *ConfigurationVersion) Update(fn func(*otf.ConfigurationVersion) error) error + type ConfigurationVersionDB struct + func NewConfigurationVersionDB(db *gorm.DB) *ConfigurationVersionDB + func (db ConfigurationVersionDB) Create(cv *otf.ConfigurationVersion) (*otf.ConfigurationVersion, error) + func (db ConfigurationVersionDB) Get(opts otf.ConfigurationVersionGetOptions) (*otf.ConfigurationVersion, error) + func (db ConfigurationVersionDB) List(workspaceID string, opts otf.ConfigurationVersionListOptions) (*otf.ConfigurationVersionList, error) + func (db ConfigurationVersionDB) Update(id string, fn func(*otf.ConfigurationVersion) error) (*otf.ConfigurationVersion, error) + type ConfigurationVersionList []ConfigurationVersion + func (l ConfigurationVersionList) ToDomain() (dl []*otf.ConfigurationVersion) + type Option func(*gorm.Config) + func WithZeroLogger(logger *zerolog.Logger) Option + type Organization struct + CollaboratorAuthPolicy tfe.AuthPolicyType + CostEstimationEnabled bool + Email string + ExternalID string + Name string + OwnersTeamSAMLRoleID string + Permissions *tfe.OrganizationPermissions + SAMLEnabled bool + SessionRemember int + SessionTimeout int + TrialExpiresAt time.Time + TwoFactorConformant bool + func (model *Organization) FromDomain(org *otf.Organization) + func (model *Organization) ToDomain() *otf.Organization + func (model *Organization) Update(fn func(*otf.Organization) error) error + type OrganizationDB struct + func NewOrganizationDB(db *gorm.DB) *OrganizationDB + func (db OrganizationDB) Create(domain *otf.Organization) (*otf.Organization, error) + func (db OrganizationDB) Delete(name string) error + func (db OrganizationDB) Get(name string) (*otf.Organization, error) + func (db OrganizationDB) List(opts tfe.OrganizationListOptions) (*otf.OrganizationList, error) + func (db OrganizationDB) Update(name string, fn func(*otf.Organization) error) (*otf.Organization, error) + type OrganizationList []Organization + func (l OrganizationList) ToDomain() (dl []*otf.Organization) + type Plan struct + ExternalID string + LogsBlobID string + PlanFileBlobID string + PlanJSONBlobID string + ResourceAdditions int + ResourceChanges int + ResourceDestructions int + RunID uint + Status tfe.PlanStatus + StatusTimestamps *PlanStatusTimestamps + func (model *Plan) FromDomain(domain *otf.Plan) + func (model *Plan) ToDomain() *otf.Plan + func (model *Plan) Update(fn func(*otf.Plan) error) error + type PlanList []Plan + func (l PlanList) ToDomain() (dl []*otf.Plan) + type PlanStatusTimestamps struct + CanceledAt sql.NullTime + ErroredAt sql.NullTime + FinishedAt sql.NullTime + ForceCanceledAt sql.NullTime + QueuedAt sql.NullTime + StartedAt sql.NullTime + type Run struct + Apply *Apply + ConfigurationVersion *ConfigurationVersion + ConfigurationVersionID uint + ExternalID string + ForceCancelAvailableAt time.Time + IsDestroy bool + Message string + Permissions *tfe.RunPermissions + Plan *Plan + PositionInQueue int + Refresh bool + RefreshOnly bool + ReplaceAddrs string + Status tfe.RunStatus + StatusTimestamps *RunStatusTimestamps + TargetAddrs string + Workspace *Workspace + WorkspaceID uint + func NewFromDomain(domain *otf.Run) *Run + func (model *Run) FromDomain(domain *otf.Run) + func (model *Run) ToDomain() *otf.Run + func (model *Run) Update(fn func(*otf.Run) error) error + type RunDB struct + func NewRunDB(db *gorm.DB) *RunDB + func (db RunDB) Create(domain *otf.Run) (*otf.Run, error) + func (db RunDB) Get(opts otf.RunGetOptions) (*otf.Run, error) + func (db RunDB) List(opts otf.RunListOptions) (*otf.RunList, error) + func (db RunDB) Update(id string, fn func(*otf.Run) error) (*otf.Run, error) + type RunList []Run + func (l RunList) ToDomain() (dl []*otf.Run) + type RunStatusTimestamps struct + AppliedAt sql.NullTime + ApplyQueuedAt sql.NullTime + ApplyingAt sql.NullTime + CanceledAt sql.NullTime + ConfirmedAt sql.NullTime + CostEstimatedAt sql.NullTime + CostEstimatingAt sql.NullTime + DiscardedAt sql.NullTime + ErroredAt sql.NullTime + ForceCanceledAt sql.NullTime + PlanQueueableAt sql.NullTime + PlanQueuedAt sql.NullTime + PlannedAndFinishedAt sql.NullTime + PlannedAt sql.NullTime + PlanningAt sql.NullTime + PolicyCheckedAt sql.NullTime + PolicySoftFailedAt sql.NullTime + type StateVersion struct + BlobID string + ExternalID string + Outputs []*StateVersionOutput + Serial int64 + VCSCommitSHA string + VCSCommitURL string + Workspace *Workspace + WorkspaceID uint + func (model *StateVersion) FromDomain(domain *otf.StateVersion) + func (model *StateVersion) ToDomain() *otf.StateVersion + type StateVersionList []StateVersion + func (l StateVersionList) ToDomain() (dl []*otf.StateVersion) + type StateVersionOutput struct + ExternalID string + Name string + Sensitive bool + StateVersionID uint + Type string + Value string + func NewStateVersionOutputFromDomain(domain *otf.StateVersionOutput) *StateVersionOutput + func (model *StateVersionOutput) ToDomain() *otf.StateVersionOutput + type StateVersionOutputList []StateVersionOutput + func (l StateVersionOutputList) ToDomain() (dl []*otf.StateVersionOutput) + type StateVersionService struct + func NewStateVersionDB(db *gorm.DB) *StateVersionService + func (s StateVersionService) Create(sv *otf.StateVersion) (*otf.StateVersion, error) + func (s StateVersionService) Get(opts otf.StateVersionGetOptions) (*otf.StateVersion, error) + func (s StateVersionService) List(opts tfe.StateVersionListOptions) (*otf.StateVersionList, error) + type Workspace struct + AllowDestroyPlan bool + ApplyDurationAverage time.Duration + AutoApply bool + CanQueueDestroyPlan bool + Description string + Environment string + ExecutionMode string + ExternalID string + FileTriggersEnabled bool + GlobalRemoteState bool + Locked bool + MigrationEnvironment string + Name string + Organization *Organization + OrganizationID uint + Permissions *tfe.WorkspacePermissions + PlanDurationAverage time.Duration + PolicyCheckFailures int + QueueAllRuns bool + ResourceCount int + RunFailures int + RunsCount int + SourceName string + SourceURL string + SpeculativeEnabled bool + StructuredRunOutputEnabled bool + TerraformVersion string + TriggerPrefixes string + VCSRepo *tfe.VCSRepo + WorkingDirectory string + func (model *Workspace) FromDomain(domain *otf.Workspace) + func (model *Workspace) ToDomain() *otf.Workspace + func (model *Workspace) Update(fn func(*otf.Workspace) error) error + type WorkspaceDB struct + func NewWorkspaceDB(db *gorm.DB) *WorkspaceDB + func (db WorkspaceDB) Create(domain *otf.Workspace) (*otf.Workspace, error) + func (db WorkspaceDB) Delete(spec otf.WorkspaceSpecifier) error + func (db WorkspaceDB) Get(spec otf.WorkspaceSpecifier) (*otf.Workspace, error) + func (db WorkspaceDB) List(opts otf.WorkspaceListOptions) (*otf.WorkspaceList, error) + func (db WorkspaceDB) Update(spec otf.WorkspaceSpecifier, fn func(*otf.Workspace) error) (*otf.Workspace, error) + type WorkspaceList []Workspace + func (l WorkspaceList) ToDomain() (dl []*otf.Workspace)