types

package
v0.0.0-...-2c4dd60 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashAlgUnknown = pb.HashAlgUnknown
	SHA1           = pb.SHA1
	SHA3           = pb.SHA3
)

Variables

View Source
var (
	EmptyHash = Hash{}
)
View Source
var EmptyID = ID{}

Functions

This section is empty.

Types

type Address

type Address [20]byte

func AddressFromBytes

func AddressFromBytes(bs []byte) Address

func AddressFromHex

func AddressFromHex(hx string) (Address, error)

func NewPopulatedAddress

func NewPopulatedAddress(_ gogoprotobufTest) *Address

func RandomAddress

func RandomAddress() Address

func (Address) Bytes

func (a Address) Bytes() []byte

func (Address) Compare

func (a Address) Compare(other Address) int

func (Address) Equal

func (a Address) Equal(other Address) bool

func (Address) Hex

func (a Address) Hex() string

func (Address) IsZero

func (a Address) IsZero() bool

func (Address) MapKey

func (a Address) MapKey() (state.Keypath, error)

func (Address) Marshal

func (a Address) Marshal() ([]byte, error)

func (Address) MarshalJSON

func (a Address) MarshalJSON() ([]byte, error)

func (Address) MarshalText

func (a Address) MarshalText() ([]byte, error)

func (*Address) MarshalTo

func (a *Address) MarshalTo(data []byte) (n int, err error)

func (Address) Pretty

func (a Address) Pretty() string

func (*Address) ScanMapKey

func (a *Address) ScanMapKey(keypath state.Keypath) error

func (*Address) Size

func (a *Address) Size() int

func (Address) String

func (a Address) String() string

func (*Address) Unmarshal

func (a *Address) Unmarshal(data []byte) error

func (*Address) UnmarshalJSON

func (a *Address) UnmarshalJSON(data []byte) error

func (*Address) UnmarshalText

func (a *Address) UnmarshalText(asHex []byte) error

type Hash

type Hash [32]byte

func HashBytes

func HashBytes(bs []byte) Hash

func HashFromBytes

func HashFromBytes(bs []byte) (Hash, error)

func HashFromHex

func HashFromHex(hexStr string) (Hash, error)

func NewPopulatedHash

func NewPopulatedHash(_ gogoprotobufTest) *Hash

func (Hash) Bytes

func (h Hash) Bytes() []byte

func (Hash) Compare

func (h Hash) Compare(other Hash) int

func (Hash) Copy

func (h Hash) Copy() Hash

func (Hash) Equal

func (h Hash) Equal(other Hash) bool

func (Hash) Hex

func (h Hash) Hex() string

func (Hash) Marshal

func (h Hash) Marshal() ([]byte, error)

func (Hash) MarshalJSON

func (h Hash) MarshalJSON() ([]byte, error)

func (Hash) MarshalText

func (h Hash) MarshalText() ([]byte, error)

func (*Hash) MarshalTo

func (h *Hash) MarshalTo(data []byte) (n int, err error)

func (Hash) Pretty

func (h Hash) Pretty() string

func (*Hash) Size

func (h *Hash) Size() int

func (Hash) String

func (h Hash) String() string

func (*Hash) Unmarshal

func (h *Hash) Unmarshal(data []byte) error

func (*Hash) UnmarshalJSON

func (h *Hash) UnmarshalJSON(data []byte) error

func (*Hash) UnmarshalText

func (h *Hash) UnmarshalText(text []byte) error

type HashAlg

type HashAlg = pb.HashAlg

type ID

type ID [32]byte

func IDFromBytes

func IDFromBytes(bs []byte) ID

func IDFromHex

func IDFromHex(h string) (ID, error)

func IDFromString

func IDFromString(s string) ID

func NewPopulatedID

func NewPopulatedID(_ gogoprotobufTest) *ID

func RandomID

func RandomID() ID

func (ID) Bytes

func (id ID) Bytes() []byte

func (ID) Compare

func (id ID) Compare(other ID) int

func (ID) Equal

func (id ID) Equal(other ID) bool

func (ID) Hex

func (id ID) Hex() string

func (ID) Marshal

func (id ID) Marshal() ([]byte, error)

func (ID) MarshalJSON

