Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Mar 16, 2023
2 parents 4d87aa6 + 60df364 commit 0398734
Show file tree
Hide file tree
Showing 915 changed files with 5,066 additions and 5,066 deletions.
12 changes: 6 additions & 6 deletions release/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Go API client for zest
# Go API client for zest/release/v3

Fetch, Upload, Organize, and Distribute Software Packages

Expand All @@ -22,7 +22,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:

```golang
import zest "github.com/content-services/zest/v3/release"
import zest/release/v3 "github.com/content-services/zest/release/v3"
```

To use a proxy, set the environment variable `HTTP_PROXY`:
Expand All @@ -40,15 +40,15 @@ Default configuration comes with `Servers` field that contains server objects as
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.

```golang
ctx := context.WithValue(context.Background(), zest.ContextServerIndex, 1)
ctx := context.WithValue(context.Background(), zest/release/v3.ContextServerIndex, 1)
```

### Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.

```golang
ctx := context.WithValue(context.Background(), zest.ContextServerVariables, map[string]string{
ctx := context.WithValue(context.Background(), zest/release/v3.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
Expand All @@ -62,10 +62,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), zest.ContextOperationServerIndices, map[string]int{
ctx := context.WithValue(context.Background(), zest/release/v3.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), zest.ContextOperationServerVariables, map[string]map[string]string{
ctx = context.WithValue(context.Background(), zest/release/v3.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
Expand Down
Loading

0 comments on commit 0398734

Please sign in to comment.