egress_lists

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator added in v1.2.0

type Generator struct {
	// PlatformType represents the cloud and type of platform we are generating egress lists for
	PlatformType cloud.Platform

	// Variables is a map of string:string used to replace templated values in canned egress lists
	Variables map[string]string
	// contains filtered or unexported fields
}

Generator provides a mechanism to generate egress lists for a given platform and set of variables

func NewGenerator added in v1.2.0

func NewGenerator(platformType cloud.Platform, variables map[string]string, logger logging.Logger) *Generator

func (*Generator) EgressListToString added in v1.2.0

func (g *Generator) EgressListToString(egressListYamlStr string, variables map[string]string) (string, string, error)

EgressListToString returns two strings, the sum of which contains all the URLs within a given platformType's egress list. The first string returned contains all the URLs with tlsDisabled=false, while the second string contains all URLs with tlsDisabled=true

func (*Generator) GenerateEgressLists added in v1.2.0

func (g *Generator) GenerateEgressLists(ctx context.Context, egressListYaml string) (string, string, error)

GenerateEgressLists takes an optional egressListYaml as input, and then attempts to return generated EgressLists in the following order: - If a populated egressListYaml is passed, use that - Otherwise, try to get the values from GitHub, and if that fails - Fallback to the local yaml embedded in this package

func (*Generator) GetGithubEgressList added in v1.2.0

func (g *Generator) GetGithubEgressList(ctx context.Context) (*github.RepositoryContent, error)

func (*Generator) GetLocalEgressList added in v1.2.0

func (g *Generator) GetLocalEgressList() (string, error)

Jump to

Keyboard shortcuts

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