Documentation
¶
Index ¶
- Variables
- func Dedupe[K comparable](slice []K) []K
- func DownloadFile(filepath string, url string) (err error)
- func Exists(file string) bool
- func ReadGitignore(path string) (*gitignore.GitIgnore, bool)
- func Refresh() error
- func Serve() error
- func Setup()
- func SetupUpdaters()
- type HashStringer
- type HexStringer
- type Index
- func (in Index) GetAllMods() []string
- func (in Index) LoadAllMods() ([]*Mod, error)
- func (in *Index) Refresh() error
- func (in *Index) RelIndexPath(p string) (string, error)
- func (in Index) ResolveIndexPath(p string) string
- func (in *Index) UpdateFile(path string) error
- func (in *Index) UpdateFileHashGiven(path, format, hash string, markAsMetaFile bool) error
- func (in *Index) Write() error
- type IndexFile
- type IndexFileMultipleAlias
- type IndexFiles
- type IndexFilesTomlRepresentation
- type IndexPathHolder
- type IndexTomlRepresentation
- type LengthHasher
- type Mod
- type Number32As64Stringer
- type Number64Stringer
Constants ¶
This section is empty.
Variables ¶
View Source
var IgnoreDefaults = []string{
".git/**",
".gitattributes",
".gitignore",
".DS_Store",
"/*.zip",
"*.mrpack",
"packwiz.exe",
"packwiz",
}
Functions ¶
func Dedupe ¶
func Dedupe[K comparable](slice []K) []K
func DownloadFile ¶
func SetupUpdaters ¶
func SetupUpdaters()
Types ¶
type HashStringer ¶
func GetHashImpl ¶
func GetHashImpl(hashType string) (HashStringer, error)
type HexStringer ¶
func (HexStringer) HashToString ¶
func (HexStringer) HashToString(data []byte) string
type Index ¶
type Index struct {
HashFormat string
Files IndexFiles
IndexFile string
PackRoot string
}
func LoadIndexFile ¶
func (Index) GetAllMods ¶
func (Index) LoadAllMods ¶
func (Index) ResolveIndexPath ¶
func (*Index) UpdateFile ¶
func (*Index) UpdateFileHashGiven ¶
type IndexFile ¶
type IndexFile struct {
File string `toml:"file"`
Hash string `toml:"hash,omitempty"`
HashFormat string `toml:"hash-format,omitempty"`
Alias string `toml:"alias,omitempty"`
MetaFile bool `toml:"metafile,omitempty"`
Preserve bool `toml:"preserve,omitempty"`
// contains filtered or unexported fields
}
func (*IndexFile) IsMetaFile ¶
func (*IndexFile) MarkMetaFile ¶
func (i *IndexFile) MarkMetaFile()
func (*IndexFile) MarkedFound ¶
func (*IndexFile) UpdateHash ¶
type IndexFileMultipleAlias ¶
func (*IndexFileMultipleAlias) IsMetaFile ¶
func (i *IndexFileMultipleAlias) IsMetaFile() bool
func (*IndexFileMultipleAlias) MarkFound ¶
func (i *IndexFileMultipleAlias) MarkFound()
func (*IndexFileMultipleAlias) MarkMetaFile ¶
func (i *IndexFileMultipleAlias) MarkMetaFile()
func (*IndexFileMultipleAlias) MarkedFound ¶
func (i *IndexFileMultipleAlias) MarkedFound() bool
func (*IndexFileMultipleAlias) UpdateHash ¶
func (i *IndexFileMultipleAlias) UpdateHash(hash string, format string)
type IndexFiles ¶
type IndexFiles map[string]IndexPathHolder
func (*IndexFiles) ToTomlRep ¶
func (f *IndexFiles) ToTomlRep() IndexFilesTomlRepresentation
func (*IndexFiles) UpdateFileEntry ¶
func (f *IndexFiles) UpdateFileEntry(path string, format string, hash string, markAsMetaFile bool)
type IndexFilesTomlRepresentation ¶
type IndexFilesTomlRepresentation []IndexFile
func (IndexFilesTomlRepresentation) ToMemoryRep ¶
func (rep IndexFilesTomlRepresentation) ToMemoryRep() IndexFiles
type IndexPathHolder ¶
type IndexTomlRepresentation ¶
type IndexTomlRepresentation struct {
HashFormat string `toml:"hash-format"`
Files IndexFilesTomlRepresentation `toml:"files"`
}
type LengthHasher ¶
type LengthHasher struct {
// contains filtered or unexported fields
}
func (*LengthHasher) BlockSize ¶
func (h *LengthHasher) BlockSize() int
func (*LengthHasher) Reset ¶
func (h *LengthHasher) Reset()
func (*LengthHasher) Size ¶
func (h *LengthHasher) Size() int
func (*LengthHasher) Sum ¶
func (h *LengthHasher) Sum(b []byte) []byte
type Mod ¶
type Mod struct {
MetaFile string
Name string `toml:"name"`
FileName string `toml:"filename"`
Side string `toml:"side,omitempty"`
Download core.ModDownload `toml:"download"`
Update map[string]map[string]interface{} `toml:"update"`
UpdateData map[string]interface{}
Option *core.ModOption `toml:"option,omitempty"`
}
func (Mod) GetParsedUpdateData ¶
type Number32As64Stringer ¶
func (Number32As64Stringer) HashToString ¶
func (Number32As64Stringer) HashToString(data []byte) string
type Number64Stringer ¶
func (Number64Stringer) HashToString ¶
func (Number64Stringer) HashToString(data []byte) string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.