import "go.chromium.org/luci/config/server/cfgclient/backend/format"
Package format implements a config client Backend that performs formatting on items.
The available formats are registered during init() time via 'Register'.
func ClearRegistry()
ClearRegistry removes all registered formatters.
Useful in tests that call Register to setup initial state.
Register registers a Formatter implementation for given format.
If the supplied key is already registered, Register will panic.
type Backend struct { // B is the underlying Backend that this Backend will pull data // from. backend.B }
Backend is a backend.B implementation that applies Formatter transformations to the various Items that pass through it.
Formatter transformations are registered explicitly to the Resolver descriptions of the types that they operate on. If an Item is already formatted, no further transformations will be applied.
func (b *Backend) Get(c context.Context, configSet config.Set, path string, p backend.Params) (*config.Config, error)
Get implements backend.B.
func (b *Backend) GetAll(c context.Context, t backend.GetAllTarget, path string, p backend.Params) ( []*config.Config, error)
GetAll implements backend.B.
Formatter applies a transformation to the data's cached representation.
The Formatter is supplied with the content to format along with the formatter-specific metadata, fd.
Formatter operates on a config.Config's Content via the "format" Backend.
Package format imports 6 packages (graph) and is imported by 2 packages. Updated 2019-12-05. Refresh now. Tools for package owners.