policy

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements policy operations

func NewClient

func NewClient(opts ...Option) (*Client, error)

NewClient is the factory method for policy client

func (*Client) DownloadBuiltinPolicies

func (c *Client) DownloadBuiltinPolicies(ctx context.Context) error

DownloadBuiltinPolicies download default policies from GitHub Pages

func (*Client) LoadBuiltinPolicies

func (c *Client) LoadBuiltinPolicies() ([]string, error)

LoadBuiltinPolicies loads default policies

func (*Client) NeedsUpdate

func (c *Client) NeedsUpdate() (bool, error)

NeedsUpdate returns if the default policy should be updated

type Metadata

type Metadata struct {
	Digest           string
	LastDownloadedAt time.Time
}

Metadata holds default policy metadata

type Option

type Option func(*options)

Option is a functional option

func WithClock

func WithClock(clock clock.Clock) Option

WithClock takes a clock

func WithImage

func WithImage(img v1.Image) Option

WithImage takes an OCI v1 Image

Jump to

Keyboard shortcuts

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