handler

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Port: 3000,
	User: "ss-o",
}

Functions

This section is empty.

Types

type Asset added in v1.2.0

type Asset struct {
	Name, OS, Arch, URL, Type, SHA256 string
}

func (Asset) Is32Bit added in v1.2.0

func (a Asset) Is32Bit() bool

func (Asset) IsMac added in v1.2.0

func (a Asset) IsMac() bool

func (Asset) IsMacM1 added in v1.2.0

func (a Asset) IsMacM1() bool

func (Asset) Key added in v1.2.0

func (a Asset) Key() string

type Assets added in v1.2.0

type Assets []Asset

func (Assets) HasM1 added in v1.2.0

func (as Assets) HasM1() bool

type Config

type Config struct {
	Host      string `opts:"help=host, env=HTTP_HOST"`
	Port      int    `opts:"help=port, env"`
	User      string `opts:"help=default user for URL requests, env"`
	Token     string `opts:"help=token for GitHub API, env=GITHUB_TOKEN"`
	ForceUser string `opts:"help=forcefully use single owner, env=FORCE_USER"`
	ForceRepo string `opts:"help=forcefully use a single repository, env=FORCE_REPO"`
}

Configuration for the server.

type Handler

type Handler struct {
	Config
	// contains filtered or unexported fields
}

Handler serves install scripts using Github releases

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Query added in v1.2.0

type Query struct {
	User, Program, AsProgram, Release string
	MoveToPath, Google, Insecure      bool
}

type Result added in v1.2.0

type Result struct {
	Query
	Timestamp time.Time
	Assets    Assets
	M1Asset   bool
}

Jump to

Keyboard shortcuts

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