releaseinputs

package
v0.9.4-dev.7 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: GPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package releaseinputs defines the reviewed, immutable inputs used to build Mihari all-in-one release bundles.

Index

Constants

View Source
const (
	// SchemaV1 identifies the first Mihari all-in-one release input lock schema.
	SchemaV1 = "mihari-aio-input-lock/v1"
	// MaxLockSize bounds a release input lock before JSON decoding.
	MaxLockSize = 1 << 20
)

Variables

This section is empty.

Functions

func Encode

func Encode(lock Lock) ([]byte, error)

Encode validates a lock and returns deterministic indented JSON ending in exactly one newline.

func RequiredPlatforms

func RequiredPlatforms() []string

RequiredPlatforms returns the exact platform keys required by the lock.

Types

type GeoIPFile

type GeoIPFile struct {
	Name   string `json:"name"`
	URL    string `json:"url"`
	SHA256 string `json:"sha256"`
}

GeoIPFile identifies and verifies one GeoIP database.

type GeoIPInputs

type GeoIPInputs struct {
	Repository string    `json:"repository"`
	Commit     string    `json:"commit"`
	Country    GeoIPFile `json:"country"`
	ASN        GeoIPFile `json:"asn"`
}

GeoIPInputs pins the GeoIP repository and both required databases.

type Lock

type Lock struct {
	Schema string       `json:"schema"`
	Mihomo MihomoInputs `json:"mihomo"`
	GeoIP  GeoIPInputs  `json:"geoip"`
}

Lock contains every immutable external input used by the all-in-one build.

func Decode

func Decode(reader io.Reader) (Lock, error)

Decode reads, strictly decodes, and validates a release input lock.

func Load

func Load(path string) (Lock, error)

Load opens, strictly decodes, and validates a release input lock file.

func (Lock) Validate

func (lock Lock) Validate() error

Validate checks the complete semantic and URL contract of a lock.

type MihomoAsset

type MihomoAsset struct {
	AssetID int64  `json:"asset_id"`
	Name    string `json:"name"`
	URL     string `json:"url"`
	Size    int64  `json:"size"`
	SHA256  string `json:"sha256"`
}

MihomoAsset identifies and verifies one platform-specific mihomo archive.

type MihomoInputs

type MihomoInputs struct {
	Repository string                 `json:"repository"`
	Channel    string                 `json:"channel"`
	ReleaseID  int64                  `json:"release_id"`
	Tag        string                 `json:"tag"`
	Assets     map[string]MihomoAsset `json:"assets"`
}

MihomoInputs identifies one release and its exact supported assets.

Jump to

Keyboard shortcuts

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