Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/devopsfaith/api2html
/ functions
Functions
150 in github.com/devopsfaith/api2html
⨍
Functions
150
◇
Types & classes
54
↓ 16 callers
Method
New
New creates a gin engine with the received config and the injected factories
engine/factory.go:34
↓ 12 callers
Function
assertResponse
(t *testing.T, e *gin.Engine, url string, status int, body string)
engine/engine_test.go:119
↓ 10 callers
Method
String
String implements the Stringer interface
engine/response.go:30
↓ 6 callers
Method
Set
Set adds or updates the renderer with the given name. After updating its internal state, it alerts all the subscriptors by sending the new renderer an
engine/template_store.go:42
↓ 5 callers
Method
AvailableISOs
()
generator/collector.go:17
↓ 5 callers
Method
Generate
(_ *cobra.Command, _ []string)
cmd/generate.go:56
↓ 5 callers
Method
HandlerFunc
HandlerFunc handles a gin request rendering the data returned by the response generator. If the response generator does not return an error, it adds a
engine/handler.go:120
↓ 4 callers
Method
Collect
(string)
generator/collector.go:16
↓ 4 callers
Method
Generate
(isos string)
generator/generator.go:12
↓ 4 callers
Function
NewMustacheRenderer
NewMustacheRenderer returns a MustacheRenderer and an error if something went wrong
engine/mustache.go:36
↓ 4 callers
Function
NewMustacheRendererMap
NewMustacheRendererMap returns a map with all renderers for the declared templates and layouts and an error if something went wrong
engine/mustache.go:14
↓ 4 callers
Method
Now
()
engine/response.go:123
↓ 4 callers
Function
ParseConfig
ParseConfig parses the content of the reader into a Config
engine/config.go:26
↓ 4 callers
Method
Serve
(_ *cobra.Command, _ []string)
cmd/serve.go:51
↓ 4 callers
Function
newMustacheTemplate
(r io.Reader)
engine/mustache.go:78
↓ 3 callers
Method
Create
()
skeleton/skeleton.go:51
↓ 3 callers
Method
Get
(name string)
engine/mustache.go:91
↓ 3 callers
Function
NewCollector
(configFolder, i18nFolder string)
generator/collector.go:49
↓ 3 callers
Function
NewHandler
NewHandler creates a Handler with the given configuration. The returned handler will be keeping itself subscribed to the latest template updates using
engine/handler.go:79
↓ 3 callers
Function
NewHandlerConfig
NewHandlerConfig creates a HandlerConfig from the given Page definition
engine/handler.go:45
↓ 3 callers
Function
NewLayoutMustacheRenderer
NewLayoutMustacheRenderer returns a LayoutMustacheRenderer and an error if something went wrong
engine/mustache.go:55
↓ 3 callers
Method
Render
(iso string, data Data, scanner Scanner)
generator/render.go:33
↓ 3 callers
Method
Render
(io.Writer, interface{})
engine/engine.go:79
↓ 3 callers
Method
ResponseGenerator
ResponseGenerator implements the ResponseGenerator interface
engine/response.go:82
↓ 3 callers
Function
checkRenderer
(tmpl Renderer)
engine/mustache_test.go:131
↓ 3 callers
Function
replaceParams
(URLPattern []byte, params map[string]string)
engine/backend.go:51
↓ 2 callers
Method
Create
(_ *cobra.Command, _ []string)
cmd/skeleton.go:51
↓ 2 callers
Method
HandlerFunc
HandlerFunc is a gin middleware for dealing with some errors
engine/handler.go:182
↓ 2 callers
Function
NewBackend
NewBackend creates a Backend with the received http client and url pattern
engine/backend.go:31
↓ 2 callers
Function
NewErrorHandler
NewErrorHandler creates a ErrorHandler using the content of the received path
engine/handler.go:165
↓ 2 callers
Function
NewMustachePageFactory
NewMustachePageFactory creates a MustachePageFactory with the injected params
engine/page.go:11
↓ 2 callers
Function
NewStaticHandler
NewStaticHandler creates a StaticHandler using the content of the received path
engine/handler.go:140
↓ 2 callers
Function
NewTemplateStore
NewTemplateStore creates a TemplateStore ready to be used The returned TemplateStore will be accepting and managing subscriptions
engine/template_store.go:9
↓ 2 callers
Function
ParseConfigFromFile
ParseConfigFromFile creates a Config with the contents of the received filepath
engine/config.go:15
↓ 2 callers
Method
ResponseGenerator
ResponseGenerator implements the ResponseGenerator interface
engine/response.go:55
↓ 2 callers
Method
Run
(...string)
cmd/serve.go:38
↓ 2 callers
Method
Scan
()
generator/scan.go:11
↓ 2 callers
Method
String
()
generator/collector.go:40
↓ 2 callers
Method
Watch
(c *cobra.Command, p []string)
cmd/generate.go:72
↓ 2 callers
Function
checkCommonResponseProperties
(t *testing.T, resp ResponseContext)
engine/response_test.go:209
↓ 2 callers
Function
customEngineFactory
(e engineWrapper)
cmd/serve_test.go:79
↓ 2 callers
Method
getMutex
(name string)
engine/template_store.go:81
↓ 2 callers
Function
putTemplateForm
(url, tmpl string)
engine/factory_test.go:157
↓ 1 callers
Method
Build
Build sets up the injected gin engine and template store depending on the contents of the received configuration
engine/page.go:23
↓ 1 callers
Function
CachedClient
CachedClient returns a Dackend to the received URLPattern with a in-memory cache aware http client
engine/backend.go:26
↓ 1 callers
Function
DefaultClient
DefaultClient returns a Dackend to the received URLPattern with the default http client from the stdlib
engine/backend.go:20
↓ 1 callers
Method
HandlerFunc
HandlerFunc creates a gin handler that does nothing but writing the static content
engine/handler.go:155
↓ 1 callers
Function
JSONArrayDecoder
JSONArrayDecoder decodes the reader content and puts it into the Array property of the injected ResponseContext
engine/decode.go:26
↓ 1 callers
Function
JSONDecoder
JSONDecoder decodes the reader content and puts it into the Data property of the injected ResponseContext
engine/decode.go:13
↓ 1 callers
Function
New
(basePath, ignoreRegex string)
generator/generator.go:15
↓ 1 callers
Function
New
New creates a gin engine with the default Factory
engine/engine.go:69
↓ 1 callers
Function
New
New returns a statikFS Skel
skeleton/skeleton.go:40
↓ 1 callers
Function
NewBlog
NewBlog returns a statikSkel with the blog example contents
skeleton/skeleton.go:45
↓ 1 callers
Function
NewScanner
(ts []string)
generator/scan.go:19
↓ 1 callers
Function
NoopResponse
NoopResponse is a ResponseGenerator that always returns an empty response and the ErrNoResponseGeneratorDefined error
engine/response.go:44
↓ 1 callers
Method
String
()
generator/collector.go:29
↓ 1 callers
Method
availableConfigISOs
()
generator/collector.go:107
↓ 1 callers
Method
availableTranslationISOs
()
generator/collector.go:91
↓ 1 callers
Function
defaultBlogSkelFactory
(outputPath string)
cmd/skeleton.go:43
↓ 1 callers
Function
defaultEngineFactory
(cfgPath string, devel bool)
cmd/serve.go:43
↓ 1 callers
Function
defaultGeneratorFactory
(basePath string, ignoreRegex string)
cmd/generate.go:48
↓ 1 callers
Function
erroredEngineFactory
(err error)
cmd/serve_test.go:75
↓ 1 callers
Method
getConfigurations
(iso string)
generator/collector.go:123
↓ 1 callers
Function
getTemplatesInFolder
(prefix string)
generator/scan.go:38
↓ 1 callers
Method
getTranslations
(iso string)
generator/collector.go:168
↓ 1 callers
Method
newGinEngine
(cfg Config, devel bool)
engine/factory.go:98
↓ 1 callers
Method
prepareOutputFolder
(iso string)
generator/render.go:61
↓ 1 callers
Method
setStatics
(e *gin.Engine, cfg Config)
engine/factory.go:114
↓ 1 callers
Method
subscribe
()
engine/template_store.go:29
↓ 1 callers
Method
updateRenderer
()
engine/handler.go:107
Method
AvailableISOs
()
generator/collector.go:75
Method
Collect
(iso string)
generator/collector.go:58
Method
Create
()
cmd/skeleton_test.go:53
Method
Create
()
cmd/skeleton_test.go:61
Method
Create
Generate the skel from the statikFS
skeleton/skeleton.go:60
Function
ExampleGenerator
()
generator/generator_test.go:8
Function
ExampleResponseContext_String
()
engine/response_test.go:15
Function
Execute
Execute executes the root command
cmd/root.go:13
Method
Generate
(isos string)
generator/generator.go:39
Method
Generate
(_ string)
cmd/generate_test.go:189
Method
Generate
(have string)
cmd/generate_test.go:197
Method
Get
Get returns a Renderer and a boolean signaling if the given name is not in the store
engine/template_store.go:65
Function
NewRenderer
(outputFolder string, r *regexp.Regexp)
generator/render.go:17
Method
Render
(string, Data, Scanner)
generator/render.go:14
Method
Render
Render implements the Renderer interface
engine/engine.go:86
Method
Render
Render implements the Renderer interface by returning the injected error
engine/engine.go:102
Method
Render
Render implements the renderer interface
engine/mustache.go:50
Method
Render
Render implements the renderer interface
engine/mustache.go:74
Method
Run
(_ ...string)
cmd/serve_test.go:87
Method
Scan
()
generator/scan.go:25
Method
Scan
()
generator/render_test.go:101
Method
Set
(name string, tmpl Renderer)
engine/template_store.go:73
Function
TestData_String
(t *testing.T)
generator/collector_test.go:57
Function
TestDynamicResponseGenerator_koBackend
(t *testing.T)
engine/response_test.go:92
Function
TestDynamicResponseGenerator_koDecoder
(t *testing.T)
engine/response_test.go:131
Function
TestDynamicResponseGenerator_ok
(t *testing.T)
engine/response_test.go:167
Function
TestFactory_New_koConfigParser
(t *testing.T)
engine/factory_test.go:18
Function
TestFactory_New_ok
(t *testing.T)
engine/factory_test.go:35
Function
TestFactory_New_reloadTemplate
(t *testing.T)
engine/factory_test.go:86
Function
TestJSONArrayDecoder
(t *testing.T)
engine/decode_test.go:22
next →
1–100 of 150, ranked by callers