route

package
v0.0.0-...-be1e11a Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRouteNotFound

func IsRouteNotFound(err error) bool

IsRouteNotFound returns true if the passed error indicates a Worker Route was not found.

func UpToDate

func UpToDate(spec *v1alpha1.RouteParameters, o cloudflare.WorkerRoute) bool

UpToDate checks if the remote Route is up to date with the requested resource parameters.

func UpdateRoute

func UpdateRoute(ctx context.Context, client Client, routeID string, spec *v1alpha1.RouteParameters) error

UpdateRoute updates mutable values on a Worker Route.

Types

type Client

type Client interface {
	CreateWorkerRoute(ctx context.Context, zoneID string, route cloudflare.WorkerRoute) (cloudflare.WorkerRouteResponse, error)
	UpdateWorkerRoute(ctx context.Context, zoneID string, routeID string, route cloudflare.WorkerRoute) (cloudflare.WorkerRouteResponse, error)
	GetWorkerRoute(ctx context.Context, zoneID string, routeID string) (cloudflare.WorkerRouteResponse, error)
	DeleteWorkerRoute(ctx context.Context, zoneID string, routeID string) (cloudflare.WorkerRouteResponse, error)
}

Client is a Cloudflare API client that implements methods for working with Worker Routes.

func NewClient

func NewClient(cfg clients.Config, hc *http.Client) (Client, error)

NewClient returns a new Cloudflare API client for working with Worker Routes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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