Documentation ¶
Index ¶
- Variables
- type BatchSpecWorkspaceResolution
- type Namespace
- type Opts
- type RepoWorkspace
- type Service
- func (svc *Service) ApplyBatchChange(ctx context.Context, spec graphql.BatchSpecID) (*graphql.BatchChange, error)
- func (svc *Service) BuildTasks(attributes *templatelib.BatchChangeAttributes, steps []batcheslib.Step, ...) []*executor.Task
- func (svc *Service) CreateBatchSpec(ctx context.Context, namespace, spec string, ids []graphql.ChangesetSpecID) (graphql.BatchSpecID, string, error)
- func (svc *Service) CreateBatchSpecFromRaw(ctx context.Context, batchSpec string, namespaceID string, allowIgnored bool, ...) (string, error)
- func (svc *Service) CreateChangesetSpec(ctx context.Context, spec *batcheslib.ChangesetSpec) (graphql.ChangesetSpecID, error)
- func (svc *Service) CreateImportChangesetSpecs(ctx context.Context, batchSpec *batcheslib.BatchSpec) ([]*batcheslib.ChangesetSpec, error)
- func (svc *Service) DetermineLicenseAndFeatureFlags(ctx context.Context, skipErrors bool) (*batches.LicenseRestrictions, *batches.FeatureFlags, error)
- func (svc *Service) EnsureDockerImages(ctx context.Context, imageCache docker.ImageCache, steps []batcheslib.Step, ...) (map[string]docker.Image, error)
- func (svc *Service) ExecuteBatchSpec(ctx context.Context, batchSpecID string, noCache bool) (string, error)
- func (svc *Service) GenerateExampleSpec(ctx context.Context, fileName string) error
- func (svc *Service) GetBatchSpecWorkspaceResolution(ctx context.Context, id string) (*BatchSpecWorkspaceResolution, error)
- func (svc *Service) ParseBatchSpec(dir string, data []byte) (*batcheslib.BatchSpec, error)
- func (svc *Service) ResolveNamespace(ctx context.Context, namespace string) (Namespace, error)
- func (svc *Service) ResolveWorkspacesForBatchSpec(ctx context.Context, spec *batcheslib.BatchSpec, ...) ([]RepoWorkspace, []*graphql.Repository, error)
- func (svc *Service) UploadBatchSpecWorkspaceFiles(ctx context.Context, workingDir string, batchSpecID string, ...) error
- func (svc *Service) UpsertBatchChange(ctx context.Context, name string, namespaceID string) (string, string, error)
- func (svc *Service) ValidateChangesetSpecs(repos []*graphql.Repository, specs []*batcheslib.ChangesetSpec) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMalformedOnQueryOrRepository = errors.New("malformed 'on' field; missing either a repository name or a query")
)
Functions ¶
This section is empty.
Types ¶
type RepoWorkspace ¶
type RepoWorkspace struct { Repo *graphql.Repository Path string OnlyFetchWorkspace bool }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ApplyBatchChange ¶
func (svc *Service) ApplyBatchChange(ctx context.Context, spec graphql.BatchSpecID) (*graphql.BatchChange, error)
func (*Service) BuildTasks ¶
func (svc *Service) BuildTasks(attributes *templatelib.BatchChangeAttributes, steps []batcheslib.Step, workspaces []RepoWorkspace) []*executor.Task
func (*Service) CreateBatchSpec ¶
func (svc *Service) CreateBatchSpec(ctx context.Context, namespace, spec string, ids []graphql.ChangesetSpecID) (graphql.BatchSpecID, string, error)
func (*Service) CreateBatchSpecFromRaw ¶
func (*Service) CreateChangesetSpec ¶
func (svc *Service) CreateChangesetSpec(ctx context.Context, spec *batcheslib.ChangesetSpec) (graphql.ChangesetSpecID, error)
func (*Service) CreateImportChangesetSpecs ¶
func (svc *Service) CreateImportChangesetSpecs(ctx context.Context, batchSpec *batcheslib.BatchSpec) ([]*batcheslib.ChangesetSpec, error)
func (*Service) DetermineLicenseAndFeatureFlags ¶
func (svc *Service) DetermineLicenseAndFeatureFlags(ctx context.Context, skipErrors bool) (*batches.LicenseRestrictions, *batches.FeatureFlags, error)
DetermineLicenseAndFeatureFlags returns the enabled features and license restrictions configured for the Sourcegraph instance.
func (*Service) EnsureDockerImages ¶
func (svc *Service) EnsureDockerImages( ctx context.Context, imageCache docker.ImageCache, steps []batcheslib.Step, parallelism int, progress func(done, total int), ) (map[string]docker.Image, error)
EnsureDockerImages iterates over the steps within the batch spec to ensure the images exist and to determine the exact content digest to be used when running each step, including any required by the service itself.
Progress information is reported back to the given progress function.
func (*Service) ExecuteBatchSpec ¶
func (*Service) GenerateExampleSpec ¶
func (*Service) GetBatchSpecWorkspaceResolution ¶
func (*Service) ParseBatchSpec ¶
func (*Service) ResolveNamespace ¶
func (*Service) ResolveWorkspacesForBatchSpec ¶
func (svc *Service) ResolveWorkspacesForBatchSpec(ctx context.Context, spec *batcheslib.BatchSpec, allowUnsupported, allowIgnored bool) ([]RepoWorkspace, []*graphql.Repository, error)
func (*Service) UploadBatchSpecWorkspaceFiles ¶
func (svc *Service) UploadBatchSpecWorkspaceFiles(ctx context.Context, workingDir string, batchSpecID string, steps []batches.Step) error
UploadBatchSpecWorkspaceFiles uploads workspace files to the server.
func (*Service) UpsertBatchChange ¶
func (*Service) ValidateChangesetSpecs ¶
func (svc *Service) ValidateChangesetSpecs(repos []*graphql.Repository, specs []*batcheslib.ChangesetSpec) error
ValidateChangesetSpecs validates that among all branch changesets there are no duplicates in branch names in a single repo.
Click to show internal directories.
Click to hide internal directories.