Common Lisp Package: CL-FLUIDDB

README:

FUNCTION

Public

CHANGE-NAMESPACE (NAMESPACE NEW-DESCRIPTION)

Change the description of the given namespace

CHANGE-TAG (TAG DESCRIPTION)

Change the description of the given tag

CREATE-NAMESPACE (PARENT-NAMESPACE NAMESPACE-NAME DESCRIPTION)

Create a new sub-namespace within the passed namespace

CREATE-OBJECT (&OPTIONAL ABOUT)

Create a new object (anonymous if no about is specified)

CREATE-TAG (NAMESPACE TAG-NAME DESCRIPTION INDEXED)

Create a new tag withing the given namespace

DELETE-NAMESPACE (NAMESPACE)

Delete the given namespace

DELETE-OBJECT-ABOUT-TAG-VALUE (ABOUT TAG)

Delete the specified tag value on the object with the given about tag

DELETE-OBJECT-TAG-VALUE (ID TAG)

Delete the specified tag value on the object with the given id

DELETE-OBJECTS-TAG-VALUES (QUERY TAGS-LIST)

Perform a query and delete the specified tag values on the matching objects

DELETE-TAG (TAG)

Delete the given tag

GET-NAMESPACE (NAMESPACE &KEY (RETURN-DESCRIPTION T) (RETURN-NAMESPACE T) (RETURN-TAGS T))

Retrieve information about the given namespace

GET-NAMESPACE-PERMISSIONS (NAMESPACE ACTION)

Retrieve the permission information for the given namespace and action. Action can be one of create, update, delete, list, control.

GET-OBJECT (ID &KEY (SHOW-ABOUT T))

Retrieve an object by its id

GET-OBJECT-ABOUT (ABOUT)

Retrieve an object by its about tag

GET-OBJECT-ABOUT-TAG-VALUE (ABOUT TAG &KEY WANT-JSON ACCEPT)

Retrieve the object's tag value for the object with the given about tag

GET-OBJECT-TAG-VALUE (ID TAG &KEY WANT-JSON ACCEPT)

Retrieve the object's tag value for the object with the given id

GET-POLICY (USER-NAME CATEGORY ACTION)

Retrieve the user's default policy for the given category and action. Possible values for categorie/actions are: - namespaces: create, update, delete, and list. - tags: update and delete. - tag-values: create, read, and delete.

GET-TAG (TAG &KEY (RETURN-DESCRIPTION T))

Retrieve information about the given tag

GET-TAG-PERMISSIONS (TAG ACTION)

Retrieve the permission information for the given tag and action. Action can be one of update, delete, control.

GET-TAG-VALUE-PERMISSIONS (TAG ACTION)

Retrieve the permission information for the given tag value and action. Action can be one of create, read, delete, control.

GET-USER (NAME)

Retrieve information about the user with the given name

OBJECT-ABOUT-TAG-HAS-VALUE-P (ABOUT TAG)

Check if the object with the given about tag has the specified tag value set. Returns nil or the mime type of the value.

OBJECT-TAG-HAS-VALUE-P (ID TAG)

Check if the object with the given id has the specified tag value set. Returns nil or the mime type of the value.

QUERY-OBJECTS (QUERY)

Perform a query for all object matching

QUERY-OBJECTS-TAG-VALUES (QUERY TAGS-LIST)

Perform a query and retrieve all objects matching plus the specified tag values on them

SET-NAMESPACE-PERMISSIONS (NAMESPACE ACTION POLICY EXCEPTIONS)

Set the permission information for the given namespace and action. Action can be one of create, update, delete, list, control. Policy can be either open or closed.

SET-OBJECT-ABOUT-TAG-VALUE (ABOUT TAG CONTENT &OPTIONAL CONTENT-TYPE)

Set the specified tag value on the object with the given about tag. Content is either presumed to be pre-formatted (if content-type is given) or will be JSON encoded and passed a fluiddb primitive type.

SET-OBJECT-TAG-VALUE (ID TAG CONTENT &OPTIONAL CONTENT-TYPE)

Set the specified tag value on the object with the given id. Content is either presumed to be pre-formatted (if content-type is given) or will be JSON encoded and passed as a fluiddb primitive type.

SET-OBJECTS-TAG-VALUES (QUERY TAGS-VALUES-LIST)

Perform a query and set the specified tag values on the matching objects

