Documentation
¶
Index ¶
- type ApiRuleBuilder
- func (a *ApiRuleBuilder) Build() *gatewayv2.APIRule
- func (a *ApiRuleBuilder) WithCORSPolicy(policy gatewayv2.CorsPolicy) *ApiRuleBuilder
- func (a *ApiRuleBuilder) WithGateway(gateway string) *ApiRuleBuilder
- func (a *ApiRuleBuilder) WithHost(host string) *ApiRuleBuilder
- func (a *ApiRuleBuilder) WithHosts(hosts ...string) *ApiRuleBuilder
- func (a *ApiRuleBuilder) WithRule(rule gatewayv2.Rule) *ApiRuleBuilder
- func (a *ApiRuleBuilder) WithRules(rules ...*gatewayv2.Rule) *ApiRuleBuilder
- func (a *ApiRuleBuilder) WithService(name, namespace string, port uint32) *ApiRuleBuilder
- func (a *ApiRuleBuilder) WithTimeout(timeout uint32) *ApiRuleBuilder
- type CorsPolicyBuilder
- func (c *CorsPolicyBuilder) Build() gatewayv2.CorsPolicy
- func (c *CorsPolicyBuilder) WithAllowCredentials(allow bool) *CorsPolicyBuilder
- func (c *CorsPolicyBuilder) WithAllowHeaders(headers []string) *CorsPolicyBuilder
- func (c *CorsPolicyBuilder) WithAllowMethods(methods []string) *CorsPolicyBuilder
- func (c *CorsPolicyBuilder) WithAllowOrigins(origins []map[string]string) *CorsPolicyBuilder
- func (c *CorsPolicyBuilder) WithExposeHeaders(headers []string) *CorsPolicyBuilder
- func (c *CorsPolicyBuilder) WithMaxAge(maxAge uint64) *CorsPolicyBuilder
- type ExtAuthBuilder
- func (e *ExtAuthBuilder) Build() *gatewayv2.ExtAuth
- func (e *ExtAuthBuilder) WithAuthorizers(auths ...string) *ExtAuthBuilder
- func (e *ExtAuthBuilder) WithRestriction(config *gatewayv2.JwtConfig) *ExtAuthBuilder
- func (e *ExtAuthBuilder) WithRestrictionAuthentication(config *gatewayv2.JwtAuthentication) *ExtAuthBuilder
- func (e *ExtAuthBuilder) WithRestrictionAuthorization(config *gatewayv2.JwtAuthorization) *ExtAuthBuilder
- type RequestBuilder
- type RuleBuilder
- func (r *RuleBuilder) Build() *gatewayv2.Rule
- func (r *RuleBuilder) NoAuth() *RuleBuilder
- func (r *RuleBuilder) WithExtAuth(auth *gatewayv2.ExtAuth) *RuleBuilder
- func (r *RuleBuilder) WithJWTAuthn(issuer, jwksUri string, fromHeaders []*gatewayv2.JwtHeader, ...) *RuleBuilder
- func (r *RuleBuilder) WithJWTAuthz(requiredScopes []string, audiences []string) *RuleBuilder
- func (r *RuleBuilder) WithMethods(methods ...gatewayv2.HttpMethod) *RuleBuilder
- func (r *RuleBuilder) WithPath(path string) *RuleBuilder
- func (r *RuleBuilder) WithRequest(rm *gatewayv2.Request) *RuleBuilder
- func (r *RuleBuilder) WithService(name, namespace string, port uint32) *RuleBuilder
- func (r *RuleBuilder) WithTimeout(timeout uint32) *RuleBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiRuleBuilder ¶
type ApiRuleBuilder struct {
// contains filtered or unexported fields
}
func NewAPIRuleBuilder ¶
func NewAPIRuleBuilder() *ApiRuleBuilder
func NewAPIRuleBuilderWithDummyData ¶
func NewAPIRuleBuilderWithDummyData() *ApiRuleBuilder
func NewAPIRuleBuilderWithDummyDataWithNoAuthRule ¶
func NewAPIRuleBuilderWithDummyDataWithNoAuthRule() *ApiRuleBuilder
NewAPIRuleBuilderWithDummyDataWithNoAuthRule returns an APIRuleBuilder pre-filled with placeholder data:
Host: example-host.example.com
Gateway: example-namespace/example-gateway
Service: example-namespace/example-service:8080
Rule: GET /
Strategy: NoAuth
func (*ApiRuleBuilder) Build ¶
func (a *ApiRuleBuilder) Build() *gatewayv2.APIRule
func (*ApiRuleBuilder) WithCORSPolicy ¶
func (a *ApiRuleBuilder) WithCORSPolicy(policy gatewayv2.CorsPolicy) *ApiRuleBuilder
func (*ApiRuleBuilder) WithGateway ¶
func (a *ApiRuleBuilder) WithGateway(gateway string) *ApiRuleBuilder
func (*ApiRuleBuilder) WithHost ¶
func (a *ApiRuleBuilder) WithHost(host string) *ApiRuleBuilder
func (*ApiRuleBuilder) WithHosts ¶
func (a *ApiRuleBuilder) WithHosts(hosts ...string) *ApiRuleBuilder
func (*ApiRuleBuilder) WithRule ¶
func (a *ApiRuleBuilder) WithRule(rule gatewayv2.Rule) *ApiRuleBuilder
func (*ApiRuleBuilder) WithRules ¶
func (a *ApiRuleBuilder) WithRules(rules ...*gatewayv2.Rule) *ApiRuleBuilder
func (*ApiRuleBuilder) WithService ¶
func (a *ApiRuleBuilder) WithService(name, namespace string, port uint32) *ApiRuleBuilder
func (*ApiRuleBuilder) WithTimeout ¶
func (a *ApiRuleBuilder) WithTimeout(timeout uint32) *ApiRuleBuilder
type CorsPolicyBuilder ¶
type CorsPolicyBuilder struct {
// contains filtered or unexported fields
}
func NewCorsPolicyBuilder ¶
func NewCorsPolicyBuilder() *CorsPolicyBuilder
func (*CorsPolicyBuilder) Build ¶
func (c *CorsPolicyBuilder) Build() gatewayv2.CorsPolicy
func (*CorsPolicyBuilder) WithAllowCredentials ¶
func (c *CorsPolicyBuilder) WithAllowCredentials(allow bool) *CorsPolicyBuilder
func (*CorsPolicyBuilder) WithAllowHeaders ¶
func (c *CorsPolicyBuilder) WithAllowHeaders(headers []string) *CorsPolicyBuilder
func (*CorsPolicyBuilder) WithAllowMethods ¶
func (c *CorsPolicyBuilder) WithAllowMethods(methods []string) *CorsPolicyBuilder
func (*CorsPolicyBuilder) WithAllowOrigins ¶
func (c *CorsPolicyBuilder) WithAllowOrigins(origins []map[string]string) *CorsPolicyBuilder
func (*CorsPolicyBuilder) WithExposeHeaders ¶
func (c *CorsPolicyBuilder) WithExposeHeaders(headers []string) *CorsPolicyBuilder
func (*CorsPolicyBuilder) WithMaxAge ¶
func (c *CorsPolicyBuilder) WithMaxAge(maxAge uint64) *CorsPolicyBuilder
type ExtAuthBuilder ¶
type ExtAuthBuilder struct {
// contains filtered or unexported fields
}
func NewExtAuthBuilder ¶
func NewExtAuthBuilder() *ExtAuthBuilder
func (*ExtAuthBuilder) Build ¶
func (e *ExtAuthBuilder) Build() *gatewayv2.ExtAuth
func (*ExtAuthBuilder) WithAuthorizers ¶
func (e *ExtAuthBuilder) WithAuthorizers(auths ...string) *ExtAuthBuilder
func (*ExtAuthBuilder) WithRestriction ¶
func (e *ExtAuthBuilder) WithRestriction(config *gatewayv2.JwtConfig) *ExtAuthBuilder
func (*ExtAuthBuilder) WithRestrictionAuthentication ¶
func (e *ExtAuthBuilder) WithRestrictionAuthentication(config *gatewayv2.JwtAuthentication) *ExtAuthBuilder
func (*ExtAuthBuilder) WithRestrictionAuthorization ¶
func (e *ExtAuthBuilder) WithRestrictionAuthorization(config *gatewayv2.JwtAuthorization) *ExtAuthBuilder
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
func NewRequestModifier ¶
func NewRequestModifier() *RequestBuilder
func (*RequestBuilder) Build ¶
func (m *RequestBuilder) Build() *gatewayv2.Request
func (*RequestBuilder) WithCookies ¶
func (m *RequestBuilder) WithCookies(cookies map[string]string) *RequestBuilder
func (*RequestBuilder) WithHeaders ¶
func (m *RequestBuilder) WithHeaders(headers map[string]string) *RequestBuilder
type RuleBuilder ¶
type RuleBuilder struct {
// contains filtered or unexported fields
}
func NewRuleBuilder ¶
func NewRuleBuilder() *RuleBuilder
func (*RuleBuilder) Build ¶
func (r *RuleBuilder) Build() *gatewayv2.Rule
func (*RuleBuilder) NoAuth ¶
func (r *RuleBuilder) NoAuth() *RuleBuilder
func (*RuleBuilder) WithExtAuth ¶
func (r *RuleBuilder) WithExtAuth(auth *gatewayv2.ExtAuth) *RuleBuilder
func (*RuleBuilder) WithJWTAuthn ¶
func (r *RuleBuilder) WithJWTAuthn(issuer, jwksUri string, fromHeaders []*gatewayv2.JwtHeader, fromParams []string) *RuleBuilder
func (*RuleBuilder) WithJWTAuthz ¶
func (r *RuleBuilder) WithJWTAuthz(requiredScopes []string, audiences []string) *RuleBuilder
func (*RuleBuilder) WithMethods ¶
func (r *RuleBuilder) WithMethods(methods ...gatewayv2.HttpMethod) *RuleBuilder
func (*RuleBuilder) WithPath ¶
func (r *RuleBuilder) WithPath(path string) *RuleBuilder
func (*RuleBuilder) WithRequest ¶
func (r *RuleBuilder) WithRequest(rm *gatewayv2.Request) *RuleBuilder
func (*RuleBuilder) WithService ¶
func (r *RuleBuilder) WithService(name, namespace string, port uint32) *RuleBuilder
func (*RuleBuilder) WithTimeout ¶
func (r *RuleBuilder) WithTimeout(timeout uint32) *RuleBuilder
Click to show internal directories.
Click to hide internal directories.