builders

package
v0.0.0-...-1afe8a4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExposeHeadersName    = "Access-Control-Expose-Headers"
	AllowHeadersName     = "Access-Control-Allow-Headers"
	AllowCredentialsName = "Access-Control-Allow-Credentials"
	AllowMethodsName     = "Access-Control-Allow-Methods"
	AllowOriginName      = "Access-Control-Allow-Origin"
	MaxAgeName           = "Access-Control-Max-Age"
)

Variables

This section is empty.

Functions

func AccessRule

func AccessRule() *accessRule

AccessRule returns a builder for github.com/ory/oathkeeper-maester/api/v1alpha1/Rule instances

func AccessRuleSpec

func AccessRuleSpec() *accessRuleSpec

AccessRuleSpec returns a builder for github.com/ory/oathkeeper-maester/api/v1alpha1/RuleSpec instances

func Authenticators

func Authenticators() *authenticators

Authenticators returns a builder for github.com/ory/oathkeeper-maester/api/v1alpha1/Authenticators instances

func Authorizer

func Authorizer() *authorizer

Authorizer returns a builder for github.com/ory/oathkeeper-maester/api/v1alpha1/Authorizer instances

func CorsPolicy

func CorsPolicy() *corsPolicy

CorsPolicy returns builder for istio.io/api/networking/v1beta1/CorsPolicy type

func HTTPRoute

func HTTPRoute() *httpRoute

HTTPRoute returns builder for istio.io/api/networking/v1beta1/HTTPRoute type

func Handler

func Handler() *handler

Handler returns a builder for github.com/ory/oathkeeper-maester/api/v1alpha1/Handler instances

func Match

func Match() *match

Match returns a builder for github.com/ory/oathkeeper-maester/api/v1alpha1/Match instances

func MatchRequest

func MatchRequest() *matchRequest

MatchRequest returns builder for istio.io/api/networking/v1beta1/HTTPMatchRequest type

func Mutators

func Mutators() *mutators

Mutators returns a builder for github.com/ory/oathkeeper-maester/api/v1alpha1/Mutators instances

func ObjectMeta

func ObjectMeta() *objectMeta

ObjectMeta returns builder for k8s.io/apimachinery/pkg/apis/meta/v1/ObjectMeta type

func RouteDestination

func RouteDestination() *routeDestination

RouteDestination returns builder for istio.io/api/networking/v1beta1/HTTPRouteDestination type

func Upstream

func Upstream() *upstream

Upstream returns a builder for github.com/ory/oathkeeper-maester/api/v1alpha1/Upstream instances

func VirtualService

func VirtualService() *virtualService

VirtualService returns builder for istio.io/client-go/pkg/apis/networking/v1beta1/VirtualService type

func VirtualServiceSpec

func VirtualServiceSpec() *virtualServiceSpec

VirtualServiceSpec returns builder for istio.io/api/networking/v1beta1/VirtualServiceSpec type

Types

type Authentication

type Authentication struct {
	Issuer      string       `json:"issuer"`
	JwksUri     string       `json:"jwksUri"`
	FromHeaders []*JwtHeader `json:"fromHeaders"`
	FromParams  []string     `json:"fromParams"`
}

type Authentications

type Authentications struct {
	Authentications []*Authentication `json:"authentications"`
}

type AuthorizationPolicyBuilder

type AuthorizationPolicyBuilder struct {
	// contains filtered or unexported fields
}

func NewAuthorizationPolicyBuilder

func NewAuthorizationPolicyBuilder() *AuthorizationPolicyBuilder

NewAuthorizationPolicyBuilder returns a builder for istio.io/client-go/pkg/apis/security/v1beta1/AuthorizationPolicy type

func (*AuthorizationPolicyBuilder) FromAP

func (*AuthorizationPolicyBuilder) Get

func (*AuthorizationPolicyBuilder) WithGenerateName

func (*AuthorizationPolicyBuilder) WithLabel

func (*AuthorizationPolicyBuilder) WithName

func (*AuthorizationPolicyBuilder) WithNamespace

func (*AuthorizationPolicyBuilder) WithSpec

type AuthorizationPolicySpecBuilder

type AuthorizationPolicySpecBuilder struct {
	// contains filtered or unexported fields
}

func NewAuthorizationPolicySpecBuilder

func NewAuthorizationPolicySpecBuilder() *AuthorizationPolicySpecBuilder

