mirror of
https://github.com/fluencelabs/aqua-lib
synced 2024-12-04 23:30:22 +00:00
feat: update blueprint API [NET-488] (#45)
This commit is contained in:
parent
b849728f05
commit
8db811843c
30
builtin.aqua
30
builtin.aqua
@ -7,13 +7,8 @@ alias PeerId : string
|
|||||||
alias Pairs : [][]string
|
alias Pairs : [][]string
|
||||||
alias Base58String : string
|
alias Base58String : string
|
||||||
alias Hash : string
|
alias Hash : string
|
||||||
|
alias IPLDBlueprint : string
|
||||||
-- There are two types of dependencies: named and by-hash.
|
alias CID : string
|
||||||
-- name:foobar – specifies dependency by module name, points to a module with import name 'foobar'
|
|
||||||
-- hash:04dc884... – specifies dependency by module hash
|
|
||||||
-- By-hash dependencies are preffered since they are determenistic
|
|
||||||
-- while by-name dependency can yield different modules at different points in time
|
|
||||||
alias Dependency : string
|
|
||||||
|
|
||||||
data Service:
|
data Service:
|
||||||
id: string
|
id: string
|
||||||
@ -61,14 +56,10 @@ data Module:
|
|||||||
hash: string
|
hash: string
|
||||||
config: ModuleConfig
|
config: ModuleConfig
|
||||||
|
|
||||||
data AddBlueprint:
|
|
||||||
name: string
|
|
||||||
dependencies: []Dependency
|
|
||||||
|
|
||||||
data Blueprint:
|
data Blueprint:
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
dependencies: []Dependency
|
dependencies: []CID
|
||||||
|
|
||||||
data ScriptInfo:
|
data ScriptInfo:
|
||||||
id: string
|
id: string
|
||||||
@ -304,10 +295,15 @@ service Dist("dist"):
|
|||||||
-- Get the interface of a module
|
-- Get the interface of a module
|
||||||
get_module_interface(module_hash: string) -> Interface
|
get_module_interface(module_hash: string) -> Interface
|
||||||
|
|
||||||
-- Creates Blueprint structure from from blueprint name and dependencies (modules)
|
-- Creates IPLD Blueprint structure from blueprint name and dependencies (modules)
|
||||||
make_blueprint(name: string, dependencies: []Dependency) -> AddBlueprint
|
make_blueprint(name: string, dependencies: []CID) -> IPLDBlueprint
|
||||||
-- Add a blueprint to the node
|
-- Add an IPLD blueprint to the node
|
||||||
add_blueprint(blueprint: AddBlueprint) -> string
|
add_blueprint(blueprint: IPLDBlueprint) -> string
|
||||||
|
|
||||||
|
-- Loads blueprint by copying it from Particle Vault directory
|
||||||
|
-- Arguments:
|
||||||
|
-- blueprint_path – path in Particle Vault
|
||||||
|
load_blueprint(blueprint_path: string) -> IPLDBlueprint
|
||||||
|
|
||||||
-- Used to get the blueprints available on the node specified in the service call.
|
-- Used to get the blueprints available on the node specified in the service call.
|
||||||
-- A blueprint is an object of the following structure
|
-- A blueprint is an object of the following structure
|
||||||
@ -335,7 +331,7 @@ service Script("script"):
|
|||||||
-- (NOTE: an actual interval may vary by up to 3 seconds)
|
-- (NOTE: an actual interval may vary by up to 3 seconds)
|
||||||
add_from_vault(path: string, interval: ?u64) -> string
|
add_from_vault(path: string, interval: ?u64) -> string
|
||||||
|
|
||||||
-- Removes recurring script from a node. Only a creator of the script can delete it
|
-- Removes recurring script from a node. Only the creator of the script can delete it
|
||||||
remove(script_id: string) -> bool
|
remove(script_id: string) -> bool
|
||||||
|
|
||||||
-- Returns a list of existing scripts on the node.
|
-- Returns a list of existing scripts on the node.
|
||||||
|
Loading…
Reference in New Issue
Block a user