mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 16:02:43 +08:00
Rendering: add capabilities check (#44470)
* #44449: add feature check to rendering service * #44449: formatting * #44449: rename feature -> capability (https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities, https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo/getCapabilities) * #44449: refactor * #44449: remove commented code * Update pkg/services/rendering/capabilities.go Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com> * #44449: review fixes Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
This commit is contained in:
@ -96,6 +96,11 @@ type Session interface {
|
||||
Dispose(ctx context.Context)
|
||||
}
|
||||
|
||||
type CapabilitySupportRequestResult struct {
|
||||
IsSupported bool
|
||||
SemverConstraint string
|
||||
}
|
||||
|
||||
type Service interface {
|
||||
IsAvailable() bool
|
||||
Version() string
|
||||
@ -103,5 +108,6 @@ type Service interface {
|
||||
RenderCSV(ctx context.Context, opts CSVOpts, session Session) (*RenderCSVResult, error)
|
||||
RenderErrorImage(theme Theme, error error) (*RenderResult, error)
|
||||
GetRenderUser(ctx context.Context, key string) (*RenderUser, bool)
|
||||
HasCapability(capability CapabilityName) (CapabilitySupportRequestResult, error)
|
||||
CreateRenderingSession(ctx context.Context, authOpts AuthOpts, sessionOpts SessionOpts) (Session, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user