From adcb195f789c7875ee2afc8cc8ac7559444968ed Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Mon, 9 Dec 2024 18:22:48 -0500 Subject: [PATCH] Add configurable interface --- plugin.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin.go b/plugin.go index fec7717..2db1d29 100644 --- a/plugin.go +++ b/plugin.go @@ -17,3 +17,10 @@ type FuncProviderFor interface { // may return nil, in which case its result is simply not considered. FuncMapFor (*Document) template.FuncMap } + +// Configurable is an object that can be configured according to metadata. +type Configurable interface { + // Configure uses config to configure the object. It must not modify + // config. Keys are namespaced with a '.' and are written in kebab case. + Configure (config Meta) error +}