SET-POLICY (USER-NAME CATEGORY ACTION POLICY EXCEPTIONS)

Set the user's default policy for the given category and action. Possible values for categorie/actions are: - namespaces: create, update, delete, and list. - tags: update and delete. - tag-values: create, read, and delete. Policy can be either open or closed.

SET-TAG-PERMISSIONS (TAG ACTION POLICY EXCEPTIONS)

Set the permission information for the given tag and action. Action can be one of update, delete, control. Policy can be either open or closed.

SET-TAG-VALUE-PERMISSIONS (TAG ACTION POLICY EXCEPTIONS)

Set the permission information for the given tag value and action. Action can be one of create, read, delete, control. Policy can be either open or closed.

Private

DO-SEND-REQUEST (PATH &KEY BODY-DATA QUERY-DATA (ACCEPT application/json) (METHOD GET) (CONTENT-TYPE application/json))

Lower-level routine to send a request to FluidDB. Set accept to the content-type you want ("*/*" if you don't know). This does not interpret the results and just returns the HTTP response. It may still throw errors on network problems, timeouts etc.

JSON-ALIST-VALUES (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MAKE-PERMISSION-OBJECT (POLICY EXCEPTIONS)

Return a JSON encoded string representing the passed permission. Policy should be either open or closed.

SEND-REQUEST (PATH &KEY BODY-DATA QUERY-DATA (ACCEPT application/json) (METHOD GET) (CONTENT-TYPE application/json))

Send a request to FluidDB. Set accept to the content-type you want ("*/*" if you don't know). We inspect the return data and convert it to a lisp data structure if it is json

TO-BOOLEAN (VALUE)

Convert a lisp value to something the JSON encode will convert to true or false

TO-STRING (SOMETHING)

Do sensible conversion to a string

URL-ENCODE (STRING)

URL encode a string so it's safe to include in an URL

Undocumented

COPY-JSON-ALIST (INSTANCE)

JSON-ALIST-P (OBJECT)

SETFJSON-ALIST-VALUES (NEW-VALUE INSTANCE)

MAKE-JSON-ALIST (&KEY ((VALUES DUM347) NIL))

THROW-CALL-ERROR (STATUS-CODE STATUS-TEXT HEADERS RESPONSE-BODY)

MACRO

Public

WITH-CREDENTIALS ((USERNAME PASSWORD) &BODY BODY)

Perform body with the passed fluiddb credentials in place

GENERIC-FUNCTION

Public

URL-FORMAT-NAMESPACE-OR-TAG (TAG)

Helper function to convert some object into a (url-escaped) string ready to be used as part of the path in the request URL

Undocumented

ERROR-BODY (CONDITION)

SETFERROR-BODY (NEW-VALUE CONDITION)

ERROR-CLASS (CONDITION)

SETFERROR-CLASS (NEW-VALUE CONDITION)

REQUEST-ID (CONDITION)

SETFREQUEST-ID (NEW-VALUE CONDITION)

STATUS-CODE (CONDITION)

SETFSTATUS-CODE (NEW-VALUE CONDITION)

STATUS-MESSAGE (CONDITION)

SETFSTATUS-MESSAGE (NEW-VALUE CONDITION)

VARIABLE

Public

*CALL-TIMEOUT*

Timeout (in seconds) to use for any call to the FluidDB server. If a timeout happens, a bordeaux-threads:timeout condition will be raised. A value of nil means not to use any timeout.

*CREDENTIALS*

User credentidals to be used for a request. Should be either nil (anonymous access) or a list of two strings (username password)

*PROXY-CREDENTIALS*

Credentials to be used to authenticate against the proxy configured via *proxy-server*

*PROXY-SERVER*

Information about the proxy server to use for requests. Should be either nil (direct access), a string (the server to use), or a list of two values (server port)

*USE-HTTPS*

Flag whether to use HTTPS or just HTTP

*USER-AGENT*

The string to be used as your user agent when making request. This might allow FluidInfo to better monitor what app is using their service

Private

*CONNECTION*

A store for any existing connection to the server that can be re-used

*SERVER-URL*

Base URL (without the http:// or https:// protocol bit) for the server to call

Undocumented

*USING-SANDBOX*

CLASS

Private

Undocumented

JSON-ALIST

CONDITION

Private

Undocumented

CALL-ERROR