Documentation ¶
Index ¶
- Constants
- func Serve(opts ServeOpts)
- func StandaloneServe(dsopts ServeOpts, address string) error
- type AppInstanceSettings
- type CallResourceHandler
- type CallResourceHandlerFunc
- type CallResourceRequest
- type CallResourceResponse
- type CallResourceResponseSender
- type CheckHealthHandler
- type CheckHealthHandlerFunc
- type CheckHealthRequest
- type CheckHealthResult
- type ConvertFromProtobuf
- func (f ConvertFromProtobuf) AppInstanceSettings(proto *pluginv2.AppInstanceSettings) *AppInstanceSettings
- func (f ConvertFromProtobuf) CallResourceRequest(protoReq *pluginv2.CallResourceRequest) *CallResourceRequest
- func (f ConvertFromProtobuf) CallResourceResponse(protoResp *pluginv2.CallResourceResponse) *CallResourceResponse
- func (f ConvertFromProtobuf) CheckHealthRequest(protoReq *pluginv2.CheckHealthRequest) *CheckHealthRequest
- func (f ConvertFromProtobuf) CheckHealthResponse(protoResp *pluginv2.CheckHealthResponse) *CheckHealthResult
- func (f ConvertFromProtobuf) DataSourceInstanceSettings(proto *pluginv2.DataSourceInstanceSettings, pluginID string) *DataSourceInstanceSettings
- func (f ConvertFromProtobuf) PluginContext(proto *pluginv2.PluginContext) PluginContext
- func (f ConvertFromProtobuf) PluginInfoGetReq(protoReq *pluginv2.PluginInfoGetReq) *PluginInfoGetReq
- func (f ConvertFromProtobuf) PluginInfoGetRes(protoResp *pluginv2.PluginInfoGetRes) *PluginInfoGetRes
- func (f ConvertFromProtobuf) User(user *pluginv2.User) *User
- type ConvertToProtobuf
- func (t ConvertToProtobuf) AppInstanceSettings(s *AppInstanceSettings) *pluginv2.AppInstanceSettings
- func (t ConvertToProtobuf) CallResourceRequest(req *CallResourceRequest) *pluginv2.CallResourceRequest
- func (t ConvertToProtobuf) CallResourceResponse(resp *CallResourceResponse) *pluginv2.CallResourceResponse
- func (t ConvertToProtobuf) CheckHealthResponse(res *CheckHealthResult) *pluginv2.CheckHealthResponse
- func (t ConvertToProtobuf) DataSourceInstanceSettings(s *DataSourceInstanceSettings) *pluginv2.DataSourceInstanceSettings
- func (t ConvertToProtobuf) HealthStatus(status HealthStatus) pluginv2.CheckHealthResponse_HealthStatus
- func (t ConvertToProtobuf) PluginContext(pluginCtx PluginContext) *pluginv2.PluginContext
- func (f ConvertToProtobuf) PluginInfoGetRes(protoResp *PluginInfoGetRes) *pluginv2.PluginInfoGetRes
- func (t ConvertToProtobuf) User(user *User) *pluginv2.User
- type DataSourceInstanceSettings
- type DefaultPluginInfoHandler
- type ForwardHTTPHeaders
- type GRPCSettings
- type HealthStatus
- type PluginContext
- type PluginInfoGetReq
- type PluginInfoGetRes
- type PluginInfoHandler
- type PluginInfoHandlerFunc
- type ServeOpts
- type User
Constants ¶
View Source
const ( OAuthIdentityTokenHeaderName = "Authorization" OAuthIdentityIDTokenHeaderName = "X-Id-Token" CookiesHeaderName = "Cookie" )
Variables ¶
This section is empty.
Functions ¶
func StandaloneServe ¶
Types ¶
type AppInstanceSettings ¶
type CallResourceHandler ¶
type CallResourceHandler interface {
CallResource(ctx context.Context, req *CallResourceRequest, sender CallResourceResponseSender) error
}
type CallResourceHandlerFunc ¶
type CallResourceHandlerFunc func(ctx context.Context, req *CallResourceRequest, sender CallResourceResponseSender) error
func (CallResourceHandlerFunc) CallResource ¶
func (fn CallResourceHandlerFunc) CallResource(ctx context.Context, req *CallResourceRequest, sender CallResourceResponseSender) error
type CallResourceRequest ¶
type CallResourceResponse ¶
type CallResourceResponseSender ¶
type CallResourceResponseSender interface {
Send(*CallResourceResponse) error
}
type CheckHealthHandler ¶
type CheckHealthHandler interface {
CheckHealth(ctx context.Context, req *CheckHealthRequest) (*CheckHealthResult, error)
}
type CheckHealthHandlerFunc ¶
type CheckHealthHandlerFunc func(ctx context.Context, req *CheckHealthRequest) (*CheckHealthResult, error)
func (CheckHealthHandlerFunc) CheckHealth ¶
func (fn CheckHealthHandlerFunc) CheckHealth(ctx context.Context, req *CheckHealthRequest) (*CheckHealthResult, error)
type CheckHealthRequest ¶
type CheckHealthRequest struct { PluginContext PluginContext Headers map[string]string }
func (*CheckHealthRequest) DeleteHTTPHeader ¶
func (req *CheckHealthRequest) DeleteHTTPHeader(key string)
func (*CheckHealthRequest) GetHTTPHeader ¶
func (req *CheckHealthRequest) GetHTTPHeader(key string) string
func (*CheckHealthRequest) GetHTTPHeaders ¶
func (req *CheckHealthRequest) GetHTTPHeaders() http.Header
func (*CheckHealthRequest) SetHTTPHeader ¶
func (req *CheckHealthRequest) SetHTTPHeader(key, value string)
type CheckHealthResult ¶
type CheckHealthResult struct { Status HealthStatus Message string JSONDetails []byte }
type ConvertFromProtobuf ¶
type ConvertFromProtobuf struct{}
func FromProto ¶
func FromProto() ConvertFromProtobuf
func (ConvertFromProtobuf) AppInstanceSettings ¶
func (f ConvertFromProtobuf) AppInstanceSettings(proto *pluginv2.AppInstanceSettings) *AppInstanceSettings
func (ConvertFromProtobuf) CallResourceRequest ¶
func (f ConvertFromProtobuf) CallResourceRequest(protoReq *pluginv2.CallResourceRequest) *CallResourceRequest
func (ConvertFromProtobuf) CallResourceResponse ¶
func (f ConvertFromProtobuf) CallResourceResponse(protoResp *pluginv2.CallResourceResponse) *CallResourceResponse
func (ConvertFromProtobuf) CheckHealthRequest ¶
func (f ConvertFromProtobuf) CheckHealthRequest(protoReq *pluginv2.CheckHealthRequest) *CheckHealthRequest
func (ConvertFromProtobuf) CheckHealthResponse ¶
func (f ConvertFromProtobuf) CheckHealthResponse(protoResp *pluginv2.CheckHealthResponse) *CheckHealthResult
func (ConvertFromProtobuf) DataSourceInstanceSettings ¶
func (f ConvertFromProtobuf) DataSourceInstanceSettings(proto *pluginv2.DataSourceInstanceSettings, pluginID string) *DataSourceInstanceSettings
func (ConvertFromProtobuf) PluginContext ¶
func (f ConvertFromProtobuf) PluginContext(proto *pluginv2.PluginContext) PluginContext
func (ConvertFromProtobuf) PluginInfoGetReq ¶
func (f ConvertFromProtobuf) PluginInfoGetReq(protoReq *pluginv2.PluginInfoGetReq) *PluginInfoGetReq
func (ConvertFromProtobuf) PluginInfoGetRes ¶
func (f ConvertFromProtobuf) PluginInfoGetRes(protoResp *pluginv2.PluginInfoGetRes) *PluginInfoGetRes
type ConvertToProtobuf ¶
type ConvertToProtobuf struct{}
func ToProto ¶
func ToProto() ConvertToProtobuf
func (ConvertToProtobuf) AppInstanceSettings ¶
func (t ConvertToProtobuf) AppInstanceSettings(s *AppInstanceSettings) *pluginv2.AppInstanceSettings
func (ConvertToProtobuf) CallResourceRequest ¶
func (t ConvertToProtobuf) CallResourceRequest(req *CallResourceRequest) *pluginv2.CallResourceRequest
func (ConvertToProtobuf) CallResourceResponse ¶
func (t ConvertToProtobuf) CallResourceResponse(resp *CallResourceResponse) *pluginv2.CallResourceResponse
func (ConvertToProtobuf) CheckHealthResponse ¶
func (t ConvertToProtobuf) CheckHealthResponse(res *CheckHealthResult) *pluginv2.CheckHealthResponse
func (ConvertToProtobuf) DataSourceInstanceSettings ¶
func (t ConvertToProtobuf) DataSourceInstanceSettings(s *DataSourceInstanceSettings) *pluginv2.DataSourceInstanceSettings
func (ConvertToProtobuf) HealthStatus ¶
func (t ConvertToProtobuf) HealthStatus(status HealthStatus) pluginv2.CheckHealthResponse_HealthStatus
func (ConvertToProtobuf) PluginContext ¶
func (t ConvertToProtobuf) PluginContext(pluginCtx PluginContext) *pluginv2.PluginContext
func (ConvertToProtobuf) PluginInfoGetRes ¶
func (f ConvertToProtobuf) PluginInfoGetRes(protoResp *PluginInfoGetRes) *pluginv2.PluginInfoGetRes
type DefaultPluginInfoHandler ¶
func NewDefaultPluginInfoHandler ¶
func NewDefaultPluginInfoHandler(pluginID string, pluginVersion string) *DefaultPluginInfoHandler
func (DefaultPluginInfoHandler) PluginInfo ¶
func (d DefaultPluginInfoHandler) PluginInfo(ctx context.Context, req *PluginInfoGetReq) (*PluginInfoGetRes, error)
type ForwardHTTPHeaders ¶
type GRPCSettings ¶
type HealthStatus ¶
type HealthStatus int
const ( HealthStatusUnknown HealthStatus = iota HealthStatusOk HealthStatusError )
func (HealthStatus) String ¶
func (hs HealthStatus) String() string
type PluginContext ¶
type PluginContext struct { OrgID int64 PluginID string User *User AppInstanceSettings *AppInstanceSettings DataSourceInstanceSettings *DataSourceInstanceSettings }
type PluginInfoGetReq ¶
type PluginInfoGetReq struct {
PluginContext PluginContext
}
type PluginInfoGetRes ¶
type PluginInfoHandler ¶
type PluginInfoHandler interface {
PluginInfo(ctx context.Context, req *PluginInfoGetReq) (*PluginInfoGetRes, error)
}
type PluginInfoHandlerFunc ¶
type PluginInfoHandlerFunc func(ctx context.Context, req *PluginInfoGetReq) (*PluginInfoGetRes, error)
func (PluginInfoHandlerFunc) PluginInfo ¶
func (fn PluginInfoHandlerFunc) PluginInfo(ctx context.Context, req *PluginInfoGetReq) (*PluginInfoGetRes, error)
type ServeOpts ¶
type ServeOpts struct { PluginJson *build.PluginJsonData CheckHealthHandler CheckHealthHandler PluginInfoHandler PluginInfoHandler CallResourceHandler CallResourceHandler GRPCSettings GRPCSettings EvRpcPort string ExitCallback func() // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.