aboutsummaryrefslogtreecommitdiff
path: root/irc/kcpd/stdlibsvc
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2018-10-04 18:04:48 -0700
committerChristine Dodrill <me@christine.website>2018-10-04 18:04:48 -0700
commitfbedf4acda9ff659a69fe577465db9617ec94ba1 (patch)
tree74c0e72a1380a431813c78eb688b5b93db72800a /irc/kcpd/stdlibsvc
parent51b60f36ac286c973dd258571b77db24e9ace031 (diff)
downloadx-fbedf4acda9ff659a69fe577465db9617ec94ba1.tar.xz
x-fbedf4acda9ff659a69fe577465db9617ec94ba1.zip
remove vendored dependencies for some things, vgo is coming
Diffstat (limited to 'irc/kcpd/stdlibsvc')
-rw-r--r--irc/kcpd/stdlibsvc/README.md81
-rw-r--r--irc/kcpd/stdlibsvc/env.json8
-rw-r--r--irc/kcpd/stdlibsvc/functions/main/function.json15
-rw-r--r--irc/kcpd/stdlibsvc/functions/main/index.js32
-rw-r--r--irc/kcpd/stdlibsvc/package.json19
5 files changed, 0 insertions, 155 deletions
diff --git a/irc/kcpd/stdlibsvc/README.md b/irc/kcpd/stdlibsvc/README.md
deleted file mode 100644
index b378de4..0000000
--- a/irc/kcpd/stdlibsvc/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Your stdlib service: xena/kcpdwhitelist
-
-This is the README for your service.
-
-A few notes;
-
-`package.json` is NPM-compatible and contains some stdlib configuration details.
-`.gitignore` has also been provided for your convenience.
-
-# package.json
-
-This is a standard `package.json`. You'll notice an additional `"stdlib"` field.
-You can configure your service for the stdlib registry using;
-
-`name` - The name to register on stdlib, in the format of `<username>/<service>`.
-In order to compile to the registry you must have permission to compile to the
-provided username's account.
-
-`defaultFunction` - Execute if provided no function route (root service).
-If not specified, your base service route will provide a list of available
-functions in JSON format.
-
-`timeout` - The time in ms at which to kill service execution. Free accounts are
-limited to 30 seconds (30000).
-
-`publish` - Whether to publish releases (versioned) to the stdlib public
- directory. Packages pushed to the registry in non-release environments will
- never be published.
-
-# env.json
-
-Environment configuration for your service. Each top level key (i.e.
- `"dev"` and `"release"`) specifies their own set of key-value
- pairs for a specific execution environment. The keys and values specified
- are automatically added to the `process.env` variable in Node.js.
-
-`"dev"` is the *non-configurable* name of the local environment, but can
-also be used as an environment name for compilation
-(i.e. `$ lib up development`).
-
-`"release"` is the *non-configurable* name of the production environment when
-you create releases with `$ lib release`.
-
-You can add additional environments and key-value pairs, and use them for
-compilation with `lib up <environment>`. Note that free accounts are
-restricted to one compilation environment (aside from `"release"`).
-
-*We recommend against checking this file in to version control*. It will be
-saved with your tarball and is privately retrievable from the stdlib registry
-using your account credentials. It has been added to `.gitignore` by default.
-
-# f/main/function.json
-
-This is your function definition file. The following fields can be used for
-execution configuration of specific functions within your service.
-
-`name` - The function name. This maps to an execution route over HTTP. For
-example, `xena/kcpdwhitelist/main` would map to the first
-function you've created.
-
-`description` - A brief description of the function. To provide detailed
-information about function execution, overwrite this README.
-
-`args` - An `Array` describing each argument as you expect them to be passed to
-`params.args`.
-
-`kwargs` - An `Object` describing each keyword argument as you expect them to be
-passed to `params.kwargs`
-
-`http` - Information to provide to function requests over HTTP.
-
-`http.headers` - HTTP headers to return in the response. Examples are
-`"Content-Type"` to specify file type if your function returns a `Buffer` or
-`"Access-Control-Allow-Origin"` to restrict browser-based function requests.
-
-# f/main/index.js
-
-The entry point to your function described in `f/main/function.json`.
-This is *non-configurable*. You may add as many subdirectories and supportive
-files as you like, but `index.js` will remain the entry point and *must*
-export a function to be active.
diff --git a/irc/kcpd/stdlibsvc/env.json b/irc/kcpd/stdlibsvc/env.json
deleted file mode 100644
index d8f72e9..0000000
--- a/irc/kcpd/stdlibsvc/env.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "dev": {
- "key": "value"
- },
- "release": {
- "key": "value"
- }
-}
diff --git a/irc/kcpd/stdlibsvc/functions/main/function.json b/irc/kcpd/stdlibsvc/functions/main/function.json
deleted file mode 100644
index 3fa3c9f..0000000
--- a/irc/kcpd/stdlibsvc/functions/main/function.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "main",
- "description": "Function",
- "args": [
- "First argument",
- "Second argument"
- ],
- "kwargs": {
- "alpha": "Keyword argument alpha",
- "beta": "Keyword argument beta"
- },
- "http": {
- "headers": {}
- }
-} \ No newline at end of file
diff --git a/irc/kcpd/stdlibsvc/functions/main/index.js b/irc/kcpd/stdlibsvc/functions/main/index.js
deleted file mode 100644
index a843dd1..0000000
--- a/irc/kcpd/stdlibsvc/functions/main/index.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Import dependencies, declare constants */
-
-win = (callback) => {
- callback(null, "allowed");
-};
-
-fail = (callback) => {
- callback("not allowed");
-};
-
-/**
-* Your function call
-* @param {Object} params Execution parameters
-* Members
-* - {Array} args Arguments passed to function
-* - {Object} kwargs Keyword arguments (key-value pairs) passed to function
-* - {String} remoteAddress The IPv4 or IPv6 address of the caller
-*
-* @param {Function} callback Execute this to end the function call
-* Arguments
-* - {Error} error The error to show if function fails
-* - {Any} returnValue JSON serializable (or Buffer) return value
-*/
-module.exports = (params, callback) => {
- switch (params.kwargs.user) {
- case "Xena":
- win(callback);
-
- default:
- fail(callback);
- }
-};
diff --git a/irc/kcpd/stdlibsvc/package.json b/irc/kcpd/stdlibsvc/package.json
deleted file mode 100644
index 7986c05..0000000
--- a/irc/kcpd/stdlibsvc/package.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "kcpdwhitelist",
- "version": "0.0.2",
- "description": "Service",
- "author": "xena <me@christine.website>",
- "main": "functions/main/index.js",
- "dependencies": {},
- "private": true,
- "stdlib": {
- "name": "xena/kcpdwhitelist",
- "defaultFunction": "main",
- "timeout": 10000,
- "publish": true,
- "personalize": {
- "keys": [],
- "user": []
- }
- }
-}