spec

package
v0.0.0-...-f3f00f3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package spec defines the specification of a blocklist.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type V1Output

type V1Output struct {
	Destinations []V1OutputDestination `json:"destinations"`
}

type V1OutputDestination

type V1OutputDestination struct {
	FilePath       string `json:"filePath"`
	CustomTemplate string `json:"customTemplate"`
}

type V1Policy

type V1Policy struct {
	Allow V1PolicySpec `json:"allow"`
	Deny  V1PolicySpec `json:"deny"`
}

type V1PolicySpec

type V1PolicySpec struct {
	Items    []string             `json:"items"`
	Includes []V1PolicySpecSource `json:"includes"`
}

type V1PolicySpecSource

type V1PolicySpecSource struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

type V1Spec

type V1Spec struct {
	Version int      `json:"version"`
	Kind    string   `json:"kind"`
	Policy  V1Policy `json:"policy"`
	Output  V1Output `json:"output"`
}

func NewV1SpecFromJSON

func NewV1SpecFromJSON(r io.Reader) (*V1Spec, error)

func NewV1SpecFromJSONFile

func NewV1SpecFromJSONFile(name string) (*V1Spec, error)

func NewV1SpecFromYAML

func NewV1SpecFromYAML(r io.Reader) (*V1Spec, error)

func NewV1SpecFromYAMLFile

func NewV1SpecFromYAMLFile(name string) (*V1Spec, error)

Jump to

Keyboard shortcuts

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