Versions in this module Expand all Collapse all v4 v4.14.1 Apr 26, 2023 Changes in this version + var DeprecatedProvider = NewMappedDocsProvider() + var ErrBadLabel = fmt.Errorf(...) + func BloblangFunctionsMarkdown() ([]byte, error) + func BloblangMethodsMarkdown() ([]byte, error) + func ComponentFieldsFromConf(conf any) (inferred map[string]FieldSpecs) + func DefaultTypeOf(t Type) string + func FieldsTemplate(lintableExamples bool) string + func GetPluginConfigYAML(name string, node *yaml.Node) (yaml.Node, error) + func GetYAMLPath(root *yaml.Node, path ...string) (*yaml.Node, error) + func ReservedFieldsByType(t Type) map[string]FieldSpec + func SanitiseYAML(cType Type, node *yaml.Node, conf SanitiseConfig) error + func ValidateLabel(label string) error + type AnnotatedExample struct + Config string + Summary string + Title string + type ComponentSpec struct + Categories []string + Config FieldSpec + Description string + Examples []AnnotatedExample + Footnotes string + Name string + Plugin bool + Status Status + Summary string + Type Type + Version string + func GetInferenceCandidateFromYAML(docProv Provider, t Type, node *yaml.Node) (string, ComponentSpec, error) + func (c *ComponentSpec) AsMarkdown(nest bool, fullConfigExample any) ([]byte, error) + type ComponentWalkYAMLFunc func(c WalkedYAMLComponent) error + type FieldFilter func(spec FieldSpec) bool + func ShouldDropDeprecated(b bool) FieldFilter + type FieldKind string + var Kind2DArray FieldKind = "2darray" + var KindArray FieldKind = "array" + var KindMap FieldKind = "map" + var KindScalar FieldKind = "scalar" + type FieldSpec struct + AnnotatedOptions [][2]string + Bloblang bool + Children FieldSpecs + Default *any + Description string + Examples []any + Interpolated bool + IsAdvanced bool + IsDeprecated bool + IsOptional bool + IsSecret bool + Kind FieldKind + Linter string + Name string + Options []string + Scrubber string + Type FieldType + Version string + func FieldAnything(name, description string, examples ...any) FieldSpec + func FieldBloblang(name, description string, examples ...any) FieldSpec + func FieldBool(name, description string, examples ...any) FieldSpec + func FieldBuffer(name, description string, examples ...any) FieldSpec + func FieldCache(name, description string, examples ...any) FieldSpec + func FieldComponent() FieldSpec + func FieldFloat(name, description string, examples ...any) FieldSpec + func FieldFromYAML(name string, node *yaml.Node) FieldSpec + func FieldInput(name, description string, examples ...any) FieldSpec + func FieldInt(name, description string, examples ...any) FieldSpec + func FieldInterpolatedString(name, description string, examples ...any) FieldSpec + func FieldMetrics(name, description string, examples ...any) FieldSpec + func FieldObject(name, description string, examples ...any) FieldSpec + func FieldOutput(name, description string, examples ...any) FieldSpec + func FieldProcessor(name, description string, examples ...any) FieldSpec + func FieldRateLimit(name, description string, examples ...any) FieldSpec + func FieldString(name, description string, examples ...any) FieldSpec + func FieldTracer(name, description string, examples ...any) FieldSpec + func FieldURL(name, description string, examples ...any) FieldSpec + func MetricsMappingFieldSpec(name string) FieldSpec + func (f FieldSpec) Advanced() FieldSpec + func (f FieldSpec) Array() FieldSpec + func (f FieldSpec) ArrayOfArrays() FieldSpec + func (f FieldSpec) AtVersion(v string) FieldSpec + func (f FieldSpec) CheckRequired() bool + func (f FieldSpec) ChildDefaultAndTypesFromStruct(conf any) FieldSpec + func (f FieldSpec) DefaultAndTypeFrom(from FieldSpec) FieldSpec + func (f FieldSpec) Deprecated() FieldSpec + func (f FieldSpec) FlattenChildrenForDocs() []FieldSpecCtx + func (f FieldSpec) GetDocsForPath(docsProvider Provider, path ...string) (FieldSpec, error) + func (f FieldSpec) HasAnnotatedOptions(options ...string) FieldSpec + func (f FieldSpec) HasDefault(v any) FieldSpec + func (f FieldSpec) HasOptions(options ...string) FieldSpec + func (f FieldSpec) HasType(t FieldType) FieldSpec + func (f FieldSpec) IsBloblang() FieldSpec + func (f FieldSpec) IsInterpolated() FieldSpec + func (f FieldSpec) JSONSchema() any + func (f FieldSpec) LintYAML(ctx LintContext, node *yaml.Node) []Lint + func (f FieldSpec) LinterBlobl(blobl string) FieldSpec + func (f FieldSpec) LinterFunc(fn LintFunc) FieldSpec + func (f FieldSpec) Map() FieldSpec + func (f FieldSpec) OmitWhen(fn func(field, parent any) (why string, shouldOmit bool)) FieldSpec + func (f FieldSpec) Optional() FieldSpec + func (f FieldSpec) SanitiseYAML(node *yaml.Node, conf SanitiseConfig) error + func (f FieldSpec) Scalar() FieldSpec + func (f FieldSpec) Secret() FieldSpec + func (f FieldSpec) SetYAMLPath(docsProvider Provider, root, value *yaml.Node, path ...string) error + func (f FieldSpec) ToYAML(recurse bool) (*yaml.Node, error) + func (f FieldSpec) WalkYAML(node *yaml.Node, prov Provider, fn ComponentWalkYAMLFunc) error + func (f FieldSpec) WithChildren(children ...FieldSpec) FieldSpec + func (f FieldSpec) YAMLLabelsToPaths(docsProvider Provider, node *yaml.Node, labelsToPaths map[string][]string, ...) + func (f FieldSpec) YAMLToValue(node *yaml.Node, conf ToValueConfig) (any, error) + type FieldSpecCtx struct + DefaultMarshalled string + ExamplesMarshalled []string + FullName string + Spec FieldSpec + type FieldSpecs []FieldSpec + func FieldsFromConf(conf any) FieldSpecs + func FieldsFromYAML(node *yaml.Node) FieldSpecs + func (f FieldSpecs) Add(specs ...FieldSpec) FieldSpecs + func (f FieldSpecs) DefaultAndTypeFrom(from FieldSpecs) FieldSpecs + func (f FieldSpecs) GetDocsForPath(docsProvider Provider, path ...string) (FieldSpec, error) + func (f FieldSpecs) JSONSchema() map[string]any + func (f FieldSpecs) LintYAML(ctx LintContext, node *yaml.Node) []Lint + func (f FieldSpecs) Merge(specs FieldSpecs) FieldSpecs + func (f FieldSpecs) SanitiseYAML(node *yaml.Node, conf SanitiseConfig) error + func (f FieldSpecs) SetYAMLPath(docsProvider Provider, root, value *yaml.Node, path ...string) error + func (f FieldSpecs) ToYAML() (*yaml.Node, error) + func (f FieldSpecs) WalkYAML(node *yaml.Node, prov Provider, fn ComponentWalkYAMLFunc) error + func (f FieldSpecs) YAMLLabelsToPaths(docsProvider Provider, node *yaml.Node, labelsToPaths map[string][]string, ...) + func (f FieldSpecs) YAMLToMap(node *yaml.Node, conf ToValueConfig) (map[string]any, error) + type FieldType string + var FieldTypeBool FieldType = "bool" + var FieldTypeBuffer FieldType = "buffer" + var FieldTypeCache FieldType = "cache" + var FieldTypeFloat FieldType = "float" + var FieldTypeInput FieldType = "input" + var FieldTypeInt FieldType = "int" + var FieldTypeMetrics FieldType = "metrics" + var FieldTypeObject FieldType = "object" + var FieldTypeOutput FieldType = "output" + var FieldTypeProcessor FieldType = "processor" + var FieldTypeRateLimit FieldType = "rate_limit" + var FieldTypeString FieldType = "string" + var FieldTypeTracer FieldType = "tracer" + var FieldTypeUnknown FieldType = "unknown" + func (t FieldType) IsCoreComponent() (Type, bool) + type Lint struct + Column int + Level LintLevel + Line int + Type LintType + What string + func LintBloblangField(ctx LintContext, line, col int, v any) []Lint + func LintBloblangMapping(ctx LintContext, line, col int, v any) []Lint + func LintYAML(ctx LintContext, cType Type, node *yaml.Node) []Lint + func NewLintError(line int, t LintType, msg string) Lint + func NewLintWarning(line int, t LintType, msg string) Lint + func (l Lint) Error() string + type LintContext struct + BloblangEnv *bloblang.Environment + DocsProvider Provider + LabelsToLine map[string]int + RejectDeprecated bool + RequireLabels bool + func NewLintContext() LintContext + type LintFunc func(ctx LintContext, line, col int, value any) []Lint + type LintLevel int + const LintError + const LintWarning + type LintType int + const LintBadBloblang + const LintBadLabel + const LintComponentMissing + const LintComponentNotFound + const LintCustom + const LintDeprecated + const LintDuplicateLabel + const LintExpectedArray + const LintExpectedObject + const LintExpectedScalar + const LintFailedRead + const LintInvalidOption + const LintMissing + const LintMissingLabel + const LintShouldOmit + const LintUnknown + type MappedDocsProvider struct + func NewMappedDocsProvider() *MappedDocsProvider + func (m *MappedDocsProvider) Clone() *MappedDocsProvider + func (m *MappedDocsProvider) GetDocs(name string, ctype Type) (ComponentSpec, bool) + func (m *MappedDocsProvider) RegisterDocs(spec ComponentSpec) + type Provider interface + GetDocs func(name string, ctype Type) (ComponentSpec, bool) + type SanitiseConfig struct + DocsProvider Provider + Filter FieldFilter + ForExample bool + RemoveDeprecated bool + RemoveTypeField bool + ScrubSecrets bool + func NewSanitiseConfig() SanitiseConfig + type Status string + var StatusBeta Status = "beta" + var StatusDeprecated Status = "deprecated" + var StatusExperimental Status = "experimental" + var StatusStable Status = "stable" + type ToValueConfig struct + FallbackToInterface bool + Passive bool + type Type string + var TypeBuffer Type = "buffer" + var TypeCache Type = "cache" + var TypeInput Type = "input" + var TypeMetrics Type = "metrics" + var TypeOutput Type = "output" + var TypeProcessor Type = "processor" + var TypeRateLimit Type = "rate_limit" + var TypeTracer Type = "tracer" + func Types() []Type + type WalkedYAMLComponent struct + ComponentType Type + Conf *yaml.Node + Label string + Name string Other modules containing this package github.com/dafanshu/benthos/v3