policy

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package policy describes generic image uploader capabilities. Tracker-owned acceptance and ownership rules are exposed by the tracker registry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostAllowed

func HostAllowed(host string, allowed []string) bool

HostAllowed reports whether host is present in allowed; an empty allowlist permits every host.

func IsUploadHost

func IsUploadHost(host string) bool

IsUploadHost reports whether host has a configured uploader.

func KnownUploadHosts

func KnownUploadHosts() []string

KnownUploadHosts returns supported upload host names in deterministic order.

Types

type Metadata

type Metadata struct {
	// UploadHosts lists every configured uploader name.
	UploadHosts []string
	// TrackerUploadHosts maps tracker names to upload-capable accepted hosts.
	TrackerUploadHosts map[string][]string
	// OwnedHosts maps normalized host names to their owning tracker.
	OwnedHosts map[string]string
}

Metadata is a defensive snapshot of uploader and composed tracker policy data.

Jump to

Keyboard shortcuts

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