core

package
v0.0.0-...-83f9183 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: Unlicense Imports: 4 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeToString

func EncodeToString(b []byte) string

func Equals

func Equals(a Address, b Address) bool

Types

type Address

type Address interface {
	Textable
	Binariable

	String() string
}

type Binariable

type Binariable interface {
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler
}

type Bytes

type Bytes []byte

func (Bytes) MarshalText

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

func (Bytes) String

func (h Bytes) String() string

func (Bytes) UnmarshalText

func (h Bytes) UnmarshalText(b []byte) error

type Config

type Config interface {
	GetId() string
	GetType() int
	GetGasAccount() Address
	GetDataDir() string
	GetBootstraps() []string
	GetAddress() string
	GetPort() int64
	GetThreadCount() uint32
	GetTimeout() int64
	GetSystemCode() string
	GetBlockDuration() uint32
	GetBackend() string
}

type Hash

type Hash []byte

func (Hash) Bytes

func (h Hash) Bytes() []byte

func (Hash) Equals

func (h Hash) Equals(a Hash) bool

func (Hash) IsZero

func (h Hash) IsZero() bool

func (Hash) MarshalText

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

func (Hash) String

func (h Hash) String() string

func (Hash) UnmarshalText

func (h Hash) UnmarshalText(b []byte) error

type Indexable

type Indexable interface {
	GetIndex() uint64
}

type PublicKey

type PublicKey []byte

func (PublicKey) MarshalText

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

func (PublicKey) String

func (h PublicKey) String() string

func (PublicKey) UnmarshalText

func (h PublicKey) UnmarshalText(b []byte) error

type Service

type Service interface {
	Init(c Config) error
	Start() error
	Close() error
}

Service name and version

type Signature

type Signature []byte

func (Signature) MarshalText

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

func (Signature) String

func (h Signature) String() string

func (Signature) UnmarshalText

func (h Signature) UnmarshalText(b []byte) error

type Symbol

type Symbol string

func NewSymbol

func NewSymbol(c string) (*Symbol, error)

func (*Symbol) Equals

func (c *Symbol) Equals(b *Symbol) bool

func (*Symbol) String

func (c *Symbol) String() string

type Textable

type Textable interface {
	encoding.TextMarshaler
	encoding.TextUnmarshaler
}

Jump to

Keyboard shortcuts

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