Documentation ¶
Index ¶
- Constants
- Variables
- func CreatePopulatedSourceRepo(ctx context.Context, gp gitprovider.Client, url string) (gitprovider.OrgRepository, *gitprovider.OrgRepositoryRef, error)
- func CreateRepo(ctx context.Context, gp gitprovider.Client, url string) (gitprovider.OrgRepository, *gitprovider.OrgRepositoryRef, error)
- func DiffFS(actual WeGODirectoryFS, expected WeGODirectoryFS) (string, error)
- func Filenames(fs WeGODirectoryFS) []string
- func GetIgnoreSpec() *string
- func NewGithubClient(ctx context.Context, token string) *ghAPI.Client
- type FileFetcher
- type WeGODirectoryFS
- func GenerateExpectedFS(req *pb.AddApplicationRequest, root, clusterName string, ...) WeGODirectoryFS
- func GetGithubFilesContents(ctx context.Context, gh *ghAPI.Client, org, repoName string, ...) (WeGODirectoryFS, error)
- func GetGitlabFilesContents(gl *glAPI.Client, fullRepoPath string, fs WeGODirectoryFS, commitSHA string, ...) (WeGODirectoryFS, error)
- func MakeWeGOFS(root, appName, clusterName string) WeGODirectoryFS
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 CreatePopulatedSourceRepo ¶
func CreatePopulatedSourceRepo(ctx context.Context, gp gitprovider.Client, url string) (gitprovider.OrgRepository, *gitprovider.OrgRepositoryRef, error)
func CreateRepo ¶
func CreateRepo(ctx context.Context, gp gitprovider.Client, url string) (gitprovider.OrgRepository, *gitprovider.OrgRepositoryRef, error)
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
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 GenerateExpectedFS ¶
func GenerateExpectedFS(req *pb.AddApplicationRequest, root, clusterName string, app wego.ApplicationSpec, k kustomizev2.KustomizationSpec, s sourcev1.GitRepositorySpec) WeGODirectoryFS
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
Click to show internal directories.
Click to hide internal directories.