networklists

package
v0.0.0-...-059d9f2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package networklists is the API v6 client for Network Lists. Writes go to a Draft version and reach traffic only after a build; see pkg/api/v6/version.

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
}

func NewClient

func NewClient(c *http.Client, url string, token string) *Client

func (*Client) Build

func (c *Client) Build(ctx context.Context, id int64, versionID, comment string) error

Build queues the build of a Draft. It returns once the API accepts it.

func (*Client) CancelBuild

func (c *Client) CancelBuild(ctx context.Context, id int64, versionID string) error

CancelBuild asks the API to stop a build that has not settled.

func (*Client) Create

Create creates a Network List. Its first version comes back as a Draft.

func (*Client) CreateVersion

func (c *Client) CreateVersion(ctx context.Context, id int64, from, comment string) (string, error)

CreateVersion opens a new Draft. An empty from clones the latest ready version. It returns the new version id.

func (*Client) FindByName

func (c *Client) FindByName(ctx context.Context, name string) (version.Object, bool, error)

FindByName returns the Network List with exactly this name, if there is one. The list filter may also return near matches, which are ignored.

func (*Client) GetVersion

func (c *Client) GetVersion(ctx context.Context, id int64, versionID string) (version.Meta, error)

GetVersion reads one version. Waits poll it, so a failure also carries the HTTP status (version.NewStatusError) for the retry rule.

func (*Client) UpdateVersion

func (c *Client) UpdateVersion(ctx context.Context, id int64, versionID string, req sdk.NetworkListRequest) (version.Meta, error)

UpdateVersion replaces the configuration of a Draft.

func (*Client) VersionState

func (c *Client) VersionState(ctx context.Context, id int64, versionID string) (version.State, error)

VersionState reads the build state of one version.

Jump to

Keyboard shortcuts

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