custommetadata

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const NAME = "CustomMetadata"

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomMetadata

type CustomMetadata struct {
	metadata.MetadataInfo
	XMLName   xml.Name    `xml:"CustomMetadata"`
	Xmlns     string      `xml:"xmlns,attr"`
	Xsi       string      `xml:"xmlns:xsi,attr,omitempty"`
	Xsd       string      `xml:"xmlns:xsd,attr,omitempty"`
	Label     string      `xml:"label"`
	Protected BooleanText `xml:"protected"`
	Values    []Value     `xml:"values"`
}

func Open

func Open(path string) (*CustomMetadata, error)

func (*CustomMetadata) AddValue

func (m *CustomMetadata) AddValue(key string, value any)

func (*CustomMetadata) SetMetadata

func (c *CustomMetadata) SetMetadata(m metadata.MetadataInfo)

func (*CustomMetadata) Tidy

func (p *CustomMetadata) Tidy()

func (*CustomMetadata) Type

func (*CustomMetadata) UpdateFieldValue

func (p *CustomMetadata) UpdateFieldValue(field string, value string) error

type TypedValue

type TypedValue struct {
	Text string `xml:",innerxml"`
	Type string `xml:"xsi:type,attr,omitempty"`
	Nil  string `xml:"xsi:nil,attr,omitempty"`
}

type Value

type Value struct {
	Field string     `xml:"field"`
	Value TypedValue `xml:"value"`
}

Jump to

Keyboard shortcuts

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