mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 13:56:27 +01:00
* Use vendor code for all go calls * Add missing vendor dependencies * Add travis_retry to yarn install * Fix go test call
20 lines
423 B
Go
20 lines
423 B
Go
package api
|
|
|
|
import (
|
|
"github.com/99designs/gqlgen/codegen/config"
|
|
"github.com/99designs/gqlgen/plugin"
|
|
)
|
|
|
|
type Option func(cfg *config.Config, plugins *[]plugin.Plugin)
|
|
|
|
func NoPlugins() Option {
|
|
return func(cfg *config.Config, plugins *[]plugin.Plugin) {
|
|
*plugins = nil
|
|
}
|
|
}
|
|
|
|
func AddPlugin(p plugin.Plugin) Option {
|
|
return func(cfg *config.Config, plugins *[]plugin.Plugin) {
|
|
*plugins = append(*plugins, p)
|
|
}
|
|
}
|