types

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAllGTE added in v1.3.0

func IsAllGTE(coins sdk.DecCoins, coinsB sdk.DecCoins) bool

IsAllGTE returns false if for any denom in coinsB, the denom is present at a smaller amount in coins; else returns true.

Types

type Addresses

type Addresses []sdk.AccAddress

Addresses is an alias for a list of sdk.AccAddress that enables custom operations

func (Addresses) AppendIfMissing

func (addresses Addresses) AppendIfMissing(address sdk.AccAddress) (Addresses, bool)

AppendIfMissing returns a new Addresses instance containing the given address if it wasn't already present

func (Addresses) Contains

func (addresses Addresses) Contains(address sdk.Address) bool

Contains returns true iff the addresses list contains the given address

func (Addresses) Empty added in v1.2.0

func (addresses Addresses) Empty() bool

Empty returns true if this slice does not contain any address

func (Addresses) IndexOf added in v1.3.0

func (addresses Addresses) IndexOf(address sdk.Address) int

IndexOf returns the index of the given address inside the addresses array, or -1 if such an address was not found

func (Addresses) RemoveIfExisting added in v1.3.0

func (addresses Addresses) RemoveIfExisting(address sdk.Address) (Addresses, bool)

RemoveIfExisting returns a new Addresses instance that does not contain the given address.

type Strings added in v1.2.0

type Strings []string

Strings represents a slice of strings.

func (Strings) AppendIfMissing added in v1.2.0

func (elements Strings) AppendIfMissing(element string) (Strings, bool)

AppendIfMissing returns a new slice containing the given element. If the element was already present, it won't be appended and false will be returned. If it wasn't present, the element will be appended to the list and true will be returned.

func (Strings) Contains added in v1.3.0

func (elements Strings) Contains(element string) bool

Contains returns true iff the given element is present inside the elements slice

func (Strings) Equals added in v1.3.0

func (elements Strings) Equals(other Strings) bool

Equals returns true if elements contain the same data of the other slice, in the same order.

Jump to

Keyboard shortcuts

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