rainbond: github.com/goodrain/rainbond/gateway/annotations/rewrite Index | Files

package rewrite

import "github.com/goodrain/rainbond/gateway/annotations/rewrite"

Index

Package Files

rewrite.go

func NewParser Uses

func NewParser(r resolver.Resolver) parser.IngressAnnotation

NewParser creates a new rewrite annotation parser

type Config Uses

type Config struct {
    Rewrites []*Rewrite
    // Target URI where the traffic must be redirected
    Target string `json:"target"`
    // SSLRedirect indicates if the location section is accessible SSL only
    SSLRedirect bool `json:"sslRedirect"`
    // ForceSSLRedirect indicates if the location section is accessible SSL only
    ForceSSLRedirect bool `json:"forceSSLRedirect"`
    // AppRoot defines the Application Root that the Controller must redirect if it's in '/' context
    AppRoot string `json:"appRoot"`
    // UseRegex indicates whether or not the locations use regex paths
    UseRegex bool `json:"useRegex"`
}

Config describes the per location redirect config

func (*Config) Equal Uses

func (r1 *Config) Equal(r2 *Config) bool

Equal tests for equality between two Redirect types

type Rewrite Uses

type Rewrite struct {
    Regex       string
    Replacement string
    Flag        string
}

Rewrite matching request URI to replacement.

Package rewrite imports 5 packages (graph) and is imported by 5 packages. Updated 2019-03-20. Refresh now. Tools for package owners.