NewAuthorizationPolicySpecBuilder returns builder for istio.io/api/security/v1beta1/AuthorizationPolicy type

func (*AuthorizationPolicySpecBuilder) FromAP

func (*AuthorizationPolicySpecBuilder) Get

func (*AuthorizationPolicySpecBuilder) WithAction

func (*AuthorizationPolicySpecBuilder) WithProvider

func (*AuthorizationPolicySpecBuilder) WithRule

func (*AuthorizationPolicySpecBuilder) WithSelector

type ConditionBuilder

type ConditionBuilder struct {
	// contains filtered or unexported fields
}

func NewConditionBuilder

func NewConditionBuilder() *ConditionBuilder

NewConditionBuilder returns builder for istio.io/apis/security/v1beta1/Condition type

func (*ConditionBuilder) Get

func (rc *ConditionBuilder) Get() *v1beta1.Condition

func (*ConditionBuilder) WithKey

func (rc *ConditionBuilder) WithKey(key string) *ConditionBuilder

func (*ConditionBuilder) WithValues

func (rc *ConditionBuilder) WithValues(values []string) *ConditionBuilder

type FromBuilder

type FromBuilder struct {
	// contains filtered or unexported fields
}

func NewFromBuilder

func NewFromBuilder() *FromBuilder

NewFromBuilder returns builder for istio.io/api/security/v1beta1/Rule_From type

func (*FromBuilder) Get

func (rf *FromBuilder) Get() *v1beta1.Rule_From

func (*FromBuilder) WithForcedJWTAuthorization

func (rf *FromBuilder) WithForcedJWTAuthorization(accessStrategies []*gatewayv1beta1.Authenticator) *FromBuilder

WithForcedJWTAuthorization adds RequestPrincipals = "ISSUER/*" for every issuer, forcing requests to use JWT authorization

func (*FromBuilder) WithForcedJWTAuthorizationV2alpha1

func (rf *FromBuilder) WithForcedJWTAuthorizationV2alpha1(authentications []*gatewayv2alpha1.JwtAuthentication) *FromBuilder

WithForcedJWTAuthorizationV2alpha1 adds RequestPrincipals = "ISSUER/*" for every issuer, forcing requests to use JWT authorization

func (*FromBuilder) WithIngressGatewaySource

func (rf *FromBuilder) WithIngressGatewaySource() *FromBuilder

func (*FromBuilder) WithOathkeeperProxySource

func (rf *FromBuilder) WithOathkeeperProxySource() *FromBuilder

type HttpRouteHeadersBuilder

type HttpRouteHeadersBuilder struct {
	// contains filtered or unexported fields
}

func NewHttpRouteHeadersBuilder

func NewHttpRouteHeadersBuilder() HttpRouteHeadersBuilder

NewHttpRouteHeadersBuilder returns builder for istio.io/api/networking/v1beta1/Headers type

func (HttpRouteHeadersBuilder) Get

func (HttpRouteHeadersBuilder) RemoveUpstreamCORSPolicyHeaders

func (h HttpRouteHeadersBuilder) RemoveUpstreamCORSPolicyHeaders() HttpRouteHeadersBuilder

RemoveUpstreamCORSPolicyHeaders sets VirtualService to remove all upstream CORS headers, leaving only those from VirtualService CORS Policy

func (HttpRouteHeadersBuilder) SetHostHeader

func (h HttpRouteHeadersBuilder) SetHostHeader(hostname string) HttpRouteHeadersBuilder

func (HttpRouteHeadersBuilder) SetRequestCookies

func (h HttpRouteHeadersBuilder) SetRequestCookies(cookies map[string]string) HttpRouteHeadersBuilder

SetRequestCookies sets the Cookie header based on a map[string]string The Cookie header is built as "key1=value1; key2=value2; ..."

func (HttpRouteHeadersBuilder) SetRequestHeaders

func (h HttpRouteHeadersBuilder) SetRequestHeaders(headers map[string]string) HttpRouteHeadersBuilder

SetRequestHeaders sets the request headers and expects a map of the form "header-name1": "header-value1", "header-name2": "header-value2", ...

type JwtHeader

type JwtHeader struct {
	Name   string `json:"name"`
	Prefix string `json:"prefix"`
}

type JwtRuleBuilder

type JwtRuleBuilder struct {
	// contains filtered or unexported fields
}

func NewJwtRuleBuilder

func NewJwtRuleBuilder() *JwtRuleBuilder

