mock

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDumpKeysFormat = `` /* 264-byte string literal not displayed */
View Source
const LeftTemplateDelim = "<<"
View Source
const RightTemplateDelim = ">>"

Variables

View Source
var DefaultDumpKeysTemplate = template.Must(template.New("MockKeyClient_DumpKeys").
	Delims(LeftTemplateDelim, RightTemplateDelim).
	Parse(DefaultDumpKeysFormat))

Functions

This section is empty.

Types

type MockKey added in v0.16.1

type MockKey struct {
	Name       string
	Address    acm.Address
	PublicKey  []byte
	PrivateKey []byte
}

Simple ed25519 key structure for mock purposes with ripemd160 address

func (*MockKey) PrivateKeyBase64 added in v0.18.0

func (mockKey *MockKey) PrivateKeyBase64() string

func (*MockKey) PrivateKeyHex added in v0.18.0

func (mockKey *MockKey) PrivateKeyHex() string

func (*MockKey) PublicKeyBase64 added in v0.18.0

func (mockKey *MockKey) PublicKeyBase64() string

func (*MockKey) PublicKeyHex added in v0.18.0

func (mockKey *MockKey) PublicKeyHex() string

func (*MockKey) Sign added in v0.16.1

func (mockKey *MockKey) Sign(message []byte) (acm.Signature, error)

type MockKeyClient

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

func NewMockKeyClient

func NewMockKeyClient(privateAccounts ...acm.PrivateAccount) *MockKeyClient

func (*MockKeyClient) DumpKeys added in v0.18.0

func (mkc *MockKeyClient) DumpKeys(templateString string) (string, error)

func (*MockKeyClient) Generate added in v0.18.0

func (mkc *MockKeyClient) Generate(keyName string, keyType KeyType) (acm.Address, error)

func (*MockKeyClient) HealthCheck added in v0.18.0

func (mkc *MockKeyClient) HealthCheck() error

func (*MockKeyClient) NewKey

func (mkc *MockKeyClient) NewKey(name string) acm.Address

func (*MockKeyClient) PublicKey

func (mkc *MockKeyClient) PublicKey(address acm.Address) (acm.PublicKey, error)

func (*MockKeyClient) Sign

func (mkc *MockKeyClient) Sign(signAddress acm.Address, message []byte) (acm.Signature, error)

Jump to

Keyboard shortcuts

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