Documentation ¶
Index ¶
- Variables
- func NewIntegrationAttachmentRepo(data *Data, logger log.Logger) biz.IntegrationAttachmentRepo
- func NewIntegrationRepo(data *Data, logger log.Logger) biz.IntegrationRepo
- func NewMembershipRepo(data *Data, logger log.Logger) biz.MembershipRepo
- func NewOCIRepositoryRepo(data *Data, logger log.Logger) biz.OCIRepositoryRepo
- func NewOrgMetricsRepo(data *Data, l log.Logger) biz.OrgMetricsRepo
- func NewOrganizationRepo(data *Data, logger log.Logger) biz.OrganizationRepo
- func NewRobotAccountRepo(data *Data, logger log.Logger) biz.RobotAccountRepo
- func NewUserRepo(data *Data, logger log.Logger) biz.UserRepo
- func NewWorkflowContractRepo(data *Data, logger log.Logger) biz.WorkflowContractRepo
- func NewWorkflowRepo(data *Data, logger log.Logger) biz.WorkflowRepo
- func NewWorkflowRunRepo(data *Data, logger log.Logger) biz.WorkflowRunRepo
- type Data
- type IntegrationAttachmentRepo
- func (r *IntegrationAttachmentRepo) Create(ctx context.Context, integrationID, workflowID uuid.UUID, ...) (*biz.IntegrationAttachment, error)
- func (r *IntegrationAttachmentRepo) FindByIDInOrg(ctx context.Context, orgID, id uuid.UUID) (*biz.IntegrationAttachment, error)
- func (r *IntegrationAttachmentRepo) List(ctx context.Context, orgID, workflowID uuid.UUID) ([]*biz.IntegrationAttachment, error)
- func (r *IntegrationAttachmentRepo) SoftDelete(ctx context.Context, id uuid.UUID) error
- type IntegrationRepo
- func (r *IntegrationRepo) Create(ctx context.Context, orgID uuid.UUID, kind, secretName string, ...) (*biz.Integration, error)
- func (r *IntegrationRepo) FindByIDInOrg(ctx context.Context, orgID, id uuid.UUID) (*biz.Integration, error)
- func (r *IntegrationRepo) List(ctx context.Context, orgID uuid.UUID) ([]*biz.Integration, error)
- func (r *IntegrationRepo) SoftDelete(ctx context.Context, id uuid.UUID) error
- type MembershipRepo
- func (r *MembershipRepo) Create(ctx context.Context, orgID, userID uuid.UUID, current bool) (*biz.Membership, error)
- func (r *MembershipRepo) Delete(ctx context.Context, id uuid.UUID) error
- func (r *MembershipRepo) FindByIDInUser(ctx context.Context, userID, membershipID uuid.UUID) (*biz.Membership, error)
- func (r *MembershipRepo) FindByOrg(ctx context.Context, orgID uuid.UUID) ([]*biz.Membership, error)
- func (r *MembershipRepo) FindByUser(ctx context.Context, userID uuid.UUID) ([]*biz.Membership, error)
- func (r *MembershipRepo) SetCurrent(ctx context.Context, membershipID uuid.UUID) (*biz.Membership, error)
- type OCIRepositoryRepo
- func (r *OCIRepositoryRepo) Create(ctx context.Context, opts *biz.OCIRepoCreateOpts) (*biz.OCIRepository, error)
- func (r *OCIRepositoryRepo) Delete(ctx context.Context, id uuid.UUID) error
- func (r *OCIRepositoryRepo) FindByID(ctx context.Context, id uuid.UUID) (*biz.OCIRepository, error)
- func (r *OCIRepositoryRepo) FindMainRepo(ctx context.Context, orgID uuid.UUID) (*biz.OCIRepository, error)
- func (r *OCIRepositoryRepo) Update(ctx context.Context, opts *biz.OCIRepoUpdateOpts) (*biz.OCIRepository, error)
- func (r *OCIRepositoryRepo) UpdateValidationStatus(ctx context.Context, id uuid.UUID, status biz.OCIRepoValidationStatus) error
- type OrgMetricsRepo
- func (repo *OrgMetricsRepo) RunsByRunnerTypeTotal(ctx context.Context, orgID uuid.UUID, tw time.Duration) (map[string]int32, error)
- func (repo *OrgMetricsRepo) RunsByStatusTotal(ctx context.Context, orgID uuid.UUID, tw time.Duration) (map[string]int32, error)
- func (repo *OrgMetricsRepo) RunsTotal(ctx context.Context, orgID uuid.UUID, tw time.Duration) (int32, error)
- func (repo *OrgMetricsRepo) TopWorkflowsByRunsCount(ctx context.Context, orgID uuid.UUID, numWorkflows int, tw time.Duration) ([]*biz.TopWorkflowsByRunsCountItem, error)
- type OrganizationRepo
- type RobotAccountRepo
- func (r *RobotAccountRepo) Create(ctx context.Context, name string, workflowID uuid.UUID) (*biz.RobotAccount, error)
- func (r *RobotAccountRepo) FindByID(ctx context.Context, id uuid.UUID) (*biz.RobotAccount, error)
- func (r *RobotAccountRepo) List(ctx context.Context, workflowID uuid.UUID, includeRevoked bool) ([]*biz.RobotAccount, error)
- func (r *RobotAccountRepo) Revoke(ctx context.Context, orgID, id uuid.UUID) error
- type WorkflowContractRepo
- func (r *WorkflowContractRepo) Create(ctx context.Context, opts *biz.ContractCreateOpts) (*biz.WorkflowContract, error)
- func (r *WorkflowContractRepo) Describe(ctx context.Context, orgID, contractID uuid.UUID, revision int) (*biz.WorkflowContractWithVersion, error)
- func (r *WorkflowContractRepo) FindByIDInOrg(ctx context.Context, orgID, contractID uuid.UUID) (*biz.WorkflowContract, error)
- func (r *WorkflowContractRepo) FindVersionByID(ctx context.Context, versionID uuid.UUID) (*biz.WorkflowContractVersion, error)
- func (r *WorkflowContractRepo) List(ctx context.Context, orgID uuid.UUID) ([]*biz.WorkflowContract, error)
- func (r *WorkflowContractRepo) SoftDelete(ctx context.Context, id uuid.UUID) error
- func (r *WorkflowContractRepo) Update(ctx context.Context, opts *biz.ContractUpdateOpts) (*biz.WorkflowContractWithVersion, error)
- type WorkflowRepo
- func (r *WorkflowRepo) Create(ctx context.Context, opts *biz.CreateOpts) (*biz.Workflow, error)
- func (r *WorkflowRepo) FindByID(ctx context.Context, id uuid.UUID) (*biz.Workflow, error)
- func (r *WorkflowRepo) GetOrgScoped(ctx context.Context, orgID, workflowID uuid.UUID) (*biz.Workflow, error)
- func (r *WorkflowRepo) IncRunsCounter(ctx context.Context, workflowID uuid.UUID) error
- func (r *WorkflowRepo) List(ctx context.Context, orgID uuid.UUID) ([]*biz.Workflow, error)
- func (r *WorkflowRepo) SoftDelete(ctx context.Context, id uuid.UUID) error
- type WorkflowRunRepo
- func (r *WorkflowRunRepo) Create(ctx context.Context, workflowID, robotaccountID, schemaVersionID uuid.UUID, ...) (*biz.WorkflowRun, error)
- func (r *WorkflowRunRepo) Expire(ctx context.Context, id uuid.UUID) error
- func (r *WorkflowRunRepo) FindByID(ctx context.Context, id uuid.UUID) (*biz.WorkflowRun, error)
- func (r *WorkflowRunRepo) FindByIDInOrg(ctx context.Context, orgID, id uuid.UUID) (*biz.WorkflowRun, error)
- func (r *WorkflowRunRepo) List(ctx context.Context, orgID, workflowID uuid.UUID, p *pagination.Options) (result []*biz.WorkflowRun, cursor string, err error)
- func (r *WorkflowRunRepo) ListNotFinishedOlderThan(ctx context.Context, olderThan time.Time) ([]*biz.WorkflowRun, error)
- func (r *WorkflowRunRepo) MarkAsFinished(ctx context.Context, id uuid.UUID, status biz.WorkflowRunStatus, reason string) error
- func (r *WorkflowRunRepo) SaveAttestationRef(ctx context.Context, id uuid.UUID, ref *biz.AttestationRef) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewData, NewWorkflowRepo, NewUserRepo, NewRobotAccountRepo, NewWorkflowRunRepo, NewOrganizationRepo, NewWorkflowContractRepo, NewOCIRepositoryRepo, NewOrgMetricsRepo, NewIntegrationRepo, NewIntegrationAttachmentRepo, NewMembershipRepo, )
ProviderSet is data providers.
Functions ¶
func NewIntegrationAttachmentRepo ¶
func NewIntegrationAttachmentRepo(data *Data, logger log.Logger) biz.IntegrationAttachmentRepo
func NewIntegrationRepo ¶
func NewIntegrationRepo(data *Data, logger log.Logger) biz.IntegrationRepo
func NewMembershipRepo ¶
func NewMembershipRepo(data *Data, logger log.Logger) biz.MembershipRepo
func NewOCIRepositoryRepo ¶
func NewOCIRepositoryRepo(data *Data, logger log.Logger) biz.OCIRepositoryRepo
func NewOrgMetricsRepo ¶
func NewOrgMetricsRepo(data *Data, l log.Logger) biz.OrgMetricsRepo
func NewOrganizationRepo ¶
func NewOrganizationRepo(data *Data, logger log.Logger) biz.OrganizationRepo
func NewRobotAccountRepo ¶
func NewRobotAccountRepo(data *Data, logger log.Logger) biz.RobotAccountRepo
func NewWorkflowContractRepo ¶
func NewWorkflowContractRepo(data *Data, logger log.Logger) biz.WorkflowContractRepo
func NewWorkflowRepo ¶
func NewWorkflowRepo(data *Data, logger log.Logger) biz.WorkflowRepo
func NewWorkflowRunRepo ¶
func NewWorkflowRunRepo(data *Data, logger log.Logger) biz.WorkflowRunRepo
Types ¶
type IntegrationAttachmentRepo ¶
type IntegrationAttachmentRepo struct {
// contains filtered or unexported fields
}
func (*IntegrationAttachmentRepo) Create ¶
func (r *IntegrationAttachmentRepo) Create(ctx context.Context, integrationID, workflowID uuid.UUID, config *v1.IntegrationAttachmentConfig) (*biz.IntegrationAttachment, error)
func (*IntegrationAttachmentRepo) FindByIDInOrg ¶
func (r *IntegrationAttachmentRepo) FindByIDInOrg(ctx context.Context, orgID, id uuid.UUID) (*biz.IntegrationAttachment, error)
func (*IntegrationAttachmentRepo) List ¶
func (r *IntegrationAttachmentRepo) List(ctx context.Context, orgID, workflowID uuid.UUID) ([]*biz.IntegrationAttachment, error)
func (*IntegrationAttachmentRepo) SoftDelete ¶
type IntegrationRepo ¶
type IntegrationRepo struct {
// contains filtered or unexported fields
}
func (*IntegrationRepo) Create ¶
func (r *IntegrationRepo) Create(ctx context.Context, orgID uuid.UUID, kind, secretName string, config *v1.IntegrationConfig) (*biz.Integration, error)
func (*IntegrationRepo) FindByIDInOrg ¶
func (r *IntegrationRepo) FindByIDInOrg(ctx context.Context, orgID, id uuid.UUID) (*biz.Integration, error)
func (*IntegrationRepo) List ¶
func (r *IntegrationRepo) List(ctx context.Context, orgID uuid.UUID) ([]*biz.Integration, error)
func (*IntegrationRepo) SoftDelete ¶
type MembershipRepo ¶
type MembershipRepo struct {
// contains filtered or unexported fields
}
func (*MembershipRepo) Create ¶
func (r *MembershipRepo) Create(ctx context.Context, orgID, userID uuid.UUID, current bool) (*biz.Membership, error)
func (*MembershipRepo) FindByIDInUser ¶
func (r *MembershipRepo) FindByIDInUser(ctx context.Context, userID, membershipID uuid.UUID) (*biz.Membership, error)
func (*MembershipRepo) FindByOrg ¶
func (r *MembershipRepo) FindByOrg(ctx context.Context, orgID uuid.UUID) ([]*biz.Membership, error)
FindByOrg finds all memberships for a given organization
func (*MembershipRepo) FindByUser ¶
func (r *MembershipRepo) FindByUser(ctx context.Context, userID uuid.UUID) ([]*biz.Membership, error)
func (*MembershipRepo) SetCurrent ¶
func (r *MembershipRepo) SetCurrent(ctx context.Context, membershipID uuid.UUID) (*biz.Membership, error)
type OCIRepositoryRepo ¶
type OCIRepositoryRepo struct {
// contains filtered or unexported fields
}
func (*OCIRepositoryRepo) Create ¶
func (r *OCIRepositoryRepo) Create(ctx context.Context, opts *biz.OCIRepoCreateOpts) (*biz.OCIRepository, error)
func (*OCIRepositoryRepo) FindByID ¶
func (r *OCIRepositoryRepo) FindByID(ctx context.Context, id uuid.UUID) (*biz.OCIRepository, error)
FindByID finds an OCI repository by ID in the given organization. If not found, returns nil and no error
func (*OCIRepositoryRepo) FindMainRepo ¶
func (r *OCIRepositoryRepo) FindMainRepo(ctx context.Context, orgID uuid.UUID) (*biz.OCIRepository, error)
func (*OCIRepositoryRepo) Update ¶
func (r *OCIRepositoryRepo) Update(ctx context.Context, opts *biz.OCIRepoUpdateOpts) (*biz.OCIRepository, error)
func (*OCIRepositoryRepo) UpdateValidationStatus ¶
func (r *OCIRepositoryRepo) UpdateValidationStatus(ctx context.Context, id uuid.UUID, status biz.OCIRepoValidationStatus) error
UpdateValidationStatus updates the validation status of an OCI repository
type OrgMetricsRepo ¶
type OrgMetricsRepo struct {
// contains filtered or unexported fields
}
func (*OrgMetricsRepo) RunsByRunnerTypeTotal ¶
func (*OrgMetricsRepo) RunsByStatusTotal ¶
func (*OrgMetricsRepo) TopWorkflowsByRunsCount ¶
type OrganizationRepo ¶
type OrganizationRepo struct {
// contains filtered or unexported fields
}
func (*OrganizationRepo) Create ¶
func (r *OrganizationRepo) Create(ctx context.Context, name string) (*biz.Organization, error)
func (*OrganizationRepo) FindByID ¶
func (r *OrganizationRepo) FindByID(ctx context.Context, id uuid.UUID) (*biz.Organization, error)
type RobotAccountRepo ¶
type RobotAccountRepo struct {
// contains filtered or unexported fields
}
func (*RobotAccountRepo) Create ¶
func (r *RobotAccountRepo) Create(ctx context.Context, name string, workflowID uuid.UUID) (*biz.RobotAccount, error)
func (*RobotAccountRepo) FindByID ¶
func (r *RobotAccountRepo) FindByID(ctx context.Context, id uuid.UUID) (*biz.RobotAccount, error)
type WorkflowContractRepo ¶
type WorkflowContractRepo struct {
// contains filtered or unexported fields
}
func (*WorkflowContractRepo) Create ¶
func (r *WorkflowContractRepo) Create(ctx context.Context, opts *biz.ContractCreateOpts) (*biz.WorkflowContract, error)
func (*WorkflowContractRepo) Describe ¶
func (r *WorkflowContractRepo) Describe(ctx context.Context, orgID, contractID uuid.UUID, revision int) (*biz.WorkflowContractWithVersion, error)
func (*WorkflowContractRepo) FindByIDInOrg ¶
func (r *WorkflowContractRepo) FindByIDInOrg(ctx context.Context, orgID, contractID uuid.UUID) (*biz.WorkflowContract, error)
func (*WorkflowContractRepo) FindVersionByID ¶
func (r *WorkflowContractRepo) FindVersionByID(ctx context.Context, versionID uuid.UUID) (*biz.WorkflowContractVersion, error)
func (*WorkflowContractRepo) List ¶
func (r *WorkflowContractRepo) List(ctx context.Context, orgID uuid.UUID) ([]*biz.WorkflowContract, error)
func (*WorkflowContractRepo) SoftDelete ¶
func (*WorkflowContractRepo) Update ¶
func (r *WorkflowContractRepo) Update(ctx context.Context, opts *biz.ContractUpdateOpts) (*biz.WorkflowContractWithVersion, error)
Update will add a new version of the contract. NOTE: ContractVersions are imutable
type WorkflowRepo ¶
type WorkflowRepo struct {
// contains filtered or unexported fields
}
func (*WorkflowRepo) Create ¶
func (r *WorkflowRepo) Create(ctx context.Context, opts *biz.CreateOpts) (*biz.Workflow, error)
func (*WorkflowRepo) GetOrgScoped ¶
func (r *WorkflowRepo) GetOrgScoped(ctx context.Context, orgID, workflowID uuid.UUID) (*biz.Workflow, error)
Get a workflow making sure it belongs to a given org
func (*WorkflowRepo) IncRunsCounter ¶
func (*WorkflowRepo) SoftDelete ¶
type WorkflowRunRepo ¶
type WorkflowRunRepo struct {
// contains filtered or unexported fields
}
func (*WorkflowRunRepo) Create ¶
func (r *WorkflowRunRepo) Create(ctx context.Context, workflowID, robotaccountID, schemaVersionID uuid.UUID, runURL, runnerType string) (*biz.WorkflowRun, error)
func (*WorkflowRunRepo) FindByID ¶
func (r *WorkflowRunRepo) FindByID(ctx context.Context, id uuid.UUID) (*biz.WorkflowRun, error)
func (*WorkflowRunRepo) FindByIDInOrg ¶
func (r *WorkflowRunRepo) FindByIDInOrg(ctx context.Context, orgID, id uuid.UUID) (*biz.WorkflowRun, error)
func (*WorkflowRunRepo) List ¶
func (r *WorkflowRunRepo) List(ctx context.Context, orgID, workflowID uuid.UUID, p *pagination.Options) (result []*biz.WorkflowRun, cursor string, err error)
List the runs in an organization, optionally filtered out by workflow
func (*WorkflowRunRepo) ListNotFinishedOlderThan ¶
func (r *WorkflowRunRepo) ListNotFinishedOlderThan(ctx context.Context, olderThan time.Time) ([]*biz.WorkflowRun, error)
func (*WorkflowRunRepo) MarkAsFinished ¶
func (r *WorkflowRunRepo) MarkAsFinished(ctx context.Context, id uuid.UUID, status biz.WorkflowRunStatus, reason string) error
func (*WorkflowRunRepo) SaveAttestationRef ¶
func (r *WorkflowRunRepo) SaveAttestationRef(ctx context.Context, id uuid.UUID, ref *biz.AttestationRef) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.