MCPcopy
hub / github.com/hasura/graphql-engine / TemplateProvider

Interface TemplateProvider

cli/pkg/console/template.go:21–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19)
20
21type TemplateProvider interface {
22 // BasePath will return the basepath for the tempalate directory
23 BasePath() string
24
25 // This is the template filename eg: console.html, console2.html
26 TemplateFilename() string
27
28 // DoTemplateExist returns true if an asset exists at pathk
29 DoTemplateExist(path string) bool
30 LoadTemplates(path string, templateNames ...string) (multitemplate.Render, error)
31
32 // GetTemplateVersion returns the template version tv required to render
33 // the console html.
34 GetTemplateVersion(v *version.Version) string
35 // GetAssetsVersion returns the assets version av to be used in the
36 // console template. This function is supposed to return the following:
37 // > input -> output
38 // > dev-build -> versioned/dev-build
39 // > v1.0.0-beta.01 -> beta/v1.0
40 // > v1.0.0-alpha.01 -> alpha/v1.0
41 // > v1.2.1-rc.03 -> rc/v1.2
42 // > v1.1.0 -> stable/v1.1
43 GetAssetsVersion(v *version.Version) string
44 GetAssetsCDN() string
45}
46
47// DefaultTemplateProvider implements the github.com/hasura/graphl-engine/cli/pkg/templates.DefaultTemplateProvider interface
48type DefaultTemplateProvider struct {

Callers 10

BuildConsoleRouterFunction · 0.65
PrepareMethod · 0.65
BuildConsoleRouterFunction · 0.65
BuildConsoleRouterFunction · 0.65
BuildConsoleRouterFunction · 0.65
RunMethod · 0.95
GetHTTPServerMethod · 0.65
RunMethod · 0.95
GetHTTPServerMethod · 0.65
RunMethod · 0.95

Implementers 1

DefaultTemplateProvidercli/pkg/console/template.go

Calls

no outgoing calls

Tested by

no test coverage detected