// Copyright (c) 2023 Open Anolis Community Distro SIG, all rights reserved. // // Author: Jacob Wang // Xiao Lun // Zhao Hang package data import ( "hash" "github.com/go-git/go-git/v5" ) type ImportMode interface { RetrieveSource(pd *ProcessData) (*ModeData, error) WriteSource(pd *ProcessData, md *ModeData) error PostProcess(md *ModeData) error ImportName(pd *ProcessData, md *ModeData) string } type ModeData struct { Name string Repo *git.Repository Worktree *git.Worktree FileWrites map[string][]byte TagBranch string PushBranch string Branches []string SourcesToIgnore []*IgnoredSource BlobCache map[string][]byte } type IgnoredSource struct { Name string HashFunction hash.Hash Expired bool }