Documentation ¶
Index ¶
- func CreateEntities(size int) ([]*ethereum.SignKeys, []*types.Entity)
- func CreateEthRandomKeysBatch(n int) []*ethereum.SignKeys
- func CreateMembers(entityID []byte, size int) ([]*ethereum.SignKeys, []*types.Member, error)
- func RandBool() bool
- func RandDate() time.Time
- func TestCallbackServer(t *testing.T, port string, params map[string]string) *httptest.Server
- type APIConnection
- type TestAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEntities ¶
CreateEntities a given number of random entities
func CreateEthRandomKeysBatch ¶
CreateEthRandomKeysBatch creates a set of eth random signing keys
func CreateMembers ¶
CreateMembers a given number of members with its entityID set to entityID
Types ¶
type APIConnection ¶
type APIConnection struct { WS *websocket.Conn HTTP *http.Client Address string // contains filtered or unexported fields }
APIConnection holds an API websocket connection
func NewAPIConnection ¶
func NewAPIConnection(addr string, tb testing.TB) (*APIConnection, error)
NewAPIConnection starts a connection with the given endpoint address. The connection is closed automatically when the test or benchmark finishes.
func NewHTTPapiConnection ¶ added in v0.6.0
func NewHTTPapiConnection(addr string, tb testing.TB) (*APIConnection, error)
NewHTTPapiConnection starts a connection with the given endpoint address. The connection is closed automatically when the test or benchmark finishes.
func (*APIConnection) Request ¶
func (r *APIConnection) Request(req types.MetaRequest, signer *ethereum.SignKeys) *types.MetaResponse
Request makes a request to the previously connected endpoint
Click to show internal directories.
Click to hide internal directories.