Documentation
¶
Index ¶
- type Generator
- func (g *Generator) EgressListToString(egressListYamlStr string, variables map[string]string) (string, string, error)
- func (g *Generator) GenerateEgressLists(ctx context.Context, egressListYaml string) (string, string, error)
- func (g *Generator) GetGithubEgressList(ctx context.Context) (*github.RepositoryContent, error)
- func (g *Generator) GetLocalEgressList() (string, error)
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 (*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