func (id ID) MarshalJSON() ([]byte, error)

func (ID) MarshalText

func (id ID) MarshalText() ([]byte, error)

func (*ID) MarshalTo

func (id *ID) MarshalTo(data []byte) (n int, err error)

func (ID) Pretty

func (id ID) Pretty() string

func (*ID) Size

func (id *ID) Size() int

func (ID) String

func (id ID) String() string

func (*ID) Unmarshal

func (id *ID) Unmarshal(data []byte) error

func (*ID) UnmarshalJSON

func (id *ID) UnmarshalJSON(data []byte) error

func (*ID) UnmarshalText

func (id *ID) UnmarshalText(text []byte) error

type Range

type Range = pb.Range

type Set

type Set[T comparable] map[T]struct{}

func NewSet

func NewSet[T comparable](vals []T) Set[T]

func (Set[T]) Add

func (s Set[T]) Add(val T) bool

func (Set[T]) Any

func (s Set[T]) Any() T

func (Set[T]) Contains

func (s Set[T]) Contains(val T) bool

func (Set[T]) Copy

func (s Set[T]) Copy() Set[T]

func (Set[T]) Equal

func (s Set[T]) Equal(other Set[T]) bool

func (Set[T]) Intersection

func (s Set[T]) Intersection(other Set[T]) Set[T]

func (Set[T]) MarshalYAML

func (s Set[T]) MarshalYAML() (interface{}, error)

func (Set[T]) Remove

func (s Set[T]) Remove(val T) bool

func (Set[T]) Slice

func (s Set[T]) Slice() []T

func (*Set[T]) UnmarshalYAML

func (s *Set[T]) UnmarshalYAML(node *yaml.Node) error

type Signature

type Signature []byte

func NewPopulatedSignature

func NewPopulatedSignature(_ gogoprotobufTest) *Signature

func SignatureFromHex

func SignatureFromHex(hx string) (Signature, error)

func (Signature) Compare

func (sig Signature) Compare(other Signature) int

func (Signature) Copy

func (sig Signature) Copy() Signature

func (Signature) Equal

func (sig Signature) Equal(other Signature) bool

func (Signature) Hex

func (sig Signature) Hex() string

func (Signature) Marshal

func (sig Signature) Marshal() ([]byte, error)

func (Signature) MarshalJSON

func (sig Signature) MarshalJSON() ([]byte, error)

func (*Signature) MarshalTo

func (sig *Signature) MarshalTo(data []byte) (n int, err error)

func (*Signature) Size

func (sig *Signature) Size() int

func (Signature) String

func (sig Signature) String() string

func (*Signature) Unmarshal

func (sig *Signature) Unmarshal(data []byte) error

func (*Signature) UnmarshalJSON

func (sig *Signature) UnmarshalJSON(data []byte) error

func (*Signature) UnmarshalText

func (sig *Signature) UnmarshalText(bs []byte) error

type SyncSet

type SyncSet[T comparable] struct {
	// contains filtered or unexported fields
}

func NewSyncSet

func NewSyncSet[T comparable](vals []T) SyncSet[T]

func (SyncSet[T]) Add

func (s SyncSet[T]) Add(val T) bool

func (SyncSet[T]) Any

func (s SyncSet[T]) Any() T

func (SyncSet[T]) Contains

func (s SyncSet[T]) Contains(val T) bool

func (SyncSet[T]) Copy

func (s SyncSet[T]) Copy() SyncSet[T]

func (SyncSet[T]) Equal

func (s SyncSet[T]) Equal(other SyncSet[T]) bool

func (SyncSet[T]) MarshalYAML

func (s SyncSet[T]) MarshalYAML() (interface{}, error)

func (SyncSet[T]) Remove

func (s SyncSet[T]) Remove(val T) bool

func (SyncSet[T]) Slice

func (s SyncSet[T]) Slice() []T

func (*SyncSet[T]) UnmarshalYAML

func (s *SyncSet[T]) UnmarshalYAML(node *yaml.Node) error

type Time

type Time time.Time

func (Time) MarshalStateBytes

func (t Time) MarshalStateBytes() ([]byte, error)

func (*Time) UnmarshalStateBytes

func (t *Time) UnmarshalStateBytes(bs []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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