Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearRegisteredAdvice ¶
func ClearRegisteredAdvice()
ClearRegisteredAdvice clears all registered advice - used for testing. Warning: This will not remove the registered routes from the http server.
func GetAdviceList ¶
func GetAdviceList() advice_kit_api.AdviceList
GetAdviceList returns a list of all root endpoints of registered advice.
func RegisterAdvice ¶
func RegisterAdvice(cfg AdviceConfig, fn AdviceFn)
Types ¶
type AdviceConfig ¶
type AdviceConfig struct {
DisableAdvice bool `json:"disableAdvice" required:"false" split_words:"true" default:"false"`
ActiveAdviceList []string `json:"activeAdviceList" required:"false" split_words:"true" default:"*"`
AdviceExcludeQuery string `json:"adviceExcludeQuery" required:"false" split_words:"true" default:""`
}
func (AdviceConfig) IsActive ¶
func (c AdviceConfig) IsActive(id string) bool
type AdviceFn ¶
type AdviceFn func() advice_kit_api.AdviceDefinition
Click to show internal directories.
Click to hide internal directories.