Replace '/' in function names with '-'. (Bad design in the first place lol)
This commit is contained in:
parent
a612e6d6d7
commit
48cbdcbdb8
38
main.lisp
38
main.lisp
|
@ -175,7 +175,7 @@
|
||||||
;; BITSWAP CALLS
|
;; BITSWAP CALLS
|
||||||
|
|
||||||
;; STRING → ALIST || (NIL STRING)
|
;; STRING → ALIST || (NIL STRING)
|
||||||
(defun bitswap/ledger (peer-id)
|
(defun bitswap-ledger (peer-id)
|
||||||
"Show the current ledger for a peer.
|
"Show the current ledger for a peer.
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-ledger"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-ledger"
|
||||||
(bind-api-alist
|
(bind-api-alist
|
||||||
|
@ -183,13 +183,13 @@
|
||||||
result))
|
result))
|
||||||
|
|
||||||
;; NIL → NIL
|
;; NIL → NIL
|
||||||
(defun bitswap/reprovide ()
|
(defun bitswap-reprovide ()
|
||||||
"Trigger the reprovider.
|
"Trigger the reprovider.
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-reprovide"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-reprovide"
|
||||||
(ipfs-call "bitswap/reprovide" '()))
|
(ipfs-call "bitswap/reprovide" '()))
|
||||||
|
|
||||||
;; NIL → ALIST || (NIL STRING)
|
;; NIL → ALIST || (NIL STRING)
|
||||||
(defun bitswap/stat ()
|
(defun bitswap-stat ()
|
||||||
"Show diagnostic info on the bitswap agent.
|
"Show diagnostic info on the bitswap agent.
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-stat"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-stat"
|
||||||
(bind-api-alist
|
(bind-api-alist
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
result))
|
result))
|
||||||
|
|
||||||
;; STRING → ALIST || (NIL STRING)
|
;; STRING → ALIST || (NIL STRING)
|
||||||
(defun bitswap/wantlist (&optional peer-id)
|
(defun bitswap-wantlist (&optional peer-id)
|
||||||
"Show blocks currently on the wantlist.
|
"Show blocks currently on the wantlist.
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-wantlist"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-wantlist"
|
||||||
(bind-api-alist
|
(bind-api-alist
|
||||||
|
@ -210,7 +210,7 @@
|
||||||
;; BLOCK CALLS
|
;; BLOCK CALLS
|
||||||
|
|
||||||
;; STRING → STRING || (NIL STRING)
|
;; STRING → STRING || (NIL STRING)
|
||||||
(defun block/get (hash)
|
(defun block-get (hash)
|
||||||
"Get a raw IPFS block.
|
"Get a raw IPFS block.
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-block-get"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-block-get"
|
||||||
(bind-api-result
|
(bind-api-result
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
result))
|
result))
|
||||||
|
|
||||||
;; PATHNAME [:STRING :STRING :NUMBER :BOOLEAN] → ALIST || (NIL STRING)
|
;; PATHNAME [:STRING :STRING :NUMBER :BOOLEAN] → ALIST || (NIL STRING)
|
||||||
(defun block/put (pathname &key (format nil) (mhtype "sha2-256") (mhlen -1)
|
(defun block-put (pathname &key (format nil) (mhtype "sha2-256") (mhlen -1)
|
||||||
(pin nil))
|
(pin nil))
|
||||||
"Store input as an IPFS block.
|
"Store input as an IPFS block.
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-block-put"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-block-put"
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
result))
|
result))
|
||||||
|
|
||||||
;; STRING → NIL
|
;; STRING → NIL
|
||||||
(defun block/rm (hash &key (force nil))
|
(defun block-rm (hash &key (force nil))
|
||||||
"Delete an IPFS block(s).
|
"Delete an IPFS block(s).
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-block-rm"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-block-rm"
|
||||||
(bind-api-result
|
(bind-api-result
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
;; STRING → ALIST || (NIL STRING)
|
;; STRING → ALIST || (NIL STRING)
|
||||||
(defun block/stat (hash)
|
(defun block-stat (hash)
|
||||||
"Print info about a raw IPFS block
|
"Print info about a raw IPFS block
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-block-stat"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-block-stat"
|
||||||
(bind-api-alist
|
(bind-api-alist
|
||||||
|
@ -260,13 +260,13 @@
|
||||||
(gethash "Peers" result)))
|
(gethash "Peers" result)))
|
||||||
|
|
||||||
;; NIL → LIST || (NIL STRING)
|
;; NIL → LIST || (NIL STRING)
|
||||||
(defun bootstrap/list ()
|
(defun bootstrap-list ()
|
||||||
"Return a list of bootstrap peers
|
"Return a list of bootstrap peers
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-list"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-list"
|
||||||
(bootstrap))
|
(bootstrap))
|
||||||
|
|
||||||
;; STRING → LIST || (NIL STRING)
|
;; STRING → LIST || (NIL STRING)
|
||||||
(defun bootstrap/add (peer)
|
(defun bootstrap-add (peer)
|
||||||
"Add a peer to the bootstrap list
|
"Add a peer to the bootstrap list
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-add"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-add"
|
||||||
(bind-api-result
|
(bind-api-result
|
||||||
|
@ -274,7 +274,7 @@
|
||||||
(gethash "Peers" result)))
|
(gethash "Peers" result)))
|
||||||
|
|
||||||
;; NIL → LIST || (NIL STRING)
|
;; NIL → LIST || (NIL STRING)
|
||||||
(defun bootstrap/add/default ()
|
(defun bootstrap-add-default ()
|
||||||
"Add default peers to the bootstrap list
|
"Add default peers to the bootstrap list
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-add-default"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-add-default"
|
||||||
(bind-api-result
|
(bind-api-result
|
||||||
|
@ -282,7 +282,7 @@
|
||||||
(gethash "Peers" result)))
|
(gethash "Peers" result)))
|
||||||
|
|
||||||
;; STRING → LIST || (NIL STRING)
|
;; STRING → LIST || (NIL STRING)
|
||||||
(defun bootstrap/rm (peer)
|
(defun bootstrap-rm (peer)
|
||||||
"Remove a peer from the bootstrap list
|
"Remove a peer from the bootstrap list
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-rm"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-rm"
|
||||||
(bind-api-result
|
(bind-api-result
|
||||||
|
@ -290,7 +290,7 @@
|
||||||
(gethash "Peers" result)))
|
(gethash "Peers" result)))
|
||||||
|
|
||||||
;; NIL → LIST || (NIL STRING)
|
;; NIL → LIST || (NIL STRING)
|
||||||
(defun bootstrap/rm/all (peer)
|
(defun bootstrap-rm-all (peer)
|
||||||
"Remove a peer from the bootstrap list
|
"Remove a peer from the bootstrap list
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-rm"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-rm"
|
||||||
(bind-api-result
|
(bind-api-result
|
||||||
|
@ -303,7 +303,7 @@
|
||||||
;; CID CALLS
|
;; CID CALLS
|
||||||
|
|
||||||
;; STRING → STRING || (NIL STRING)
|
;; STRING → STRING || (NIL STRING)
|
||||||
(defun cid/base32 (cid)
|
(defun cid-base32 (cid)
|
||||||
"Convert a CID into Base32 CIDv1
|
"Convert a CID into Base32 CIDv1
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-cid-base32"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-cid-base32"
|
||||||
(bind-api-result
|
(bind-api-result
|
||||||
|
@ -313,7 +313,7 @@
|
||||||
(values nil (gethash "ErrorMsg" result)))))
|
(values nil (gethash "ErrorMsg" result)))))
|
||||||
|
|
||||||
;; NIL → ALIST || (NIL STRING)
|
;; NIL → ALIST || (NIL STRING)
|
||||||
(defun cid/bases ()
|
(defun cid-bases ()
|
||||||
"Return a associative list of available bases in plist format; each base's
|
"Return a associative list of available bases in plist format; each base's
|
||||||
name is a assigned a given code-number.
|
name is a assigned a given code-number.
|
||||||
((CODE-A . NAME-A) (CODE-B . NAME-B) … (CODE-N . NAME-N))
|
((CODE-A . NAME-A) (CODE-B . NAME-B) … (CODE-N . NAME-N))
|
||||||
|
@ -339,7 +339,7 @@
|
||||||
(gethash "Value" result)))
|
(gethash "Value" result)))
|
||||||
|
|
||||||
;; NIL → ALIST
|
;; NIL → ALIST
|
||||||
(defun config/show ()
|
(defun config-show ()
|
||||||
"Return the config file's contents, in alist-format… y'know, with several
|
"Return the config file's contents, in alist-format… y'know, with several
|
||||||
sub-alists.
|
sub-alists.
|
||||||
Doesn't quite line up with #api-v0-config-show
|
Doesn't quite line up with #api-v0-config-show
|
||||||
|
@ -349,14 +349,14 @@
|
||||||
result))
|
result))
|
||||||
|
|
||||||
;; STRING → STRING || (NIL STRING)
|
;; STRING → STRING || (NIL STRING)
|
||||||
(defun config/get (key)
|
(defun config-get (key)
|
||||||
"Get a config key's value.
|
"Get a config key's value.
|
||||||
Doesn't map with any existant API call; it's just a convenience wrapper
|
Doesn't map with any existant API call; it's just a convenience wrapper
|
||||||
around #'config."
|
around #'config."
|
||||||
(config key))
|
(config key))
|
||||||
|
|
||||||
;; STRING → STRING || (NIL STRING)
|
;; STRING → STRING || (NIL STRING)
|
||||||
(defun config/set (key value &key (bool nil) (json nil))
|
(defun config-set (key value &key (bool nil) (json nil))
|
||||||
"Set a config key's value.
|
"Set a config key's value.
|
||||||
Doesn't map with any existant API call; it's just a convenience wrapper
|
Doesn't map with any existant API call; it's just a convenience wrapper
|
||||||
around #'config."
|
around #'config."
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
(gethash "Version" result)))
|
(gethash "Version" result)))
|
||||||
|
|
||||||
;; NIL → ALIST
|
;; NIL → ALIST
|
||||||
(defun version/deps ()
|
(defun version-deps ()
|
||||||
"Return info about dependencies used for build; I.E., Go version, OS, etc.
|
"Return info about dependencies used for build; I.E., Go version, OS, etc.
|
||||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-version"
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-version"
|
||||||
(bind-api-alist
|
(bind-api-alist
|
||||||
|
|
48
package.lisp
48
package.lisp
|
@ -5,7 +5,7 @@
|
||||||
*api-host*
|
*api-host*
|
||||||
*api-root*
|
*api-root*
|
||||||
|
|
||||||
;; / calls
|
;; calls
|
||||||
:dl
|
:dl
|
||||||
:cat
|
:cat
|
||||||
:add
|
:add
|
||||||
|
@ -15,34 +15,34 @@
|
||||||
:resolve
|
:resolve
|
||||||
:shutdown
|
:shutdown
|
||||||
|
|
||||||
;; / bitswap calls
|
;; bitswap calls
|
||||||
:bitswap/ledger
|
:bitswap-ledger
|
||||||
:bitswap/reprovide
|
:bitswap-reprovide
|
||||||
:bitswap/stat
|
:bitswap-stat
|
||||||
:bitswap/wantlist
|
:bitswap-wantlist
|
||||||
|
|
||||||
;; / block calls
|
;; block calls
|
||||||
:block/get
|
:block-get
|
||||||
:block/put
|
:block-put
|
||||||
:block/rm
|
:block-rm
|
||||||
:block/stat
|
:block-stat
|
||||||
|
|
||||||
;; / bootstrap calls
|
;; bootstrap calls
|
||||||
:bootstrap
|
:bootstrap
|
||||||
:bootstrap/list
|
:bootstrap-list
|
||||||
:bootstrap/add
|
:bootstrap-add
|
||||||
:bootstrap/add/default
|
:bootstrap-add-default
|
||||||
:bootstrap/rm
|
:bootstrap-rm
|
||||||
:bootstrap/rm/all
|
:bootstrap-rm-all
|
||||||
|
|
||||||
;; / cid calls
|
;; cid calls
|
||||||
:cid/base32
|
:cid-base32
|
||||||
:cid/bases
|
:cid-bases
|
||||||
|
|
||||||
;; / config calls
|
;; config calls
|
||||||
:config
|
:config
|
||||||
:config/show
|
:config-show
|
||||||
|
|
||||||
;; /version calls
|
;; version calls
|
||||||
:version
|
:version
|
||||||
:version/deps))
|
:version-deps))
|
||||||
|
|
Ŝarĝante…
Reference in New Issue