autopatcher

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: AGPL-3.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const AutopatherFilename = "autopatcher.latest_patch.json"

Variables

View Source
var PATH_SEPARATOR = ""

Functions

func AdjustFoldersInPath

func AdjustFoldersInPath(relative_patch_filepath string, freelancer_folder Filesystem) string

AdjustFoldersInPatch replaces folder names in path to relevant case sensitive folders And creates them if they don't exist

func RunAutopatcher

func RunAutopatcher()

func WriteToFile

func WriteToFile(path string, content []byte)

Types

type BadassRoot

type BadassRoot struct {
	XMLName      xml.Name `xml:"BadassRoot"`
	Text         string   `xml:",chardata"`
	Xsd          string   `xml:"xsd,attr"`
	Xsi          string   `xml:"xsi,attr"`
	PatchHistory struct {
		Text  string   `xml:",chardata"`
		Patch []string `xml:"Patch"`
	} `xml:"PatchHistory"`
}

type File

type File struct {
	// contains filtered or unexported fields
}

func NewFile

func NewFile(path string) File

func (File) GetLowerPath

func (f File) GetLowerPath() string

func (File) GetPath

func (f File) GetPath() string

func (File) GetRelPathTo

func (f File) GetRelPathTo(root string) string

type Filesystem

type Filesystem struct {
	Files         []File
	LowerMapFiles map[string]File

	Folders         []File
	LowerMapFolders map[string]File
}

func ScanCaseInsensitiveFS

func ScanCaseInsensitiveFS(fs_path string) Filesystem

type Patch

type Patch struct {
	Filename string
	Url      string
	Hash     PatchHash
	Name     string
}

func (Patch) GetFilepath

func (patch Patch) GetFilepath() string

func (Patch) GetFolderPath

func (patch Patch) GetFolderPath() string

type PatchHash

type PatchHash string

type PatcherData

type PatcherData struct {
	XMLName   xml.Name `xml:"PatcherData"`
	Text      string   `xml:",chardata"`
	PatchList struct {
		Text  string `xml:",chardata"`
		Patch []struct {
			Text    string `xml:",chardata"`
			URL     string `xml:"url,attr"`
			Md5hash string `xml:"md5hash,attr"`
		} `xml:"patch"`
	} `xml:"PatchList"`
}

type RequestResp

type RequestResp struct {
	Body       []byte
	StatusCode int
}

func Request

func Request(url string) RequestResp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL