pluginproxy

package
v0.0.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: AGPL-3.0 Imports: 32 Imported by: 299

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRoute

func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route *plugins.Route,
	ds DSInfo, cfg *setting.Cfg)

ApplyRoute should use the plugin route data to set auth headers and custom headers.

Types

type DSInfo

type DSInfo struct {
	ID                      int64
	Updated                 time.Time
	JSONData                map[string]interface{}
	DecryptedSecureJSONData map[string]string
}

type DataSourceProxy

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

func NewDataSourceProxy

func NewDataSourceProxy(ds *datasources.DataSource, pluginRoutes []*plugins.Route, ctx *contextmodel.ReqContext,
	proxyPath string, cfg *setting.Cfg, clientProvider httpclient.Provider,
	oAuthTokenService oauthtoken.OAuthTokenService, dsService datasources.DataSourceService,
	tracer tracing.Tracer) (*DataSourceProxy, error)

NewDataSourceProxy creates a new Datasource proxy

func (*DataSourceProxy) HandleRequest

func (proxy *DataSourceProxy) HandleRequest()

type PluginProxy

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

func NewPluginProxy

func NewPluginProxy(ps *pluginsettings.DTO, routes []*plugins.Route, ctx *contextmodel.ReqContext,
	proxyPath string, cfg *setting.Cfg, secretsService secrets.Service, tracer tracing.Tracer,
	transport *http.Transport) (*PluginProxy, error)

NewPluginProxy creates a plugin proxy.

func (*PluginProxy) HandleRequest

func (proxy *PluginProxy) HandleRequest()

Jump to

Keyboard shortcuts

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