data

package
v1.0.1-0...-9b07162 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccAddressData

type AccAddressData interface {
	ListableData
	Get() sdkTypes.AccAddress
}

type AnyData

type AnyData interface {
	Data
	Get() Data
	IsAnyData()
}

type AnyListableData

type AnyListableData interface {
	ListableData
	Get() Data
	IsAnyListableData()
}

type BooleanData

type BooleanData interface {
	ListableData
	Get() bool
}

type Data

type Data interface {
	GetID() ids.DataID
	GetBondWeight() math.Int

	ValidateBasic() error
	Unmarshal([]byte) error
	MarshalTo([]byte) (int, error)
	AsString() string
	FromString(string) (Data, error)
	Bytes() []byte

	GetTypeID() ids.StringID
	ZeroValue() Data
	// GenerateHash returns the hash of the Data as an PropertyID
	// * Returns PropertyID of empty bytes when the value of Data is that Data type's zero value
	GenerateHashID() ids.HashID
	ToAnyData() AnyData
}

TODO URI and PropertyID Data type

type DecData

type DecData interface {
	ListableData
	Get() sdkTypes.Dec
}

type HeightData

type HeightData interface {
	ListableData
	Get() types.Height
}

type IDData

type IDData interface {
	ListableData
	Get() ids.AnyID
}

type LinkedData

type LinkedData interface {
	ListableData
	GetResourceID() ids.HashID
	GetExtensionID() ids.StringID
	GetServiceEndpoint() string
}

type ListData

type ListData interface {
	Data
	ValidateWithoutLengthCheck() error
	Get() []AnyListableData
	Search(ListableData) (int, bool)
	// Add ignores data with type not matching list data type
	Add(...ListableData) ListData
	Remove(...ListableData) ListData
}

type ListableData

type ListableData interface {
	ToAnyListableData() AnyListableData
	Compare(ListableData) int
	Data
}

type NumberData

type NumberData interface {
	ListableData
	Get() math.Int
}

type StringData

type StringData interface {
	ListableData
	Get() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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