import.go 691 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
}