From f660906311977c82d12d3653354ab318d614b7b2 Mon Sep 17 00:00:00 2001 From: skyflow-bharti Date: Wed, 27 May 2026 09:17:07 +0530 Subject: [PATCH] SK-2815 fix readme link in upgrade section --- README-v1.md | 16 ++++++++-------- README.md | 37 ++++++++++++++++++------------------- docs/migrate_to_v2.md | 1 - 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/README-v1.md b/README-v1.md index fca6a6b..b7cf4b1 100644 --- a/README-v1.md +++ b/README-v1.md @@ -65,7 +65,7 @@ Alternatively, `go get ` can also be used to download the required The **GenerateBearerToken(filepath)** function takes the credentials file path for token generation, alternatively, you can also send the entire credentials as string, by using **GenerateBearerTokenFromCreds(credentials)**. -[Example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/serviceaccount/token/main/service_account_token.go): +[Example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v1/serviceaccount/token/main/service_account_token.go): ```go package main @@ -157,7 +157,7 @@ options = common.InsertOptions { res, err: = skyflowClient.Insert(records, options) ``` -[Insert call example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/vaultapi/insert.go): +[Insert call example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v1/vaultapi/insert.go): ```go package main @@ -215,7 +215,7 @@ Sample response : ``` -[Insert call example with ContinueOnError](https://github.com/skyflowapi/skyflow-go/blob/main/samples/vaultapi/insert_with_continueOnError.go): +[Insert call example with ContinueOnError](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v1/vaultapi/insert_with_continueOnError.go): ```go package main @@ -290,7 +290,7 @@ Sample response : ``` -[Upsert call example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/vaultapi/upsert.go): +[Upsert call example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v1/vaultapi/upsert.go): ```go package main @@ -385,7 +385,7 @@ res, err := skyflowClient.Detokenize(records, options) Note: `redaction` defaults to `common.PLAIN_TEXT` ``` -An [example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/vaultapi/detokenize.go) of a Detokenize call: +An [example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v1/vaultapi/detokenize.go) of a Detokenize call: ```go package main @@ -440,7 +440,7 @@ Sample response: ] } ``` -[Detokenize call with the ContinueOnError example.](https://github.com/skyflowapi/skyflow-go/blob/main/samples/vaultapi/detokenize.go): +[Detokenize call with the ContinueOnError example.](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v1/vaultapi/detokenize.go): ```go package main @@ -528,7 +528,7 @@ There are 4 accepted values in Skyflow.RedactionTypes: -An [example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/vaultapi/get_by_id.go) of GetById call: +An [example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v1/vaultapi/get_by_id.go) of GetById call: ```go package main @@ -965,7 +965,7 @@ The InvokeConnection method lets you bypass handling sensitive data by integrati **pathParams, queryParams, requestHeader, requestBody** objects will be sent through the connection integration url as shown below. -An [example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/vaultapi/invoke_connection.go) of InvokeConnection call: +An [example](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v1/vaultapi/invoke_connection.go) of InvokeConnection call: ```go diff --git a/README.md b/README.md index 7a816f7..c18842a 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The Skyflow Go SDK is designed to help with integrating Skyflow into a go backen - [Bearer Token (static)](#bearer-token-static) - [Initialize the client](#initialize-the-client) - [Insert data into the vault, get tokens back](#insert-data-into-the-vault-get-tokens-back) -- [Upgrade from v1 to v2]() +- [Upgrade from v1 to v2](#upgrade-from-v1-to-v2) - [Vault](#vault) - [Insert data into the vault](#insert-data-into-the-vault-1) - [Insert example with ContinueOnError option](#insert-example-with-continueonerror-option) @@ -242,7 +242,6 @@ Insert Response: { ## Upgrade from v1 to v2 Upgrade from `skyflow-go` v1 using the dedicated guide in [docs/migrate_to_v2.md](docs/migrate_to_v2.md). - ## Vault The [Vault](https://docs.skyflow.com/docs/vaults) module performs operations on the vault, including inserting records, detokenizing tokens, and retrieving tokens associated with a `SkyflowId`. @@ -550,7 +549,7 @@ Notes: - `ContinueOnError` defaults to `true`. > [!TIP] -> See the full example in the samples directory: [detokenize.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/detokenize.go) +> See the full example in the samples directory: [detokenize.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/detokenize.go) ```go package vaultapi @@ -627,7 +626,7 @@ Sample response: ``` > [!TIP] -> See the full example with `ContinueOnError` in the samples directory: [detokenize.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/detokenize.go) +> See the full example with `ContinueOnError` in the samples directory: [detokenize.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/detokenize.go) ```go package vaultapi @@ -766,7 +765,7 @@ func main() { ``` > [!TIP] -> See the full example in the samples directory: [tokenize_records.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/tokenize_records.go) +> See the full example in the samples directory: [tokenize_records.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/tokenize_records.go) ```go import ( "context" @@ -923,7 +922,7 @@ func main() { Retrieve specific records using `SkyflowIds`. Ideal for fetching exact records when IDs are known. > [!TIP] -> See the full example in the samples directory: [get_records.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/get_records.go) +> See the full example in the samples directory: [get_records.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/get_records.go) ```go package vaultapi @@ -1011,7 +1010,7 @@ Sample response: Return tokens for records. Ideal for securely processing sensitive data while maintaining data privacy. > [!TIP] -> See the full example in the samples directory: [get_records.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/get_records.go) +> See the full example in the samples directory: [get_records.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/get_records.go) ```go /** * This example demonstrates how to retrieve data from the Skyflow vault and return tokens along with the records. @@ -1085,7 +1084,7 @@ Sample response: Retrieve records by unique column values. Ideal for querying data without knowing Skyflow IDs, using alternate unique identifiers. > [!TIP] -> See the full example in the samples directory: [get_column_values.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/get_column_values.go) +> See the full example in the samples directory: [get_column_values.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/get_column_values.go) ```go package main @@ -1241,7 +1240,7 @@ func main() { ``` > [!TIP] -> See the full example in the samples directory: [update_record.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/update_record.go) +> See the full example in the samples directory: [update_record.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/update_record.go) ```go package main @@ -1392,7 +1391,7 @@ func main() { ``` > [!TIP] -> See the full example in the samples directory: [delete.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/delete.go) +> See the full example in the samples directory: [delete.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/delete.go) ```go package main @@ -1512,7 +1511,7 @@ func main() { ``` > [!TIP] -> See the full example in the samples directory: [query_record.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/query_record.go) +> See the full example in the samples directory: [query_record.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/query_record.go) ```go package main @@ -2420,7 +2419,7 @@ Sample response ## Connections -Skyflow Connections is a gateway service leveraging tokenization to securely send and receive data between your systems and first- or third-party services. The [connections](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/invoke_connection.go) module is used to invoke both INBOUND and/or OUTBOUND connections. +Skyflow Connections is a gateway service leveraging tokenization to securely send and receive data between your systems and first- or third-party services. The [connections](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/invoke_connection.go) module is used to invoke both INBOUND and/or OUTBOUND connections. - **Inbound Connections**: Act as intermediaries between your client and server, tokenizing sensitive data before it reaches your backend, ensuring downstream services handle only tokenized data. - **Outbound Connections**: Enable secure extraction of data from the vault and transfer it to third-party services via your backend server. @@ -2509,7 +2508,7 @@ func main() { **`PathParams`, `QueryParams`, `RequestHeader`, `RequestBody`** are the objects represented as map, that will be sent through the connection integration url. > [!TIP] -> See the full example in the samples directory: [invoke_connection.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/vaultapi/invoke_connection.go) +> See the full example in the samples directory: [invoke_connection.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/vaultapi/invoke_connection.go) > See [docs.skyflow.com](https://docs.skyflow.com) for more details on integrations with Connections, Functions, and Pipelines. ```go import ( @@ -2661,12 +2660,12 @@ Generate and manage bearer tokens to authenticate API calls. This section covers - **Generate signed data tokens**: Add an extra layer of security by digitally signing data tokens with the service account's private key. #### Generate a bearer token -The [Service Account]() go module is designed to generate service account tokens using a service account credentials file, which is provided when a service account is created. The tokens generated by this module are valid for 60 minutes and can be used to make API calls to Vault services and management APIs, depending on the permissions assigned to the service account. +The `Service Account` go module is designed to generate service account tokens using a service account credentials file, which is provided when a service account is created. The tokens generated by this module are valid for 60 minutes and can be used to make API calls to Vault services and management APIs, depending on the permissions assigned to the service account. The **GenerateBearerToken(filepath)** utility provides functionality for generating bearer tokens using a credentials JSON file. Alternatively, you can pass the credentials as a string to achieve the same result. > [!TIP] -> See the full example in the samples directory: [service_account_token.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/serviceaccount/token/main/service_account_token.go) +> See the full example in the samples directory: [service_account_token.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/serviceaccount/token_generation_example.go) ```go import ( @@ -2778,14 +2777,14 @@ creds := common.Credentials{ Context map keys must contain only alphanumeric characters and underscores (`[a-zA-Z0-9_]`). Invalid keys will return a `SkyflowError`. > [!TIP] -> See the full example in the samples directory: [token_generation_with_context.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/v2/serviceaccount/token_generation_with_context.go) +> See the full example in the samples directory: [token_generation_with_context.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/serviceaccount/token_generation_with_context.go) > See Skyflow's [context-aware authorization](https://docs.skyflow.com) and [conditional data access](https://docs.skyflow.com) docs for policy variable syntax like `request.context.*`. #### Generate scoped bearer tokens A service account with multiple roles can generate bearer tokens with access limited to a specific role by specifying the appropriate `roleID`. It can be used to limit access to specific roles for services with multiple responsibilities, such as segregating access for billing vs. analytics. The generated bearer tokens are valid for 60 minutes and can only execute operations permitted by the permissions associated with the designated role. > [!TIP] -> See the full example in the samples directory: [scoped_token_generation.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/serviceaccount/scoped_token_generation.go) +> See the full example in the samples directory: [scoped_token_generation.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/serviceaccount/scoped_token_generation.go) > See [docs.skyflow.com](https://docs.skyflow.com) for more details on authentication, access control, and governance for Skyflow. ```go import ( @@ -2833,7 +2832,7 @@ func ScopedTokenGenerationExample() { Skyflow generates data tokens when sensitive data is inserted into the vault. These data tokens can be digitally signed with a service account's private key, adding an extra layer of protection. Signed tokens can only be detokenized by providing the signed data token along with a bearer token generated from the service account's credentials. The service account must have the necessary permissions and context to successfully detokenize the signed data tokens. > [!TIP] -> See the full example in the samples directory: [signed_token_generation.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/serviceaccount/signed_token_generation.go) +> See the full example in the samples directory: [signed_token_generation.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/serviceaccount/signed_token_generation.go) > See [docs.skyflow.com](https://docs.skyflow.com) for more details on authentication, access control, and governance for Skyflow. ```go import ( @@ -2926,7 +2925,7 @@ message: Authentication failed. Bearer token is expired. Use a valid bearer toke If you encounter this kind of error, retry the request. During the retry, the SDK detects that the previous bearer token has expired and generates a new one for the current and subsequent requests. > [!TIP] -> See the full example in the samples directory: [bearer_token_expiry_example.go](https://github.com/skyflowapi/skyflow-go/blob/v2/samples/serviceaccount/bearer_token_expiry_example.go) +> See the full example in the samples directory: [bearer_token_expiry_example.go](https://github.com/skyflowapi/skyflow-go/blob/main/samples/v2/serviceaccount/bearer_token_expiry_example.go) > See [docs.skyflow.com](https://docs.skyflow.com) for more details on authentication, access control, and governance for Skyflow. ```go package serviceaccount diff --git a/docs/migrate_to_v2.md b/docs/migrate_to_v2.md index 86ec2bf..bf7644b 100644 --- a/docs/migrate_to_v2.md +++ b/docs/migrate_to_v2.md @@ -1,4 +1,3 @@ - ## Migration from v1 and v2 Below are the steps to migrate the go sdk from v1 to v2.