proxy

package
v1.3.1-0...-3e602c1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuncMap = template.FuncMap{
	"getBasicAuths": func(s []project.DomainSecurityAuthentication) []project.DomainSecurityAuthentication {
		var auths []project.DomainSecurityAuthentication
		for _, authentication := range s {
			if authentication.Type != "basic" {
				continue
			}
			auths = append(auths, authentication)
		}
		return auths
	},
	"getExternalPort": func(service string, internalPort int) string {
		for _, resourceGroup := range system.Context.Resources {
			for _, resource := range resourceGroup.Resources {
				if resource.Type != system.TypeContainer {
					continue
				}
				if resource.ServiceName != service {
					continue
				}
				for _, port := range resource.Ports {
					split := strings.SplitN(port, ":", 2)
					if split[1] == strconv.Itoa(internalPort) {
						return split[0]
					}
				}
			}
		}
		return ""
	},
}

common functions used in proxy templates

Functions

This section is empty.

Types

type PortService

type PortService struct {
	Expose                project.DomainExpose
	ContainerResourceName string
	Index                 int
}

func (PortService) GetTfString

func (p PortService) GetTfString() string

type ProxyRenderingContext

type ProxyRenderingContext struct {
	AllPorts []PortService
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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