Documentation ¶
Overview ¶
Package rendering is a generated GoMock package.
Index ¶
- Variables
- type AuthOpts
- type CSVOpts
- type Capability
- type CapabilityName
- type CapabilitySupportRequestResult
- type ErrorOpts
- type MockService
- func (m *MockService) CreateRenderingSession(arg0 context.Context, arg1 AuthOpts, arg2 SessionOpts) (Session, error)
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) GetRenderUser(arg0 context.Context, arg1 string) (*RenderUser, bool)
- func (m *MockService) HasCapability(arg0 context.Context, arg1 CapabilityName) (CapabilitySupportRequestResult, error)
- func (m *MockService) IsAvailable(arg0 context.Context) bool
- func (m *MockService) Render(arg0 context.Context, arg1 Opts, arg2 Session) (*RenderResult, error)
- func (m *MockService) RenderCSV(arg0 context.Context, arg1 CSVOpts, arg2 Session) (*RenderCSVResult, error)
- func (m *MockService) RenderErrorImage(arg0 models.Theme, arg1 error) (*RenderResult, error)
- func (m *MockService) SanitizeSVG(arg0 context.Context, arg1 *SanitizeSVGRequest) (*SanitizeSVGResponse, error)
- func (m *MockService) Version() string
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) CreateRenderingSession(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetRenderUser(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) HasCapability(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) IsAvailable(arg0 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) Render(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) RenderCSV(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) RenderErrorImage(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) SanitizeSVG(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) Version() *gomock.Call
- type Opts
- type RenderCSVResult
- type RenderResult
- type RenderType
- type RenderUser
- type RenderingService
- func (rs *RenderingService) CreateRenderingSession(ctx context.Context, opts AuthOpts, sessionOpts SessionOpts) (Session, error)
- func (rs *RenderingService) GetRenderUser(ctx context.Context, key string) (*RenderUser, bool)
- func (rs *RenderingService) HasCapability(ctx context.Context, capability CapabilityName) (CapabilitySupportRequestResult, error)
- func (rs *RenderingService) IsAvailable(ctx context.Context) bool
- func (rs *RenderingService) Render(ctx context.Context, opts Opts, session Session) (*RenderResult, error)
- func (rs *RenderingService) RenderCSV(ctx context.Context, opts CSVOpts, session Session) (*RenderCSVResult, error)
- func (rs *RenderingService) RenderErrorImage(theme models.Theme, err error) (*RenderResult, error)
- func (rs *RenderingService) Run(ctx context.Context) error
- func (rs *RenderingService) SanitizeSVG(ctx context.Context, req *SanitizeSVGRequest) (*SanitizeSVGResponse, error)
- func (rs *RenderingService) Version() string
- type SanitizeSVGRequest
- type SanitizeSVGResponse
- type Service
- type Session
- type SessionOpts
- type TimeoutOpts
Constants ¶
This section is empty.
Variables ¶
var ErrConcurrentLimitReached = errors.New("rendering concurrent limit reached")
var ErrInvalidPluginVersion = errors.New("invalid plugin version")
var ErrServerTimeout = errutil.NewBase(errutil.StatusUnknown, "rendering.serverTimeout", errutil.WithPublicMessage("error trying to connect to image-renderer service"))
var ErrTimeout = errors.New("timeout error - you can set timeout in seconds with &timeout url parameter")
var ErrUnknownCapability = errors.New("unknown capability")
Functions ¶
This section is empty.
Types ¶
type Capability ¶
type Capability struct {
// contains filtered or unexported fields
}
type CapabilityName ¶
type CapabilityName string
const ( ScalingDownImages CapabilityName = "ScalingDownImages" FullHeightImages CapabilityName = "FullHeightImages" SvgSanitization CapabilityName = "SvgSanitization" )
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) CreateRenderingSession ¶
func (m *MockService) CreateRenderingSession(arg0 context.Context, arg1 AuthOpts, arg2 SessionOpts) (Session, error)
CreateRenderingSession mocks base method.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) GetRenderUser ¶
func (m *MockService) GetRenderUser(arg0 context.Context, arg1 string) (*RenderUser, bool)
GetRenderUser mocks base method.
func (*MockService) HasCapability ¶
func (m *MockService) HasCapability(arg0 context.Context, arg1 CapabilityName) (CapabilitySupportRequestResult, error)
HasCapability mocks base method.
func (*MockService) IsAvailable ¶
func (m *MockService) IsAvailable(arg0 context.Context) bool
IsAvailable mocks base method.
func (*MockService) Render ¶
func (m *MockService) Render(arg0 context.Context, arg1 Opts, arg2 Session) (*RenderResult, error)
Render mocks base method.
func (*MockService) RenderCSV ¶
func (m *MockService) RenderCSV(arg0 context.Context, arg1 CSVOpts, arg2 Session) (*RenderCSVResult, error)
RenderCSV mocks base method.
func (*MockService) RenderErrorImage ¶
func (m *MockService) RenderErrorImage(arg0 models.Theme, arg1 error) (*RenderResult, error)
RenderErrorImage mocks base method.
func (*MockService) SanitizeSVG ¶
func (m *MockService) SanitizeSVG(arg0 context.Context, arg1 *SanitizeSVGRequest) (*SanitizeSVGResponse, error)
SanitizeSVG mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) CreateRenderingSession ¶
func (mr *MockServiceMockRecorder) CreateRenderingSession(arg0, arg1, arg2 interface{}) *gomock.Call
CreateRenderingSession indicates an expected call of CreateRenderingSession.
func (*MockServiceMockRecorder) GetRenderUser ¶
func (mr *MockServiceMockRecorder) GetRenderUser(arg0, arg1 interface{}) *gomock.Call
GetRenderUser indicates an expected call of GetRenderUser.
func (*MockServiceMockRecorder) HasCapability ¶
func (mr *MockServiceMockRecorder) HasCapability(arg0, arg1 interface{}) *gomock.Call
HasCapability indicates an expected call of HasCapability.
func (*MockServiceMockRecorder) IsAvailable ¶
func (mr *MockServiceMockRecorder) IsAvailable(arg0 interface{}) *gomock.Call
IsAvailable indicates an expected call of IsAvailable.
func (*MockServiceMockRecorder) Render ¶
func (mr *MockServiceMockRecorder) Render(arg0, arg1, arg2 interface{}) *gomock.Call
Render indicates an expected call of Render.
func (*MockServiceMockRecorder) RenderCSV ¶
func (mr *MockServiceMockRecorder) RenderCSV(arg0, arg1, arg2 interface{}) *gomock.Call
RenderCSV indicates an expected call of RenderCSV.
func (*MockServiceMockRecorder) RenderErrorImage ¶
func (mr *MockServiceMockRecorder) RenderErrorImage(arg0, arg1 interface{}) *gomock.Call
RenderErrorImage indicates an expected call of RenderErrorImage.
func (*MockServiceMockRecorder) SanitizeSVG ¶
func (mr *MockServiceMockRecorder) SanitizeSVG(arg0, arg1 interface{}) *gomock.Call
SanitizeSVG indicates an expected call of SanitizeSVG.
func (*MockServiceMockRecorder) Version ¶
func (mr *MockServiceMockRecorder) Version() *gomock.Call
Version indicates an expected call of Version.
type RenderCSVResult ¶
type RenderResult ¶
type RenderResult struct {
FilePath string
}
type RenderType ¶
type RenderType string
const ( RenderCSV RenderType = "csv" RenderPNG RenderType = "png" )
type RenderUser ¶
type RenderingService ¶
type RenderingService struct { Cfg *setting.Cfg RemoteCacheService *remotecache.RemoteCache RendererPluginManager plugins.RendererManager // contains filtered or unexported fields }
func ProvideService ¶
func ProvideService(cfg *setting.Cfg, features *featuremgmt.FeatureManager, remoteCache *remotecache.RemoteCache, rm plugins.RendererManager) (*RenderingService, error)
func (*RenderingService) CreateRenderingSession ¶
func (rs *RenderingService) CreateRenderingSession(ctx context.Context, opts AuthOpts, sessionOpts SessionOpts) (Session, error)
func (*RenderingService) GetRenderUser ¶
func (rs *RenderingService) GetRenderUser(ctx context.Context, key string) (*RenderUser, bool)
func (*RenderingService) HasCapability ¶
func (rs *RenderingService) HasCapability(ctx context.Context, capability CapabilityName) (CapabilitySupportRequestResult, error)
func (*RenderingService) IsAvailable ¶
func (rs *RenderingService) IsAvailable(ctx context.Context) bool
func (*RenderingService) Render ¶
func (rs *RenderingService) Render(ctx context.Context, opts Opts, session Session) (*RenderResult, error)
func (*RenderingService) RenderCSV ¶
func (rs *RenderingService) RenderCSV(ctx context.Context, opts CSVOpts, session Session) (*RenderCSVResult, error)
func (*RenderingService) RenderErrorImage ¶
func (rs *RenderingService) RenderErrorImage(theme models.Theme, err error) (*RenderResult, error)
func (*RenderingService) SanitizeSVG ¶
func (rs *RenderingService) SanitizeSVG(ctx context.Context, req *SanitizeSVGRequest) (*SanitizeSVGResponse, error)
func (*RenderingService) Version ¶
func (rs *RenderingService) Version() string
type SanitizeSVGRequest ¶
type SanitizeSVGResponse ¶
type SanitizeSVGResponse struct {
Sanitized []byte
}
type Service ¶
type Service interface { IsAvailable(ctx context.Context) bool Version() string Render(ctx context.Context, opts Opts, session Session) (*RenderResult, error) RenderCSV(ctx context.Context, opts CSVOpts, session Session) (*RenderCSVResult, error) RenderErrorImage(theme models.Theme, error error) (*RenderResult, error) GetRenderUser(ctx context.Context, key string) (*RenderUser, bool) HasCapability(ctx context.Context, capability CapabilityName) (CapabilitySupportRequestResult, error) CreateRenderingSession(ctx context.Context, authOpts AuthOpts, sessionOpts SessionOpts) (Session, error) SanitizeSVG(ctx context.Context, req *SanitizeSVGRequest) (*SanitizeSVGResponse, error) }