status

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: MPL-2.0 Imports: 10 Imported by: 5

Documentation

Overview

Package status is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountManager

type AccountManager interface {
	AddressToDecryptedAccount(string, string) (accounts.Account, *keystore.Key, error)
	SelectAccount(address, password string) error
	CreateAccount(password string) (address, pubKey, mnemonic string, err error)
}

AccountManager interface to manage account actions

type LoginRequest

type LoginRequest struct {
	Addr     string `json:"address"`
	Password string `json:"password"`
}

LoginRequest : json request for status_login.

type LoginResponse

type LoginResponse struct {
	AddressKeyID string `json:"address_key_id"`
}

LoginResponse : json response returned by status_login.

type MockAccountManager

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

MockAccountManager is a mock of AccountManager interface

func NewMockAccountManager

func NewMockAccountManager(ctrl *gomock.Controller) *MockAccountManager

NewMockAccountManager creates a new mock instance

func (*MockAccountManager) AddressToDecryptedAccount

func (m *MockAccountManager) AddressToDecryptedAccount(arg0, arg1 string) (accounts.Account, *keystore.Key, error)

AddressToDecryptedAccount mocks base method

func (*MockAccountManager) CreateAccount

func (m *MockAccountManager) CreateAccount(password string) (string, string, string, error)

CreateAccount mocks base method

func (*MockAccountManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockAccountManager) SelectAccount

func (m *MockAccountManager) SelectAccount(address, password string) error

SelectAccount mocks base method

type MockAccountManagerMockRecorder

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

MockAccountManagerMockRecorder is the mock recorder for MockAccountManager

func (*MockAccountManagerMockRecorder) AddressToDecryptedAccount

func (mr *MockAccountManagerMockRecorder) AddressToDecryptedAccount(arg0, arg1 interface{}) *gomock.Call

AddressToDecryptedAccount indicates an expected call of AddressToDecryptedAccount

func (*MockAccountManagerMockRecorder) CreateAccount

func (mr *MockAccountManagerMockRecorder) CreateAccount(password interface{}) *gomock.Call

CreateAccount indicates an expected call of CreateAccount

func (*MockAccountManagerMockRecorder) SelectAccount

func (mr *MockAccountManagerMockRecorder) SelectAccount(address, password interface{}) *gomock.Call

SelectAccount indicates an expected call of SelectAccount

type MockWhisperService

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

MockWhisperService is a mock of WhisperService interface

func NewMockWhisperService

func NewMockWhisperService(ctrl *gomock.Controller) *MockWhisperService

NewMockWhisperService creates a new mock instance

func (*MockWhisperService) AddKeyPair

func (m *MockWhisperService) AddKeyPair(key *ecdsa.PrivateKey) (string, error)

AddKeyPair mocks base method

func (*MockWhisperService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

type MockWhisperServiceMockRecorder

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

MockWhisperServiceMockRecorder is the mock recorder for MockWhisperService

func (*MockWhisperServiceMockRecorder) AddKeyPair

func (mr *MockWhisperServiceMockRecorder) AddKeyPair(key interface{}) *gomock.Call

AddKeyPair indicates an expected call of AddKeyPair

type PublicAPI

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

PublicAPI represents a set of APIs from the `web3.status` namespace.

func NewAPI

func NewAPI(s *Service) *PublicAPI

NewAPI creates an instance of the status API.

func (*PublicAPI) Login

func (api *PublicAPI) Login(context context.Context, req LoginRequest) (res LoginResponse, err error)

Login is an implementation of `status_login` or `web3.status.login` API

func (*PublicAPI) Signup

func (api *PublicAPI) Signup(context context.Context, req SignupRequest) (res SignupResponse, err error)

Signup is an implementation of `status_signup` or `web3.status.signup` API

type Service

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

Service represents our own implementation of status status operations.

func New

func New(w WhisperService) *Service

New returns a new Service.

func (*Service) APIs

func (s *Service) APIs() []rpc.API

APIs returns a list of new APIs.

func (*Service) Protocols

func (s *Service) Protocols() []p2p.Protocol

Protocols returns a new protocols list. In this case, there are none.

func (*Service) SetAccountManager

func (s *Service) SetAccountManager(a AccountManager)

SetAccountManager sets account manager for the API calls.

func (*Service) Start

func (s *Service) Start(server *p2p.Server) error

Start is run when a service is started. It does nothing in this case but is required by `node.Service` interface.

func (*Service) Stop

func (s *Service) Stop() error

Stop is run when a service is stopped. It does nothing in this case but is required by `node.Service` interface.

type SignupRequest

type SignupRequest struct {
	Password string `json:"password"`
}

SignupRequest : json request for status_signup.

type SignupResponse

type SignupResponse struct {
	Address  string `json:"address"`
	Pubkey   string `json:"pubkey"`
	Mnemonic string `json:"mnemonic"`
}

SignupResponse : json response returned by status_signup.

type WhisperService

type WhisperService interface {
	AddKeyPair(key *ecdsa.PrivateKey) (string, error)
}

WhisperService whisper interface to add key pairs

Jump to

Keyboard shortcuts

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