validation

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttemptExtractDataFromPak

func AttemptExtractDataFromPak(ctx context.Context, reader parser.PakReader) (data map[string]map[string][]interface{}, err error)

func DecodeArrayProperty

func DecodeArrayProperty(ctx context.Context, property *parser.FPropertyTag) []interface{}

func DecodeProperty

func DecodeProperty(ctx context.Context, cleanName string, property *parser.FPropertyTag) interface{}

func DecodePropertyFields

func DecodePropertyFields(ctx context.Context, properties []*parser.FPropertyTag) map[string]interface{}

func DecodeStructProperty

func DecodeStructProperty(ctx context.Context, property *parser.FPropertyTag) interface{}

func ExtractDataFromPak

func ExtractDataFromPak(ctx context.Context, reader parser.PakReader) map[string]map[string][]interface{}

TODO Extract Images

func FPackageIndexToString

func FPackageIndexToString(index interface{}) string

func FPackageIndexToStringSpecial

func FPackageIndexToStringSpecial(index interface{}) string

func GetTreeSize

func GetTreeSize(className string) int

func InitializeValidator

func InitializeValidator()

func InitializeVirusTotal

func InitializeVirusTotal()

func IsA

func IsA(child string, parent string) bool

func ScanFiles

func ScanFiles(ctx context.Context, files []io.Reader, names []string) (bool, error)

Types

type AnalysisResults

type AnalysisResults struct {
	Attributes struct {
		Status string `json:"status"`
		Stats  *struct {
			Suspicious *int `json:"suspicious,omitempty"`
			Malicious  *int `json:"malicious,omitempty"`
		} `json:"stats,omitempty"`
	} `json:"attributes,omitempty"`
}

type ModInfo

type ModInfo struct {
	ModReference         string                                `json:"mod_reference"`
	Version              string                                `json:"version"`
	Objects              []ModObject                           `json:"objects"`
	Dependencies         map[string]string                     `json:"dependencies"`
	OptionalDependencies map[string]string                     `json:"optional_dependencies"`
	Metadata             []map[string]map[string][]interface{} `json:"-"`
	Size                 int64                                 `json:"-"`
	Hash                 string                                `json:"-"`
	Semver               *semver.Version                       `json:"-"`
	SMLVersion           string                                `json:"sml_version"`
}

func ExtractModInfo

func ExtractModInfo(ctx context.Context, body []byte, withMetadata bool, withValidation bool, modReference string) (*ModInfo, error)

type ModObject

type ModObject struct {
	Path string `json:"path"`
	Type string `json:"type"`
}

type Plugin

type Plugin struct {
	Name          string `json:"Name"`
	SemVersion    string `json:"SemVersion"`
	BIsBasePlugin *bool  `json:"bIsBasePlugin"`
	BIsOptional   *bool  `json:"bIsOptional"`
}

type UPlugin

type UPlugin struct {
	SemVersion *string  `json:"SemVersion"`
	Version    int64    `json:"Version"`
	Plugins    []Plugin `json:"Plugins"`
}

Jump to

Keyboard shortcuts

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