helpers

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const ExternalConfigRoot = ".weave-gitops"
View Source
const InAppRoot = ".weave-gitops"

Variables

View Source
var ErrFileMismatch = errors.New("file mismatch")
View Source
var ErrPathMismatch = errors.New("path mismatch")

Functions

func DiffFS

func DiffFS(actual WeGODirectoryFS, expected WeGODirectoryFS) (string, error)

func Filenames

func Filenames(fs WeGODirectoryFS) []string

func GetIgnoreSpec added in v0.5.0

func GetIgnoreSpec() *string

func NewGithubClient

func NewGithubClient(ctx context.Context, token string) *ghAPI.Client

Types

type FileFetcher added in v0.5.0

type FileFetcher interface {
	GetFilesForPullRequest(ctx context.Context, id int, org, repoName string, fs WeGODirectoryFS) (WeGODirectoryFS, error)
}

func NewFileFetcher added in v0.5.0

func NewFileFetcher(name gitproviders.GitProviderName, token string) (FileFetcher, error)

type WeGODirectoryFS

type WeGODirectoryFS map[string]interface{}

func GetGithubFilesContents added in v0.6.0

func GetGithubFilesContents(ctx context.Context, gh *ghAPI.Client, org, repoName string, fs WeGODirectoryFS, files []*ghAPI.CommitFile) (WeGODirectoryFS, error)

func GetGitlabFilesContents added in v0.6.0

func GetGitlabFilesContents(gl *glAPI.Client, fullRepoPath string, fs WeGODirectoryFS, commitSHA string, files []*glAPI.Diff) (WeGODirectoryFS, error)

func MakeWeGOFS

func MakeWeGOFS(root, appName, clusterName string) WeGODirectoryFS

Jump to

Keyboard shortcuts

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