api

package
v1.20230612.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(msg string, err error)

func MigrateSource

func MigrateSource(source *Source)

Types

type HandlerSource

type HandlerSource struct {
	Type    string                 `json:"type"`
	Include RegexpList             `json:"include,omitempty"`
	Exclude RegexpList             `json:"exclude,omitempty"`
	Options map[string]interface{} `json:"options,omitempty"`
}

type Metadata

type Metadata struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type MirrorFileParams

type MirrorFileParams struct {
	Destination string            `json:"destination"`
	Location    string            `json:"location,omitempty"`
	Priority    *uint             `json:"priority,omitempty"`
	Env         map[string]string `json:"env,omitempty"`
}

type Regexp

type Regexp struct {
	*regexp.Regexp
}

func (*Regexp) UnmarshalJSON

func (r *Regexp) UnmarshalJSON(bytes []byte) error

type RegexpList

type RegexpList []*Regexp

func (RegexpList) AsRegexp

func (rl RegexpList) AsRegexp() []*regexp.Regexp

type Source

type Source struct {
	URI     string                 `json:"uri"`
	Options map[string]interface{} `json:"options,omitempty"`

	SkipHashVerification      bool   `json:"skip_hash_verification,omitempty"`
	SkipSignatureVerification bool   `json:"skip_signature_verification,omitempty"`
	SignatureTrustStore       string `json:"signature_trust_store,omitempty"`

	URLHandlers []HandlerSource `json:"url_handlers,omitempty"`

	MirrorFiles []MirrorFileParams `json:"mirror_files,omitempty"`

	IncludeFiles []string `json:"include_files,omitempty"`
	ExcludeFiles []string `json:"exclude_files,omitempty"`

	Version string              `json:"version,omitempty"`
	Filters []map[string]string `json:"filters,omitempty"`
}

func (Source) ApplyFilter

func (s Source) ApplyFilter(filter *and.Filter) error

type Version

type Version struct {
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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