Documentation ¶
Index ¶
- Constants
- func ConnectIpfsPeers(ctx context.Context, ipfs icore.CoreAPI, peers []string) error
- func CreateIpfsNode(ctx context.Context, repoPath string, swarmKey string, swarmAddresses []string) (icore.CoreAPI, error)
- func GetOS() (string, string, error)
- func LoadConfigFromFile(configPath string, config interface{}) error
- func NewBlockchainSdk(client BlockchainClientConfig, gateway BlockchainGatewayConfig, ...) (*blockchain.Sdk, error)
- func NewDevice(sdk *blockchain.Sdk, name, description string) *bcommon.Device
- func NewRequest(requestId string, service bcommon.Service, method string, arguments []string) *bcommon.ServiceRequest
- func NewResponse(requestId string, statusCode int32, returnValue string) *bcommon.ServiceResponse
- func NewService(sdk *blockchain.Sdk, name, description string, version int32) *bcommon.Service
- func RegisterOnBlockchain(sdk *blockchain.Sdk, device *bcommon.Device, service *bcommon.Service) error
- type BlockchainClientConfig
- type BlockchainDeviceConfig
- type BlockchainGatewayConfig
- type BlockchainNetworkConfig
- type BlockchainRequestManager
- func (mgr *BlockchainRequestManager) Listen(ctx context.Context) error
- func (mgr *BlockchainRequestManager) Request(requestId string, service bcommon.Service, method string, arguments []string) (*bcommon.ServiceRequest, error)
- func (mgr *BlockchainRequestManager) Respond(requestId string, statusCode int32, returnValue string) (*bcommon.ServiceResponse, error)
- type BlockchainServiceConfig
- type BlockchainServiceRef
- type IpfsConfig
- type PicovoiceConfig
Constants ¶
View Source
const ( STATUS_UNKNOWN_ERROR = -1 STATUS_OK = 0 STATUS_INVALID_REQUEST = 1 STATUS_INVALID_AUDIO = 2 STATUS_INFERENCE_FAILED = 3 STATUS_INVALID_VOICE_COMMAND = 4 )
Variables ¶
This section is empty.
Functions ¶
func ConnectIpfsPeers ¶
func CreateIpfsNode ¶
func LoadConfigFromFile ¶
func NewBlockchainSdk ¶
func NewBlockchainSdk(client BlockchainClientConfig, gateway BlockchainGatewayConfig, network BlockchainNetworkConfig) (*blockchain.Sdk, error)
func NewRequest ¶
func NewResponse ¶
func NewResponse(requestId string, statusCode int32, returnValue string) *bcommon.ServiceResponse
func NewService ¶
func RegisterOnBlockchain ¶
Types ¶
type BlockchainClientConfig ¶
type BlockchainDeviceConfig ¶
type BlockchainGatewayConfig ¶
type BlockchainNetworkConfig ¶
type BlockchainRequestManager ¶
type BlockchainRequestManager struct { Sdk *blockchain.Sdk ListenService *BlockchainServiceRef RequestHandler func(*bcommon.ServiceRequest) ResponseHandler func(*bcommon.ServiceResponse) OnGarbageCollection func(string) // contains filtered or unexported fields }
func (*BlockchainRequestManager) Listen ¶
func (mgr *BlockchainRequestManager) Listen(ctx context.Context) error
func (*BlockchainRequestManager) Request ¶
func (mgr *BlockchainRequestManager) Request(requestId string, service bcommon.Service, method string, arguments []string) (*bcommon.ServiceRequest, error)
func (*BlockchainRequestManager) Respond ¶
func (mgr *BlockchainRequestManager) Respond(requestId string, statusCode int32, returnValue string) (*bcommon.ServiceResponse, error)
type BlockchainServiceConfig ¶
type BlockchainServiceRef ¶
type IpfsConfig ¶
type PicovoiceConfig ¶
Click to show internal directories.
Click to hide internal directories.