Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteForPaths ¶
func WriteForPaths(rootPath string, repoUrl string, drySha string, paths []*apiclient.PathDetails) error
WriteForPaths writes the manifests, hydrator.metadata, and README.md files for each path in the provided paths. It also writes a root-level hydrator.metadata file containing the repo URL and dry SHA.
Types ¶
type RepoClientFactory ¶
type RepoClientFactory interface {
NewClient(repo *v1alpha1.Repository, rootPath string) (git.Client, error)
}
RepoClientFactory is a factory for creating git clients for a repository.
func NewRepoClientFactory ¶
func NewRepoClientFactory(gitCredsStore git.CredsStore, metricsServer *metrics.Server) RepoClientFactory
NewRepoClientFactory returns a new instance of the repo client factory.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the service that handles commit requests.
func NewService ¶
func NewService(gitCredsStore git.CredsStore, metricsServer *metrics.Server) *Service
NewService returns a new instance of the commit service.
func (*Service) CommitHydratedManifests ¶
func (s *Service) CommitHydratedManifests(ctx context.Context, r *apiclient.CommitHydratedManifestsRequest) (*apiclient.CommitHydratedManifestsResponse, error)
CommitHydratedManifests handles a commit request. It clones the repository, checks out the sync branch, checks out the target branch, clears the repository contents, writes the manifests to the repository, commits the changes, and pushes the changes. It returns the hydrated revision SHA and an error if one occurred.