buf: github.com/bufbuild/buf/internal/pkg/git Index | Files

package git

import "github.com/bufbuild/buf/internal/pkg/git"


Package Files

branch.go cloner.go git.go ref.go ref_branch.go

type CloneToBucketOptions Uses

type CloneToBucketOptions struct {
    Mapper            storage.Mapper
    Name              Name
    RecurseSubmodules bool

CloneToBucketOptions are options for Clone.

type Cloner Uses

type Cloner interface {
    // CloneToBucket clones the repository to the bucket.
    // The url must contain the scheme, including file:// if necessary.
    // depth must be > 0.
        ctx context.Context,
        envContainer app.EnvContainer,
        url string,
        depth uint32,
        writeBucket storage.WriteBucket,
        options CloneToBucketOptions,
    ) error

Cloner clones git repositories to buckets.

func NewCloner Uses

func NewCloner(logger *zap.Logger, options ClonerOptions) Cloner

NewCloner returns a new Cloner.

type ClonerOptions Uses

type ClonerOptions struct {
    HTTPSUsernameEnvKey      string
    HTTPSPasswordEnvKey      string
    SSHKeyFileEnvKey         string
    SSHKnownHostsFilesEnvKey string

ClonerOptions are options for a new Cloner.

type Name Uses

type Name interface {
    // contains filtered or unexported methods

Name is a name identifiable by git.

func NewBranchName Uses

func NewBranchName(branch string) Name

NewBranchName returns a new Name for the branch.

func NewRefName Uses

func NewRefName(ref string) Name

NewRefName returns a new Name for the ref.

func NewRefNameWithBranch Uses

func NewRefNameWithBranch(ref string, branch string) Name

NewRefNameWithBranch returns a new Name for the ref while setting branch as the clone target.

func NewTagName Uses

func NewTagName(tag string) Name

NewTagName returns a new Name for the tag.

Package git imports 15 packages (graph) and is imported by 2 packages. Updated 2020-10-20. Refresh now. Tools for package owners.