filebrowser

package
v0.0.885 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMainAndCurrentBranchRefs

func GetMainAndCurrentBranchRefs(scmClient scmProviderClient, fullName, eventRef string) ([]string, error)

GetMainAndCurrentBranchRefs a function to return the main branch then the eventRef

Types

type Interface

type Interface interface {
	// GetMainAndCurrentBranchRefs returns the main branch then the ref value if its different
	GetMainAndCurrentBranchRefs(owner, repo, ref string) ([]string, error)

	// GetFile returns a file from the given path in the repository with the given sha
	GetFile(owner, repo, path, ref string) ([]byte, error)

	// ListFiles returns the file and directory entries in the given path in the repository with the given sha
	ListFiles(owner, repo, path, ref string) ([]*scm.FileEntry, error)
}

Interface an interface to represent browsing files in a repository

func NewFileBrowserFromGitClient

func NewFileBrowserFromGitClient(clientFactory git.ClientFactory) Interface

NewFileBrowserFromGitClient creates a new file browser from an Scm client

func NewFileBrowserFromScmClient

func NewFileBrowserFromScmClient(scmClient scmProviderClient) Interface

NewFileBrowserFromScmClient creates a new file browser from an Scm client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL