structure

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AttachedTestFunctions     = make(map[string]int)
	CalledTestFunctionsPubsub = make([]*pubsub.Message, 0)
	CalledTestFunctionsP2P    = make([]command.Body, 0)
	CalledTestFunctionsHttp   = make([]httpEvent, 0)
)
View Source
var FakeCurrentMethod = func(r tns.Object, branch string) ([]tns.Path, error) {
	return nil, nil
}
View Source
var FakeFetchMethod = func(tns.Path) (tns.Object, error) {
	return nil, nil
}

Functions

func CheckAttached

func CheckAttached(t *testing.T, expected map[string]int) bool

func MockNodeService

func MockNodeService(node peer.Node, ctx context.Context) substrate.Service

func RefreshTestVariables

func RefreshTestVariables()

Types

type NodeService

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

func (*NodeService) Close

func (s *NodeService) Close() error

func (*NodeService) Context

func (s *NodeService) Context() context.Context

func (*NodeService) Counter

func (s *NodeService) Counter() substrate.CounterService

func (*NodeService) Dev

func (s *NodeService) Dev() bool

func (*NodeService) Http

func (s *NodeService) Http() http.Service

func (*NodeService) Node

func (s *NodeService) Node() peer.Node

func (*NodeService) Orbitals

func (s *NodeService) Orbitals() []vm.Plugin

func (*NodeService) SmartOps

func (s *NodeService) SmartOps() substrate.SmartOpsService

func (*NodeService) Tns

func (s *NodeService) Tns() tns.Client

func (*NodeService) Verbose

func (s *NodeService) Verbose() bool

func (*NodeService) Vm

func (s *NodeService) Vm() vm.Service

type ResponseObject

type ResponseObject struct {
	Object    interface{}
	InnerPath tns.Path
	Tns       tns.Client
}

func (ResponseObject) Bind

func (f ResponseObject) Bind(binder interface{}) error

func (ResponseObject) Current

func (f ResponseObject) Current(branch string) ([]tns.Path, error)

func (ResponseObject) Interface

func (r ResponseObject) Interface() interface{}

func (ResponseObject) Path

func (f ResponseObject) Path() tns.Path

type TestClient

type TestClient struct {
	tns.Client
}

func (*TestClient) Database

func (*TestClient) Domain

func (*TestClient) Fetch

func (tc *TestClient) Fetch(path tns.Path) (tns.Object, error)

func (*TestClient) Function

func (*TestClient) Library

func (*TestClient) Messaging

func (*TestClient) Service

func (*TestClient) Simple

func (tc *TestClient) Simple() tns.SimpleIface

func (*TestClient) SmartOp

func (*TestClient) Storage

func (*TestClient) Website

type TestSdk

type TestSdk struct {
}

func (*TestSdk) AttachEvent

func (ts *TestSdk) AttachEvent(*event.Event)

func (*TestSdk) CreateHttpEvent

func (ts *TestSdk) CreateHttpEvent(w http.ResponseWriter, r *http.Request) *event.Event

func (*TestSdk) CreateP2PEvent

func (ts *TestSdk) CreateP2PEvent(cmd *command.Command, response response.Response) *event.Event

func (*TestSdk) CreatePubsubEvent

func (ts *TestSdk) CreatePubsubEvent(msg *pubsub.Message) *event.Event

type TestSmartOps

type TestSmartOps struct {
	substrate.Service
}

func (*TestSmartOps) Run

func (ts *TestSmartOps) Run(caller smartops.EventCaller, smartOpIds []string) (uint32, error)

type TestVm

type TestVm struct {
	vm.Service
}

func (*TestVm) New

func (*TestVm) New(context vm.Context, config vm.Config) (vm.Instance, error)

Jump to

Keyboard shortcuts

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