You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+66-2Lines changed: 66 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,73 @@
2
2
3
3
The Phase Secrets SDK provides a Go package for managing secrets in your application environments using the Phase service. This SDK let's you create, retrieve, update, and delete secrets, with end-to-end encryption with just a few lines of code.
|`${KEY}`| same environment | `/ | KEY | Local reference in the same environment and path root (/). |
16
+
|`${staging.DEBUG}`|`dev`|`/` (root of staging environment) | DEBUG | Cross-environment reference to a secret at the root (/). |
17
+
|`${prod./frontend/SECRET_KEY}`|`prod`|`/frontend/`| SECRET_KEY | Cross-environment reference to a secret in a specific path. |
18
+
|`${/backend/payments/STRIPE_KEY}`| same environment |`/backend/payments/`| STRIPE_KEY | Local reference with a specified path within the same environment. |
19
+
5
20
## Installation
6
21
7
-
To start using the Phase SDK in your Go project, install it using `go get`:
22
+
This SDK uses the `sodium` package to perform cryptographic operations, on most system you will need to install the `libsodium` library as a system dependency. Here's how you can install `libsodium` or its development packages on different platforms, including macOS, Ubuntu, Debian, Arch Linux, Alpine Linux, and Windows.
On Windows, the process is a bit different due to the variety of development environments. However, you can download pre-built binaries from the official [libsodium GitHub releases page](https://github.com/jedisct1/libsodium/releases). Choose the appropriate version for your system architecture (e.g., Win32 or Win64), download it, and follow the instructions included to integrate `libsodium` with your development environment. For development with Visual Studio, you'll typically include the header files and link against the `libsodium.lib` or `libsodium.dll` file.
57
+
58
+
If you're using a package manager like `vcpkg` or `chocolatey`, you can also find `libsodium` packages available for installation:
59
+
60
+
- Using `vcpkg`:
61
+
```sh
62
+
vcpkg install libsodium
63
+
```
64
+
- Using `chocolatey`:
65
+
```sh
66
+
choco install libsodium
67
+
```
68
+
69
+
Remember, after installing the library, you might need to configure your project or environment variables to locate the `libsodium` libraries correctly, especially on Windows.
70
+
71
+
Next, start using the Phase SDK in your Go project, install it using `go get`:
8
72
9
73
```bash
10
74
go get github.com/phasehq/golang-sdk/phase
@@ -116,6 +180,6 @@ if err != nil {
116
180
}
117
181
```
118
182
119
-
For more information and advanced usage, refer to the official Phase documentation.
183
+
For more information and advanced usage, refer to the [Phase Docs](https://docs.phase.dev/sdks/go).
0 commit comments