Documentation ¶
Index ¶
- Constants
- type AdminContractService
- type ContractService
- type DummyArgs
- type DummyReply
- type FuncTestContractService
- func (s *FuncTestContractService) CallConstructor(r *http.Request, args *DummyArgs, requestBody *rpc.RequestBody, ...) error
- func (s *FuncTestContractService) CallMethod(r *http.Request, args *DummyArgs, requestBody *rpc.RequestBody, ...) error
- func (s *FuncTestContractService) Upload(r *http.Request, args *DummyArgs, requestBody *rpc.RequestBody, ...) error
- type HealthChecker
- type InfoArgs
- type InfoReply
- type InfoService
- type NetworkChecker
- type NodeCertArgs
- type NodeCertReply
- type NodeCertService
- type NodeService
- type Runner
- type RunnerWrapper
- type SeedArgs
- type UploadReply
Constants ¶
const ( ParseError = -31700 ParseErrorShort = "ParseError" ParseErrorMessage = "Parsing error on the server side: received an invalid JSON." InvalidRequestError = -31600 InvalidRequestErrorShort = "InvalidRequest" InvalidRequestErrorMessage = "The JSON received is not a valid request payload." MethodNotFoundError = -31601 MethodNotFoundErrorShort = "MethodNotFound" MethodNotFoundErrorMessage = "Method does not exist / is not available." InvalidParamsError = -31602 InvalidParamsErrorShort = "InvalidParams" InvalidParamsErrorMessage = "Invalid method parameter(s)." InternalError = -31603 InternalErrorShort = "Internal" InternalErrorMessage = "Internal Platform error." TimeoutError = -31106 TimeoutErrorShort = "Timeout" TimeoutErrorMessage = "Request's timeout has expired." ExecutionError = -31103 ExecutionErrorShort = "Execution" ExecutionErrorMessage = "Execution error." )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminContractService ¶ added in v0.9.0
type AdminContractService struct {
// contains filtered or unexported fields
}
AdminContractService is a service that provides API for working with smart contracts.
func NewAdminContractService ¶ added in v0.9.0
func NewAdminContractService(runner *Runner) *AdminContractService
NewAdminContractService creates new AdminContract service instance.
func (*AdminContractService) Call ¶ added in v0.9.0
func (cs *AdminContractService) Call(req *http.Request, args *requester.Params, requestBody *rpc.RequestBody, result *requester.ContractResult) error
type ContractService ¶ added in v0.9.0
type ContractService struct {
// contains filtered or unexported fields
}
ContractService is a service that provides API for working with smart contracts.
func NewContractService ¶ added in v0.9.0
func NewContractService(runner *Runner) *ContractService
NewContractService creates new Contract service instance.
func (*ContractService) Call ¶ added in v0.9.0
func (cs *ContractService) Call(req *http.Request, args *requester.Params, requestBody *rpc.RequestBody, result *requester.ContractResult) error
type DummyReply ¶ added in v0.9.0
type DummyReply struct{}
type FuncTestContractService ¶ added in v0.9.0
type FuncTestContractService struct {
// contains filtered or unexported fields
}
FuncTestContractService is a service that provides ability to add custom contracts
func NewFuncTestContractService ¶ added in v0.9.0
func NewFuncTestContractService(runner *Runner) *FuncTestContractService
NewFuncTestContractService is dummy for NewFuncTestContractService in functest_contract.go that hidden under build tag
func (*FuncTestContractService) CallConstructor ¶ added in v0.9.0
func (s *FuncTestContractService) CallConstructor(r *http.Request, args *DummyArgs, requestBody *rpc.RequestBody, reply *DummyReply) error
func (*FuncTestContractService) CallMethod ¶ added in v0.9.0
func (s *FuncTestContractService) CallMethod(r *http.Request, args *DummyArgs, requestBody *rpc.RequestBody, reply *DummyReply) error
func (*FuncTestContractService) Upload ¶ added in v0.9.0
func (s *FuncTestContractService) Upload(r *http.Request, args *DummyArgs, requestBody *rpc.RequestBody, reply *DummyReply) error
type HealthChecker ¶ added in v0.8.7
type HealthChecker struct { CertificateManager insolar.CertificateManager NodeNetwork network.NodeNetwork PulseAccessor pulse.Accessor }
HealthChecker allows to check network status of a node.
func NewHealthChecker ¶ added in v0.8.7
func NewHealthChecker(cm insolar.CertificateManager, nn network.NodeNetwork, pa pulse.Accessor) *HealthChecker
NewHealthChecker creates new HealthChecker.
func (*HealthChecker) CheckHandler ¶ added in v0.8.7
func (hc *HealthChecker) CheckHandler(w http.ResponseWriter, r *http.Request)
CheckHandler is a HTTP handler for health check.
type InfoArgs ¶ added in v0.6.3
type InfoArgs struct{}
InfoArgs is arguments that Info service accepts.
type InfoReply ¶ added in v0.6.3
type InfoReply struct { RootDomain string `json:"rootDomain"` RootMember string `json:"rootMember"` MigrationAdminMember string `json:"migrationAdminMember"` FeeMember string `json:"feeMember"` MigrationDaemonMembers []string `json:"migrationDaemonMembers"` NodeDomain string `json:"nodeDomain"` TraceID string `json:"traceID"` }
InfoReply is reply for Info service requests.
type InfoService ¶ added in v0.6.3
type InfoService struct {
// contains filtered or unexported fields
}
InfoService is a service that provides API for getting info about genesis objects.
func NewInfoService ¶ added in v0.6.3
func NewInfoService(runner *Runner) *InfoService
NewInfoService creates new Info service instance.
type NetworkChecker ¶ added in v0.9.8
type NetworkChecker struct {
// contains filtered or unexported fields
}
NetworkChecker is AvailabilityChecker implementation that checks can we process any API requests based on keeper status
func NewNetworkChecker ¶ added in v0.9.8
func NewNetworkChecker(cfg configuration.AvailabilityChecker) *NetworkChecker
func (*NetworkChecker) IsAvailable ¶ added in v0.9.8
func (nc *NetworkChecker) IsAvailable(ctx context.Context) bool
func (*NetworkChecker) Start ¶ added in v0.9.8
func (nc *NetworkChecker) Start(ctx context.Context) error
func (*NetworkChecker) Stop ¶ added in v0.9.11
func (nc *NetworkChecker) Stop()
type NodeCertArgs ¶ added in v0.7.5
type NodeCertArgs struct {
Ref string
}
NodeCertArgs is arguments that NodeCert service accepts.
type NodeCertReply ¶ added in v0.7.5
type NodeCertReply struct {
Cert *certificate.Certificate `json:"cert"`
}
NodeCertReply is reply for NodeCert service requests.
type NodeCertService ¶ added in v0.7.5
type NodeCertService struct {
// contains filtered or unexported fields
}
NodeCertService is a service that provides cert for node.
func NewNodeCertService ¶ added in v0.7.5
func NewNodeCertService(runner *Runner) *NodeCertService
NewNodeCertService creates new NodeCert service instance.
func (*NodeCertService) Get ¶ added in v0.7.5
func (s *NodeCertService) Get(r *http.Request, args *NodeCertArgs, requestBody *rpc.RequestBody, reply *NodeCertReply) error
type NodeService ¶ added in v0.9.0
type NodeService struct {
// contains filtered or unexported fields
}
NodeService is a service that provides API for getting new seed and status.
func NewNodeService ¶ added in v0.9.0
func NewNodeService(runner *Runner) *NodeService
NewNodeService creates new Node service instance.
func (*NodeService) GetStatus ¶ added in v0.9.0
func (s *NodeService) GetStatus(r *http.Request, args *interface{}, requestBody *rpc.RequestBody, reply *requester.StatusResponse) error
Get returns status info
type Runner ¶
type Runner struct { CertificateManager insolar.CertificateManager ContractRequester insolar.ContractRequester // nolint NodeNetwork network.NodeNetwork CertificateGetter insolar.CertificateGetter PulseAccessor pulse.Accessor ArtifactManager artifacts.Client JetCoordinator jet.Coordinator NetworkStatus insolar.NetworkStatus AvailabilityChecker insolar.AvailabilityChecker SeedManager *seedmanager.SeedManager SeedGenerator seedmanager.SeedGenerator // contains filtered or unexported fields }
Runner implements Component for API
func NewRunner ¶
func NewRunner(cfg *configuration.APIRunner, certificateManager insolar.CertificateManager, contractRequester insolar.ContractRequester, nodeNetwork network.NodeNetwork, certificateGetter insolar.CertificateGetter, pulseAccessor pulse.Accessor, artifactManager artifacts.Client, jetCoordinator jet.Coordinator, networkStatus insolar.NetworkStatus, availabilityChecker insolar.AvailabilityChecker, ) (*Runner, error)
NewRunner is C-tor for API Runner
func (*Runner) IsAPIRunner ¶ added in v0.6.3
IsAPIRunner is implementation of APIRunner interface for component manager
type RunnerWrapper ¶ added in v0.9.0
func NewWrapper ¶ added in v0.9.0
func NewWrapper(publicAPI, adminAPI insolar.APIRunner) *RunnerWrapper
NewWrapper is C-tor for wrapper of API Runner
type SeedArgs ¶ added in v0.6.3
type SeedArgs struct{}
SeedArgs is arguments that Seed service accepts.
type UploadReply ¶ added in v0.9.0
type UploadReply struct {
PrototypeRef string `json:"PrototypeRef"`
}