Documentation ¶
Index ¶
- type GitilesRepo
- func (r *GitilesRepo) Branch() string
- func (r *GitilesRepo) ConvertRevisions(ctx context.Context, commits []*vcsinfo.LongCommit) ([]*revision.Revision, error)
- func (r *GitilesRepo) GetFile(ctx context.Context, file, ref string) (string, error)
- func (r *GitilesRepo) GetRevision(ctx context.Context, id string) (*revision.Revision, error)
- func (r *GitilesRepo) GetTipRevision(ctx context.Context) (*revision.Revision, error)
- func (r *GitilesRepo) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
- func (r *GitilesRepo) VFS(ctx context.Context, rev *revision.Revision) (vfs.FS, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitilesRepo ¶
type GitilesRepo struct { gitiles.GitilesRepo // contains filtered or unexported fields }
GitilesRepo provides helpers for dealing with repos which use Gitiles.
func NewGitilesRepo ¶
func NewGitilesRepo(ctx context.Context, c *config.GitilesConfig, reg *config_vars.Registry, client *http.Client) (*GitilesRepo, error)
NewGitilesRepo returns a GitilesRepo instance.
func (*GitilesRepo) Branch ¶
func (r *GitilesRepo) Branch() string
Branch returns the resolved name of the branch tracked by this GitilesRepo.
func (*GitilesRepo) ConvertRevisions ¶
func (r *GitilesRepo) ConvertRevisions(ctx context.Context, commits []*vcsinfo.LongCommit) ([]*revision.Revision, error)
ConvertRevisions converts the given slice of LongCommits to Revisions.
func (*GitilesRepo) GetRevision ¶
GetRevision returns a revision.Revision instance associated with the given revision ID, which may be a commit hash or fully-qualified ref name.
func (*GitilesRepo) GetTipRevision ¶
GetTipRevision returns a revision.Revision instance associated with the current tip of the branch tracked by this GitilesRepo.
func (*GitilesRepo) LogRevisions ¶
func (r *GitilesRepo) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
LogRevisions implements the child.Child interface.
Click to show internal directories.
Click to hide internal directories.