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:
Artur Wierzbicki
2022-01-28 21:24:15 +04:00
committed by GitHub
parent 4e37a53a1c
commit 254c59725e
5 changed files with 212 additions and 0 deletions

View File

@ -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)
}