mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-11-10 23:31:26 +00:00
33 lines
691 B
Go
33 lines
691 B
Go
package data
|
|
|
|
import (
|
|
"github.com/cavaliercoder/go-rpm"
|
|
"github.com/go-git/go-git/v5"
|
|
"hash"
|
|
)
|
|
|
|
type ImportMode interface {
|
|
RetrieveSource(pd *ProcessData) *ModeData
|
|
WriteSource(pd *ProcessData, md *ModeData)
|
|
PostProcess(md *ModeData)
|
|
ImportName(pd *ProcessData, md *ModeData) string
|
|
}
|
|
|
|
type ModeData struct {
|
|
Repo *git.Repository
|
|
Worktree *git.Worktree
|
|
RpmFile *rpm.PackageFile
|
|
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
|
|
}
|