Documentation ¶
Index ¶
- Constants
- func EncodeFunctionSpec(spec Template) *types.Struct
- func EncodeRouteExtension(spec RouteExtension) *types.Struct
- type Parameters
- type Plugin
- func (p *Plugin) GetDependencies(_ *v1.Config) *plugin.Dependencies
- func (p *Plugin) HttpFilters(_ *plugin.FilterPluginParams) []plugin.StagedFilter
- func (p *Plugin) ProcessRoute(pluginParams *plugin.RoutePluginParams, in *v1.Route, out *envoyroute.Route) error
- func (p *Plugin) ProcessUpstream(params *plugin.UpstreamPluginParams, in *v1.Upstream, out *envoyapi.Cluster) error
- type RouteExtension
- type Template
Constants ¶
View Source
const (
ServiceTypeREST = "REST"
)
Variables ¶
This section is empty.
Functions ¶
func EncodeFunctionSpec ¶
func EncodeRouteExtension ¶
func EncodeRouteExtension(spec RouteExtension) *types.Struct
Types ¶
type Parameters ¶
type Parameters struct { // headers that will be used to derive the data for processing the output templates // if no syntax containing {variables} are detected in the header value, // the whole value will be substituted by its name into the template // for example: /* input: header_parmeters: x-header-foo: bar output: body_template: "{\"path\": {{ path }}}" */ Headers map[string]string `json:"headers"` Path string `json:"path,omitempty"` Authority string `json:"authority"` }
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) GetDependencies ¶
func (p *Plugin) GetDependencies(_ *v1.Config) *plugin.Dependencies
func (*Plugin) HttpFilters ¶
func (p *Plugin) HttpFilters(_ *plugin.FilterPluginParams) []plugin.StagedFilter
func (*Plugin) ProcessRoute ¶
func (p *Plugin) ProcessRoute(pluginParams *plugin.RoutePluginParams, in *v1.Route, out *envoyroute.Route) error
func (*Plugin) ProcessUpstream ¶
type RouteExtension ¶
type RouteExtension struct { Parameters *Parameters `json:"parameters,omitempty"` ResponseTemplate *Template `json:"response_template,omitempty"` ResponseParams *Parameters `json:"response_parameters,omitempty"` }
this goes on the route extension
func DecodeRouteExtension ¶
func DecodeRouteExtension(generic *types.Struct) (RouteExtension, error)
type Template ¶
type Template struct { Path string `json:"path"` Header map[string]string `json:"headers"` // body is a pointer because, if null, pass through original body Body *string `json:"body"` // if enabled, the request body will be passed through untouched PassthroughBody bool `json:"passthrough_body"` }
this goes on the function spec or on the response transformation
Click to show internal directories.
Click to hide internal directories.