lists

package
v0.0.0-...-59a8832 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 2 modules, 28 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

This section is empty.

Variables

This section is empty.

Functions

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(legacyAmino *codec.LegacyAmino)

Types

type IDList

type IDList interface {
	GetList() []ids.AnyID
	Search(ids.ID) (index int, found bool)
	// Add ignores ids of different type
	Add(...ids.ID) IDList
	Remove(...ids.ID) IDList
	ValidateBasic() error
}

type ParameterList

type ParameterList interface {
	proto.Message
	Get() []parameters.Parameter
}

type PropertyList

type PropertyList interface {

	// GetProperty searches for a property within the PropertyList using a given PropertyID.
	// If the property is found, it will return the property as output.
	// If the property is not found, the function will return `nil`.
	GetProperty(ids.PropertyID) properties.AnyProperty

	// Get returns all properties in the PropertyList as a slice of AnyProperty.
	Get() []properties.AnyProperty

	// GetPropertyIDList returns a list of all IDs in the PropertyList as an IDList.
	GetPropertyIDList() IDList

	// FromMetaPropertiesString tries to parse a provided string into a PropertyList.
	// If parsing is successful, the function returns the created PropertyList and no error.
	// If parsing fails, the function returns `nil` and the corresponding error.
	FromMetaPropertiesString(string) (PropertyList, error)

	// Add will add one or more new properties to the PropertyList.
	// If a property already exists in the list, the property is updated with the new value.
	// The function will return the updated PropertyList.
	Add(...properties.Property) PropertyList

	// Remove will remove one or more existing properties from the PropertyList.
	// The function will return the updated PropertyList.
	Remove(...properties.Property) PropertyList

	// Mutate will update one or more properties in the PropertyList with new values.
	// The function will return the updated PropertyList.
	Mutate(...properties.Property) PropertyList

	// ScrubData is used to convert all the metadata in the PropertyList to mesadata.
	// The function will return the updated PropertyList.
	ScrubData() PropertyList

	// ValidateBasic will check the PropertyList for basic validity.
	// This could involve checking if all properties have valid IDs, or if all required properties are present.
	// If the PropertyList is valid, the function returns no error.
	// If the PropertyList is not valid, the function returns the corresponding error.
	ValidateBasic() error
}

PropertyList represents a list of properties. It provides methods for retrieving, adding, removing, and mutating properties in the list.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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