Documentation
¶
Index ¶
- func ValidateWildcardHost(host string) error
- type Client
- func (c *Client) AttachOIDCProvider(ctx context.Context, host string, providerName string, ...) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) AttachOIDCProviderToRoute(ctx context.Context, route *ingress_v1alpha.HttpRoute, providerName string, ...) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) CreateOrUpdateOIDCProvider(ctx context.Context, provider *ingress_v1alpha.OidcProvider) (*ingress_v1alpha.OidcProvider, error)
- func (c *Client) DeleteByHost(ctx context.Context, host string) error
- func (c *Client) DeleteOIDCProvider(ctx context.Context, name string) error
- func (c *Client) DetachOIDCProvider(ctx context.Context, host string) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) DetachOIDCProviderFromRoute(ctx context.Context, route *ingress_v1alpha.HttpRoute) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) EnsureSingleDefault(ctx context.Context, routeToKeep *ingress_v1alpha.HttpRoute) error
- func (c *Client) GetEntityStore() *entityserver.Client
- func (c *Client) GetOIDCProvider(ctx context.Context, name string) (*ingress_v1alpha.OidcProvider, error)
- func (c *Client) List(ctx context.Context) ([]*RouteWithMeta, error)
- func (c *Client) ListOIDCProviders(ctx context.Context) ([]*ingress_v1alpha.OidcProvider, error)
- func (c *Client) Lookup(ctx context.Context, host string) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) LookupDefault(ctx context.Context) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) LookupWithWildcard(ctx context.Context, host string) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) SetDefault(ctx context.Context, appId entity.Id) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) SetRoute(ctx context.Context, host string, appId entity.Id) (*ingress_v1alpha.HttpRoute, error)
- func (c *Client) UnsetDefault(ctx context.Context) (*ingress_v1alpha.HttpRoute, error)
- type RouteWithMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateWildcardHost ¶ added in v0.6.0
ValidateWildcardHost validates a wildcard host pattern. Valid patterns: *.example.com, *.sub.example.com Invalid: *.com, foo.*.com, **, *
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a domain-specific client for HttpRoute entities
func (*Client) AttachOIDCProvider ¶ added in v0.4.0
func (c *Client) AttachOIDCProvider(ctx context.Context, host string, providerName string, claimMappings []ingress_v1alpha.ClaimMappings) (*ingress_v1alpha.HttpRoute, error)
AttachOIDCProvider associates an OIDC provider with a route and sets claim mappings
func (*Client) AttachOIDCProviderToRoute ¶ added in v0.4.0
func (c *Client) AttachOIDCProviderToRoute(ctx context.Context, route *ingress_v1alpha.HttpRoute, providerName string, claimMappings []ingress_v1alpha.ClaimMappings) (*ingress_v1alpha.HttpRoute, error)
AttachOIDCProviderToRoute associates an OIDC provider with an already-resolved route
func (*Client) CreateOrUpdateOIDCProvider ¶ added in v0.4.0
func (c *Client) CreateOrUpdateOIDCProvider(ctx context.Context, provider *ingress_v1alpha.OidcProvider) (*ingress_v1alpha.OidcProvider, error)
CreateOrUpdateOIDCProvider creates or updates an OIDC provider
func (*Client) DeleteByHost ¶
DeleteByHost deletes an http_route by hostname
func (*Client) DeleteOIDCProvider ¶ added in v0.4.0
DeleteOIDCProvider deletes an OIDC provider by name
func (*Client) DetachOIDCProvider ¶ added in v0.4.0
func (c *Client) DetachOIDCProvider(ctx context.Context, host string) (*ingress_v1alpha.HttpRoute, error)
DetachOIDCProvider removes OIDC provider association from a route
func (*Client) DetachOIDCProviderFromRoute ¶ added in v0.4.0
func (c *Client) DetachOIDCProviderFromRoute(ctx context.Context, route *ingress_v1alpha.HttpRoute) (*ingress_v1alpha.HttpRoute, error)
DetachOIDCProviderFromRoute removes OIDC provider association from an already-resolved route
func (*Client) EnsureSingleDefault ¶
func (c *Client) EnsureSingleDefault(ctx context.Context, routeToKeep *ingress_v1alpha.HttpRoute) error
EnsureSingleDefault removes any default routes but the one specified
func (*Client) GetEntityStore ¶ added in v0.4.0
func (c *Client) GetEntityStore() *entityserver.Client
GetEntityStore returns the underlying entity store
func (*Client) GetOIDCProvider ¶ added in v0.4.0
func (c *Client) GetOIDCProvider(ctx context.Context, name string) (*ingress_v1alpha.OidcProvider, error)
GetOIDCProvider looks up an OIDC provider by name
func (*Client) List ¶
func (c *Client) List(ctx context.Context) ([]*RouteWithMeta, error)
List returns all http_routes with metadata
func (*Client) ListOIDCProviders ¶ added in v0.4.0
func (c *Client) ListOIDCProviders(ctx context.Context) ([]*ingress_v1alpha.OidcProvider, error)
ListOIDCProviders returns all OIDC providers
func (*Client) LookupDefault ¶
LookupDefault finds the default http_route
func (*Client) LookupWithWildcard ¶ added in v0.6.0
func (c *Client) LookupWithWildcard(ctx context.Context, host string) (*ingress_v1alpha.HttpRoute, error)
LookupWithWildcard finds an http_route by hostname with wildcard fallback. It tries in order: exact match, then wildcard subdomain (*.rest). A wildcard like *.example.com matches foo.example.com but not example.com itself.
func (*Client) SetDefault ¶
func (c *Client) SetDefault(ctx context.Context, appId entity.Id) (*ingress_v1alpha.HttpRoute, error)
SetDefault sets the default route to the provided app
func (*Client) SetRoute ¶
func (c *Client) SetRoute(ctx context.Context, host string, appId entity.Id) (*ingress_v1alpha.HttpRoute, error)
SetRoute creates or updates an http_route for the given host and app
func (*Client) UnsetDefault ¶
UnsetDefault unsets the default route, if any. It returns the route that it unset the default from.
type RouteWithMeta ¶
type RouteWithMeta struct {
Route *ingress_v1alpha.HttpRoute
CreatedAt int64
UpdatedAt int64
}
RouteWithMeta includes an http_route with its metadata