NewJwtRuleBuilder returns builder for istio.io/api/security/v1beta1/JWTRule type

func (*JwtRuleBuilder) From

func (*JwtRuleBuilder) FromV2Alpha1

func (jr *JwtRuleBuilder) FromV2Alpha1(jwt *gatewayv2alpha1.JwtConfig) *JwtRuleBuilder

func (*JwtRuleBuilder) Get

func (jr *JwtRuleBuilder) Get() *[]*v1beta1.JWTRule

type OperationBuilder

type OperationBuilder struct {
	// contains filtered or unexported fields
}

func NewOperationBuilder

func NewOperationBuilder() *OperationBuilder

NewOperationBuilder returns builder for istio.io/api/security/v1beta1/Operation type

func (*OperationBuilder) Get

func (*OperationBuilder) WithMethods

func (*OperationBuilder) WithMethodsV2alpha1

func (o *OperationBuilder) WithMethodsV2alpha1(val []gatewayv2alpha1.HttpMethod) *OperationBuilder

func (*OperationBuilder) WithPath

func (o *OperationBuilder) WithPath(val string) *OperationBuilder

type RequestAuthenticationBuilder

type RequestAuthenticationBuilder struct {
	// contains filtered or unexported fields
}

func NewRequestAuthenticationBuilder

func NewRequestAuthenticationBuilder() *RequestAuthenticationBuilder

NewRequestAuthenticationBuilder returns a builder for istio.io/client-go/pkg/apis/security/v1beta1/RequestAuthentication type

func (*RequestAuthenticationBuilder) Get

func (*RequestAuthenticationBuilder) WithFrom

func (*RequestAuthenticationBuilder) WithGenerateName

func (*RequestAuthenticationBuilder) WithLabel

func (*RequestAuthenticationBuilder) WithName

func (*RequestAuthenticationBuilder) WithNamespace

func (*RequestAuthenticationBuilder) WithSpec

type RequestAuthenticationSpecBuilder

type RequestAuthenticationSpecBuilder struct {
	// contains filtered or unexported fields
}

func NewRequestAuthenticationSpecBuilder

func NewRequestAuthenticationSpecBuilder() *RequestAuthenticationSpecBuilder

NewRequestAuthenticationSpecBuilder returns a builder for istio.io/api/security/v1beta1/RequestAuthentication type

func (*RequestAuthenticationSpecBuilder) Get

func (*RequestAuthenticationSpecBuilder) WithFrom

func (*RequestAuthenticationSpecBuilder) WithJwtRules

func (*RequestAuthenticationSpecBuilder) WithSelector

type RuleBuilder

type RuleBuilder struct {
	// contains filtered or unexported fields
}

func NewRuleBuilder

func NewRuleBuilder() *RuleBuilder

NewRuleBuilder returns builder for istio.io/api/security/v1beta1/Rule type

func (*RuleBuilder) Get

func (r *RuleBuilder) Get() *v1beta1.Rule

func (*RuleBuilder) WithFrom

func (r *RuleBuilder) WithFrom(val *v1beta1.Rule_From) *RuleBuilder

func (*RuleBuilder) WithTo

func (r *RuleBuilder) WithTo(val *v1beta1.Rule_To) *RuleBuilder

func (*RuleBuilder) WithWhenCondition

func (r *RuleBuilder) WithWhenCondition(val *v1beta1.Condition) *RuleBuilder

type SelectorBuilder

type SelectorBuilder struct {
	// contains filtered or unexported fields
}

func NewSelectorBuilder

func NewSelectorBuilder() *SelectorBuilder

NewSelectorBuilder returns builder for istio.io/api/type/v1beta1/WorkloadSelector type

func (*SelectorBuilder) Get

func (*SelectorBuilder) WithMatchLabels

func (s *SelectorBuilder) WithMatchLabels(key, val string) *SelectorBuilder

type ToBuilder

type ToBuilder struct {
	// contains filtered or unexported fields
}

func NewToBuilder

func NewToBuilder() *ToBuilder

NewToBuilder returns builder for istio.io/apis/security/v1beta1/Rule_To type

func (*ToBuilder) Get

func (rt *ToBuilder) Get() *v1beta1.Rule_To

func (*ToBuilder) WithOperation

func (rt *ToBuilder) WithOperation(val *v1beta1.Operation) *ToBuilder

Directories

Path Synopsis
builders_test

Jump to

Keyboard shortcuts

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