basis

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const NewLine = "\n"

NewLine ...

Variables

This section is empty.

Functions

func BinName

func BinName(name string) string

BinName ...

func CreateNode

func CreateNode(ctx context.Context, r repo.Repo) (*ipfscore.IpfsNode, error)

CreateNode Creates an IPFS node and returns its coreAPI

func CurrentDir

func CurrentDir() string

CurrentDir ...

func DecodeHash

func DecodeHash(hash string) (ss []string, err error)

DecodeHash ...

func EncodeHash

func EncodeHash(ss ...string) (hash string, err error)

EncodeHash ...

func OpenRepo

func OpenRepo(repoPath string) (repo.Repo, error)

OpenRepo ...

func ParseAddresses

func ParseAddresses(ctx context.Context, addrs []string) ([]peer.AddrInfo, error)

ParseAddresses is a function that takes in a slice of string peer addresses (multiaddr + peerid) and returns a slice of properly constructed peers

func PipeDummy

func PipeDummy(ctx context.Context, module string, reader io.Reader) (e error)

PipeDummy ...

func PipeReader

func PipeReader(ctx context.Context, reader io.Reader, f func(string)) (e error)

PipeReader ...

func PipeScreen

func PipeScreen(ctx context.Context, module string, reader io.Reader) (e error)

PipeScreen ...

func RPCAddress

func RPCAddress(addr ma.Multiaddr) string

RPCAddress ...

func RPCPost

func RPCPost(url string, method string, input, output interface{}) error

RPCPost ...

func SplitIP

func SplitIP(addr string) (ip net.IP, port int)

SplitIP ...

func UUID

func UUID() string

UUID ...

Types

type INT256

type INT256 struct {
	// contains filtered or unexported fields
}

INT256 ...

func Distance

func Distance(a, b INT256) (ret INT256)

Distance ...

func INT256FromByteArray

func INT256FromByteArray(b [32]byte) (ret INT256)

INT256FromByteArray ...

func INT256FromByteString

func INT256FromByteString(s string) (ret INT256)

INT256FromByteString ...

func INT256FromBytes

func INT256FromBytes(b []byte) (ret INT256)

INT256FromBytes ...

func (*INT256) AsByteArray

func (i *INT256) AsByteArray() [32]byte

AsByteArray ...

func (*INT256) BitLen

func (i *INT256) BitLen() int

BitLen ...

func (*INT256) ByteString

func (i *INT256) ByteString() string

ByteString ...

func (INT256) Bytes

func (i INT256) Bytes() []byte

Bytes ...

func (INT256) Cmp

func (i INT256) Cmp(r INT256) int

Cmp ...

func (*INT256) IsZero

func (i *INT256) IsZero() bool

IsZero ...

func (*INT256) SetBytes

func (i *INT256) SetBytes(b []byte)

SetBytes ...

func (*INT256) SetMax

func (i *INT256) SetMax()

SetMax ...

func (INT256) String

func (i INT256) String() string

String ...

func (*INT256) Xor

func (i *INT256) Xor(a, b *INT256)

Xor ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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