Include source capabilities in source specs list

This commit is contained in:
nemunaire 2020-10-26 16:31:19 +01:00
parent 263ddddf0b
commit af4637ff8b
2 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,7 @@ func getSourceSpecs(_ *config.Options, p httprouter.Params, body io.Reader) Resp
ret := map[string]sources.SourceInfos{}
for k, src := range *srcs {
src.Infos.Capabilities = sources.GetSourceCapabilities(src.Creator())
ret[k] = src.Infos
}

View File

@ -46,6 +46,9 @@ type SourceInfos struct {
// Description is a brief description of what the source is.
Description string `json:"description"`
// Capabilites is a list of special ability of the source (automatically filled).
Capabilities []string `json:"capabilities,omitempty"`
}
// ListDomainsSource are functions to declare when we can retrives a list of managable domains from the given Source.