Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
953cf2f
Move directory and update Destination Functions
misteryeo May 16, 2020
8778aea
Updates Source Functions
misteryeo May 16, 2020
8e29376
Adds Functions Overview page
misteryeo May 16, 2020
75d7ec2
Updates side nav for Functions
misteryeo May 16, 2020
dea63b7
Update src/connections/functions/source-functions/index.md
May 19, 2020
1fafe92
Update src/connections/functions/source-functions/index.md
May 19, 2020
4c4db13
Update src/connections/functions/index.md
May 19, 2020
3eb40aa
Update src/connections/functions/index.md
May 19, 2020
890cc2b
Update src/connections/functions/source-functions/index.md
May 19, 2020
8c439b4
Update src/connections/functions/source-functions/index.md
May 19, 2020
99db641
Update src/connections/functions/source-functions/index.md
May 19, 2020
5d700cb
Update src/connections/functions/source-functions/index.md
May 19, 2020
ed8bb21
Update src/connections/functions/destination-functions/index.md
May 19, 2020
e8719dc
Update src/connections/functions/destination-functions/index.md
May 19, 2020
189ca20
Update src/connections/functions/destination-functions/index.md
May 19, 2020
379666e
Update src/connections/functions/index.md
May 19, 2020
b1c6795
Update src/connections/functions/source-functions/index.md
May 19, 2020
137b85b
Update src/connections/functions/source-functions/index.md
May 19, 2020
29d79a2
Update src/connections/functions/source-functions/index.md
May 19, 2020
214a29e
Merge branch 'master' into functions-rewrite
May 19, 2020
056f1c2
Updates from first round of feedback
misteryeo May 19, 2020
4548e7e
Merge branch 'master' into functions-rewrite
May 19, 2020
d2f2826
Update overview
misteryeo May 19, 2020
054b3fc
Merge branch 'functions-rewrite' of ssh://github.com/segmentio/segmen…
misteryeo May 19, 2020
11c0e7b
Update src/connections/functions/source-functions/index.md
May 19, 2020
55a1b54
Update src/connections/functions/index.md
May 19, 2020
6e2c1e4
Update src/connections/functions/index.md
May 19, 2020
79ec75a
Update src/connections/functions/index.md
May 19, 2020
ee20920
Update src/connections/functions/source-functions/index.md
May 19, 2020
611d24c
Update src/connections/functions/source-functions/index.md
May 19, 2020
41a6e8c
Further feedback
misteryeo May 19, 2020
a672b53
Merge branch 'master' into functions-rewrite
May 19, 2020
8c024d7
Merge branch 'master' into functions-rewrite
May 19, 2020
613f044
Adds new images
misteryeo May 19, 2020
5cf6af0
Update images
misteryeo May 19, 2020
f77c93a
Merge branch 'master' into functions-rewrite
sanscontext May 19, 2020
9f9dd4c
Final changes
misteryeo May 20, 2020
2924cc1
Merge branch 'functions-rewrite' of ssh://github.com/segmentio/segmen…
misteryeo May 20, 2020
94c7fdd
Extend new source function docs (#886)
May 20, 2020
db114af
Extend new destination function docs (#887)
May 20, 2020
89ed59b
Merge branch 'master' into functions-rewrite
sanscontext May 28, 2020
093a8bf
Destination Functions: Document caching strategy
tysonmote May 29, 2020
d0929ca
Lr functions edits (#911)
sanscontext May 29, 2020
a99602a
restore caching section which got dropped during merge >_<
May 29, 2020
9b0eb73
more merge cleanup
May 29, 2020
ab1c30a
update file
May 29, 2020
9a0ce42
Merge branch 'master' into functions-rewrite
May 29, 2020
816398b
Copy edits on usage page
May 29, 2020
f5a8aba
add link to pricing
May 29, 2020
8b77c64
remove duplicates
May 29, 2020
85ba6f9
fix fragment
May 29, 2020
ca559cf
fix format, reorder
May 29, 2020
3118a97
update save and deploy
May 29, 2020
765aca5
Update src/connections/functions/usage.md
sanscontext May 30, 2020
9b51c98
Update src/connections/functions/usage.md
sanscontext May 30, 2020
b88d4a3
Update src/connections/functions/usage.md
sanscontext May 30, 2020
5049150
Merge branch 'master' into functions-rewrite
sanscontext Jun 1, 2020
75dfef5
Update src/connections/functions/usage.md
sanscontext Jun 1, 2020
678de77
Update src/connections/functions/destination-functions.md
sanscontext Jun 1, 2020
bd1c12f
Update src/connections/functions/environment.md
sanscontext Jun 1, 2020
6dd713a
Update src/connections/functions/source-functions.md
sanscontext Jun 1, 2020
57ca3b9
Update src/connections/functions/source-functions.md
sanscontext Jun 1, 2020
23ce3e5
Update src/connections/functions/source-functions.md
sanscontext Jun 1, 2020
5dbc827
Update src/connections/functions/source-functions.md
sanscontext Jun 1, 2020
99d8024
Update src/connections/functions/usage.md
sanscontext Jun 1, 2020
fd0b1b3
Update src/connections/functions/usage.md
sanscontext Jun 1, 2020
b2c31f6
Update src/connections/functions/usage.md
sanscontext Jun 1, 2020
61503eb
Update src/connections/functions/source-functions.md
sanscontext Jun 1, 2020
cdb7182
Update src/connections/functions/source-functions.md
sanscontext Jun 1, 2020
2eb6245
Update src/connections/functions/usage.md
sanscontext Jun 1, 2020
f519a9c
Update src/connections/functions/usage.md
sanscontext Jun 1, 2020
a63764b
Update src/connections/functions/usage.md
sanscontext Jun 1, 2020
6424980
functions: Fix caching example
tysonmote Jun 26, 2020
6528291
Merge branch 'master' into functions-rewrite
Jul 13, 2020
bacdb98
Final polish for GA
misteryeo Jul 13, 2020
29916e0
Update src/connections/functions/usage.md
Jul 13, 2020
498853c
batch edit note!
Jul 14, 2020
f436b11
Apply suggestions from code review
sanscontext Jul 14, 2020
fc5be56
Update src/connections/functions/destination-functions.md
Jul 14, 2020
4c569f4
Update src/connections/functions/destination-functions.md
Jul 14, 2020
8f197a0
Apply suggestions from code review
Jul 14, 2020
4ef437b
Merge branch 'master' into functions-rewrite
sanscontext Jul 14, 2020
0eda5b8
Merge branch 'master' into functions-rewrite
sanscontext Jul 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/_data/sidenav/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ sections:
title: All about Cloud Sources
- path: /connections/sources/custom-domains
title: Set up a custom domain proxy in Segment
- path: /connections/sources/source-functions
title: Source Functions
- path: /connections/sources/visual-tagger
title: Visual Tagger
- section_title: Destinations
Expand All @@ -158,8 +156,19 @@ sections:
menu_icon: read-more
- path: /connections/destinations/destination-filters
title: Destination Filters
- path: /connections/destinations/destination-functions
- section_title: Functions
slug: connections/functions
section:
- path: /connections/functions
title: Functions Overview
- path: /connections/functions/source-functions
title: Source Functions
- path: /connections/functions/destination-functions
title: Destination Functions
- path: /connections/functions/environment
title: Functions environment
- path: /connections/functions/usage
title: Functions usage limits
- section_title: Data Storage
slug: connections/storage
section:
Expand Down
8 changes: 8 additions & 0 deletions src/_includes/content/functions/perms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Functions have specific roles which can be used for [access management](/docs/segment-app/iam/) in your Segment workspace.

Access to functions is controlled by two permissions [roles](/docs/segment-app/iam/roles/):

- **Functions Admin:** Create, edit and delete all functions, or a subset of specified functions.
- **Functions Read-only:** View all functions, or a subset of specified functions.

You also need additional **Source Admin** permissions to enable source functions, connect destination functions to a source, or to deploy changes to existing functions.
16 changes: 16 additions & 0 deletions src/_includes/content/functions/runtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Functions use Node.js 10.x.

Functions do not currently support importing dependencies, but you can [contact Segment Support](https://segment.com/help/contact/) to request that one be added.

The following dependencies are installed in the function environment by default.

- [`atob v2.1.2`](https://www.npmjs.com/package/atob) exposed as `atob`
- [`aws-sdk v2.488.0`](https://www.npmjs.com/package/aws-sdk) exposed as `AWS`
- [`btoa v1.2.1`](https://www.npmjs.com/package/btoa) exposed as `btoa`
- [`form-data v2.4.0`](https://www.npmjs.com/package/form-data) exposed as `FormData`
- [`lodash v4.17.15`](https://www.npmjs.com/package/lodash) exposed as `_`
- [`node-fetch v2.6.0`](https://www.npmjs.com/package/node-fetch) exposed as `fetch`
- [`oauth v0.9.15`](https://www.npmjs.com/package/oauth) exposed as `OAuth`
- [`xml v1.0.1`](https://www.npmjs.com/package/lodash) exposed as `xml`

Only the [`crypto` Node.js module](https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html ) is included (exposed as `crypto`). [Other built-in Node.js modules](https://nodejs.org/api/modules.html) are not available.
28 changes: 28 additions & 0 deletions src/_includes/content/functions/settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- usually placed under a heading called "Settings and Secrets" -->

Settings allow you to pass configurable variables to your function, which is the best way to pass sensitive information such as security tokens. For example, you might use `settings` as placeholders to use information such as an API endpoint and API key. This way, you can use the same code with different settings for different purposes. When you deploy a function in your workspace, you are prompted to fill out these settings to configure the function.

First, add a setting in **Settings** tab in the code editor:

![Settings Tab](/docs/connections/functions/images/settings-tab-empty.jpg){:width="500"}

Click **Add Setting** to add your new setting.

![Add Setting Dialog](/docs/connections/functions/images/add-setting-dialog.jpg)

You can configure the details about this setting, which change how it's displayed to anyone using your function:

- **Label** - Name of the setting, which users see when configuring the function.
- **Name** - Auto-generated name of the setting to use in function's source code.
- **Type** - Type of the setting's value.
- **Description** - Optional description, which appears below the setting name.
- **Required** - Enable this to ensure that the setting cannot be saved without a value.
- **Encrypted** - Enable to encrypt the value of this setting. Use this setting for sensitive data, like API keys.

As you change the values, a preview to the right updates to show how your setting will look and work.

Click **Add Setting** to save the new setting.

Once you save a setting, it appears in the **Settings** tab for the function. You can edit or delete settings from this tab.

![Settings Tab](/docs/connections/functions/images/settings-tab-non-empty.jpg){:width="500"}
Binary file not shown.
Binary file not shown.
Loading