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 NewGithubClient(ctx context.Context, token string) *ghAPI.Client
- type WeGODirectoryFS
- func GenerateExpectedFS(req *pb.AddApplicationRequest, root, clusterName string, ...) WeGODirectoryFS
- func GetFileContents(ctx context.Context, gh *ghAPI.Client, org, repoName string, ...) (WeGODirectoryFS, error)
- func GetFilesForPullRequest(ctx context.Context, gh *ghAPI.Client, org, repoName string, ...) (WeGODirectoryFS, error)
- func MakeWeGOFS(root, appName, clusterName string) WeGODirectoryFS
Constants ¶
View Source
const ExternalConfigRoot = ""
View Source
const InAppRoot = ".wego"
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
Types ¶
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 GetFileContents ¶
func GetFileContents(ctx context.Context, gh *ghAPI.Client, org, repoName string, fs WeGODirectoryFS, files []*ghAPI.CommitFile) (WeGODirectoryFS, error)
func GetFilesForPullRequest ¶
func GetFilesForPullRequest(ctx context.Context, gh *ghAPI.Client, org, repoName string, fs WeGODirectoryFS) (WeGODirectoryFS, error)
func MakeWeGOFS ¶
func MakeWeGOFS(root, appName, clusterName string) WeGODirectoryFS
Click to show internal directories.
Click to hide internal directories.