| 19 | ) |
| 20 | |
| 21 | type 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 |
| 48 | type DefaultTemplateProvider struct { |
no outgoing calls
no test coverage detected