Documentation ¶
Index ¶
- Variables
- func CIPDInstanceToRevision(name string, instance *cipd_api.InstanceDescription, revisionIdTag string, ...) (*revision.Revision, error)
- func NewSemVerGCS(ctx context.Context, c *config.SemVerGCSChildConfig, reg *config_vars.Registry, ...) (*gcsChild, error)
- func ShortRev(reTmpl string, id string) (string, error)
- type CIPDChild
- func (c *CIPDChild) GetRevision(ctx context.Context, id string) (*revision.Revision, error)
- func (c *CIPDChild) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
- func (c *CIPDChild) SetClientForTesting(client cipd.CIPDClient)
- func (c *CIPDChild) Update(ctx context.Context, lastRollRev *revision.Revision) (*revision.Revision, []*revision.Revision, error)
- func (c *CIPDChild) VFS(ctx context.Context, rev *revision.Revision) (vfs.FS, error)
- type Child
- type DockerChild
- func (c *DockerChild) GetRevision(ctx context.Context, id string) (*revision.Revision, error)
- func (c *DockerChild) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
- func (c *DockerChild) Update(ctx context.Context, lastRollRev *revision.Revision) (*revision.Revision, []*revision.Revision, error)
- func (c *DockerChild) VFS(ctx context.Context, rev *revision.Revision) (vfs.FS, error)
- type FuchsiaSDKChild
- func (c *FuchsiaSDKChild) GetRevision(ctx context.Context, id string) (*revision.Revision, error)
- func (c *FuchsiaSDKChild) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
- func (c *FuchsiaSDKChild) Update(ctx context.Context, lastRollRev *revision.Revision) (*revision.Revision, []*revision.Revision, error)
- func (c *FuchsiaSDKChild) VFS(ctx context.Context, rev *revision.Revision) (vfs.FS, error)
- type GitCheckoutChild
- type GitCheckoutGithubChild
Constants ¶
This section is empty.
Variables ¶
var ErrShortRevNoMatch = errors.New("Revision ID does not match provided regular expression")
ErrShortRevNoMatch is returned by ShortRev when the revision ID does not match the regular expression.
Functions ¶
func CIPDInstanceToRevision ¶
func CIPDInstanceToRevision(name string, instance *cipd_api.InstanceDescription, revisionIdTag string, revisionIdTagStripKey bool) (*revision.Revision, error)
CIPDInstanceToRevision creates a revision.Revision based on the given InstanceInfo.
func NewSemVerGCS ¶
func NewSemVerGCS(ctx context.Context, c *config.SemVerGCSChildConfig, reg *config_vars.Registry, client *http.Client) (*gcsChild, error)
NewSemVerGCS returns a Child which uses semantic versioning to compare object versions in GCS.
Types ¶
type CIPDChild ¶
type CIPDChild struct {
// contains filtered or unexported fields
}
CIPDChild is an implementation of Child which deals with a CIPD package.
func NewCIPD ¶
func NewCIPD(ctx context.Context, c *config.CIPDChildConfig, reg *config_vars.Registry, client *http.Client, workdir string) (*CIPDChild, error)
NewCIPD returns an implementation of Child which deals with a CIPD package. If the caller calls CIPDChild.Download, the destination must be a descendant of the provided workdir.
func (*CIPDChild) GetRevision ¶
GetRevision implements Child.
func (*CIPDChild) LogRevisions ¶
func (c *CIPDChild) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
LogRevisions implements Child.
func (*CIPDChild) SetClientForTesting ¶
func (c *CIPDChild) SetClientForTesting(client cipd.CIPDClient)
SetClientForTesting sets the CIPDClient used by the CIPDChild so that it can be overridden for testing.
type Child ¶
type Child interface { // Update updates the local view of the Child and returns the tip-of- // tree Revision and the list of not-yet-rolled revisions, or any error // which occurred, given the last-rolled revision. Update(context.Context, *revision.Revision) (*revision.Revision, []*revision.Revision, error) // GetRevision returns a Revision instance associated with the given // revision ID. GetRevision(context.Context, string) (*revision.Revision, error) // LogRevisions returns a list of Revision instances between two revisions. LogRevisions(context.Context, *revision.Revision, *revision.Revision) ([]*revision.Revision, error) // VFS returns a vfs.FS instance which reads from this Child at the given // Revision. VFS(context.Context, *revision.Revision) (vfs.FS, error) }
Child represents a Child (git repo or otherwise) which can be rolled into a Parent.
func NewGitiles ¶
func NewGitiles(ctx context.Context, c *config.GitilesChildConfig, reg *config_vars.Registry, client *http.Client) (Child, error)
NewGitiles returns an implementation of Child which uses Gitiles rather than a local checkout.
type DockerChild ¶
type DockerChild struct {
// contains filtered or unexported fields
}
DockerChild is an implementation of Child which deals with Docker images.
func NewDocker ¶
func NewDocker(ctx context.Context, c *config.DockerChildConfig) (*DockerChild, error)
NewDocker returns an implementation of Child which deals with Docker images.
func (*DockerChild) GetRevision ¶
GetRevision implements Child.
func (*DockerChild) LogRevisions ¶
func (c *DockerChild) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
LogRevisions implements Child.
type FuchsiaSDKChild ¶
type FuchsiaSDKChild struct {
// contains filtered or unexported fields
}
FuchsiaSDKChild is an implementation of Child which deals with the Fuchsia SDK.
func NewFuchsiaSDK ¶
func NewFuchsiaSDK(ctx context.Context, c *config.FuchsiaSDKChildConfig, client *http.Client) (*FuchsiaSDKChild, error)
NewFuchsiaSDK returns a Child implementation which deals with the Fuchsia SDK.
func (*FuchsiaSDKChild) GetRevision ¶
GetRevision implements Child.
func (*FuchsiaSDKChild) LogRevisions ¶
func (c *FuchsiaSDKChild) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
LogRevisions implements Child.
type GitCheckoutChild ¶
type GitCheckoutChild struct {
*git_common.Checkout
}
GitCheckoutChild is an implementation of Child which uses a local Git checkout.
func NewGitCheckout ¶
func NewGitCheckout(ctx context.Context, c *config.GitCheckoutChildConfig, reg *config_vars.Registry, workdir string, cr codereview.CodeReview, co git.Checkout) (*GitCheckoutChild, error)
NewGitCheckout returns an implementation of Child which uses a local Git checkout.
type GitCheckoutGithubChild ¶
type GitCheckoutGithubChild struct { *GitCheckoutChild // contains filtered or unexported fields }
GitCheckoutGithubChild is an implementation of Child which uses a local Git checkout of a Github repo.
func NewGitCheckoutGithub ¶
func NewGitCheckoutGithub(ctx context.Context, c *config.GitCheckoutGitHubChildConfig, reg *config_vars.Registry, workdir string, cr codereview.CodeReview, co git.Checkout) (*GitCheckoutGithubChild, error)
NewGitCheckoutGithub returns an implementation of Child which uses a local Git checkout of a Github repo.
func (*GitCheckoutGithubChild) GetRevision ¶
func (c *GitCheckoutGithubChild) GetRevision(ctx context.Context, id string) (*revision.Revision, error)
GetRevision implements Child.