metadata

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterNoErrorLevelMeta

func FilterNoErrorLevelMeta(metas []*commonpb.MetadataField) (notErrorLevel, errorLevel []*commonpb.MetadataField)

Types

type Metadata

type Metadata []MetadataField

func (Metadata) DedupByName

func (metadata Metadata) DedupByName() Metadata

func (Metadata) FilterNoErrorLevel

func (metadata Metadata) FilterNoErrorLevel() (notErrorLevel, errorLevel Metadata)

FilterNoErrorLevel filter by field level, return collection of NotErrorLevel and ErrorLevel.

type MetadataField

type MetadataField struct {
	Name     string            `json:"name"`
	Value    string            `json:"value"`
	Type     string            `json:"type,omitempty"`
	Optional bool              `json:"optional,omitempty"`
	Labels   map[string]string `json:"labels,omitempty"`
	Level    MetadataLevel     `json:"level,omitempty"`
}

func (MetadataField) GetLevel

func (field MetadataField) GetLevel() MetadataLevel

type MetadataFieldType

type MetadataFieldType string

type MetadataLevel

type MetadataLevel string
var (
	MetadataLevelError MetadataLevel = "ERROR"
	MetadataLevelWarn  MetadataLevel = "WARN"
	MetadataLevelInfo  MetadataLevel = "INFO"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL