freeleaps-ops/operators/freeleaps-gitops-initializer/internal/repo/mgr.go
zhenyus 0e256f8708 chore(git): code staging
Signed-off-by: zhenyus <zhenyus@mathmast.com>
2025-02-17 14:02:49 +08:00

28 lines
561 B
Go

package repo
import "context"
const (
DefaultAuthorName = "freeleaps-gitops-bot"
DefaultAuthorEmail = "gitops@mathmast.com"
)
type FileOperation string
const (
OpCreate FileOperation = "create"
OpUpdate FileOperation = "update"
OpDelete FileOperation = "delete"
)
type ChangeRequest struct {
Path string
Content []byte // nil for delete
Operation FileOperation
}
type RepoManager interface {
Initialize(context context.Context, opts ...Option) error
ApplyChanges(context context.Context, changes []ChangeRequest, message string) error
}