Skip to content

Commit

Permalink
Adding badge to provider pages
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Poignant <[email protected]>
  • Loading branch information
thomaspoignant committed Jun 14, 2024
1 parent 55244ee commit 18d3aaf
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 28 deletions.
7 changes: 6 additions & 1 deletion website/.ci/sdkVersions.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Maven struct {
Sdk string `json:"sdk,omitempty"`
KotlinProvider string `json:"providerKt,omitempty"`
JavaProvider string `json:"providerJava,omitempty"`
Android string `json:"android,omitempty"`
}

type Npm struct {
Expand Down Expand Up @@ -50,7 +51,11 @@ type GO struct {
func main() {
var wg sync.WaitGroup
versions := Versions{}
wg.Add(13)
wg.Add(14)
go func() {
defer wg.Done()
versions.Maven.Android = getMavenVersion("dev.openfeature", "android-sdk")
}()
go func() {
defer wg.Done()
versions.Maven.Sdk = getMavenVersion("dev.openfeature", "sdk")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ description: How to use the OpenFeature Kotlin SDK for your Android application
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import versions from '../../../sdk-versions.json';
import CodeBlock from '@theme/CodeBlock';


[![Maven Central Version](https://img.shields.io/maven-central/v/org.gofeatureflag.openfeature/gofeatureflag-kotlin-provider)](https://search.maven.org/artifact/org.gofeatureflag.openfeature/gofeatureflag-kotlin-provider)
![Static Badge](https://img.shields.io/badge/status-experimental-red)

This OpenFeature provider has a Kotlin implementation for Android to communicate with the GO Feature
Expand All @@ -32,18 +34,35 @@ the [`Java` provider](/docs/openfeature_sdk/server_providers/openfeature_java).
```json
implementation("org.gofeatureflag.openfeature:gofeatureflag-kotlin-provider:0.0.1-beta.1")
```
<CodeBlock
language="toml"
showLineNumbers>
{
`api("dev.openfeature:android-sdk:${versions.maven.android}")
implementation("org.gofeatureflag.openfeature:gofeatureflag-kotlin-provider${versions.maven.providerKt}")`
}
</CodeBlock>

</TabItem>
<TabItem value="maven" label="maven">

```xml
<dependency>
<groupId>org.gofeatureflag.openfeature</groupId>
<artifactId>gofeatureflag-kotlin-provider</artifactId>
<version>:0.0.1-beta.1</version>
</dependency>
```

</TabItem>
<TabItem value="maven" label="maven">
<CodeBlock
language="xml"
showLineNumbers>
{
`<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<artifactId>${versions.maven.android}</artifactId>
</dependency>
<dependency>
<groupId>org.gofeatureflag.openfeature</groupId>
<artifactId>gofeatureflag-kotlin-provider</artifactId>
<version>${versions.maven.providerKt}</version>
</dependency>`
}
</CodeBlock>
</TabItem>
</Tabs>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Javascript / Typescript SDK usage
[![NPM Version](https://img.shields.io/npm/v/%40openfeature%2Fgo-feature-flag-web-provider)](https://www.npmjs.com/package/@openfeature/go-feature-flag-web-provider)
![NPM Downloads](https://img.shields.io/npm/d18m/%40openfeature%2Fgo-feature-flag-web-provider)


This page describes how to use the OpenFeature Javascript web SDK for your client application.

## About this provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import TabItem from '@theme/TabItem';


# .Net SDK usage
[![NuGet Version](https://img.shields.io/nuget/v/OpenFeature.Contrib.GOFeatureFlag)](https://nuget.info/packages/OpenFeature.Contrib.GOFeatureFlag)
![NuGet Downloads](https://img.shields.io/nuget/dt/OpenFeature.Contrib.GOFeatureFlag)


## Install dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ sidebar_position: 20
title: GO
description: How to use the OpenFeature GO SDK
---
import versions from '../../../sdk-versions.json';

# GO SDK usage
[![GO Version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fproxy.golang.org%2Fgithub.com%2Fopen-feature%2Fgo-sdk-contrib%2Fproviders%2Fgo-feature-flag%2F%40latest&query=%24.Version&label=GO&color=orange)](https://github.com/open-feature/go-sdk-contrib/tree/main/providers/go-feature-flag)


## Install dependencies

Expand Down
37 changes: 25 additions & 12 deletions website/docs/openfeature_sdk/server_providers/openfeature_java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,56 @@ description: How to use the OpenFeature JAVA SDK
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import versions from '../../../sdk-versions.json';
import CodeBlock from '@theme/CodeBlock';

# JAVA SDK usage
[![Maven Central Version](https://img.shields.io/maven-central/v/dev.openfeature.contrib.providers/go-feature-flag)](https://search.maven.org/artifact/dev.openfeature.contrib.providers/go-feature-flag)

## Install dependencies

The first things we will do is install the **Open Feature SDK** and the **GO Feature Flag provider**.
The first thing we will do is install the **Open Feature SDK** and the **GO Feature Flag provider**.


<Tabs groupId="code">
<TabItem value="maven" label="maven">

```xml
<dependency>
<CodeBlock
language="xml"
showLineNumbers>
{
`<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<version>[1,)</version>
<artifactId>${versions.maven.sdk}</artifactId>
</dependency>
<dependency>
<groupId>dev.openfeature.contrib.providers</groupId>
<artifactId>go-feature-flag</artifactId>
<version>[0,)</version>
</dependency>
<version>${versions.maven.providerJava}</version>
</dependency>`
}
</CodeBlock>
```xml

```

</TabItem>
<TabItem value="gradle" label="gradle">
<CodeBlock
language="toml"
showLineNumbers>
{
`implementation group: 'dev.openfeature', name: 'javasdk', version: '${versions.maven.sdk}'
implementation group: 'dev.openfeature.contrib.providers', name: 'go-feature-flag', version: '${versions.maven.providerJava}'`}
</CodeBlock>

```gradle
implementation group: 'dev.openfeature', name: 'javasdk', version: '0.+'
implementation group: 'dev.openfeature.contrib.providers', name: 'go-feature-flag', version: '0.+'
```

</TabItem>
</Tabs>


## Initialize your Open Feature client
To evaluate the flags you need to have an Open Feature configured in you app.
To evaluate the flag you need to have an Open Feature configured in your app.
This code block shows you how you can create a client that you can use in your application.

<Tabs groupId="code">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ description: How to use the OpenFeature Javascript SDK
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';



# Node.js
[![NPM Version](https://img.shields.io/npm/v/%40openfeature%2Fgo-feature-flag-provider)](https://www.npmjs.com/package/@openfeature/go-feature-flag-provider)
![NPM Downloads](https://img.shields.io/npm/d18m/%40openfeature%2Fgo-feature-flag-provider)


## Install dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ description: How to use the OpenFeature Python SDK with GO Feature Flag
---

# Python Provider
[![PyPI - Version](https://img.shields.io/pypi/v/gofeatureflag-python-provider)](https://pypi.org/project/gofeatureflag-python-provider/)
![PyPI - Downloads](https://img.shields.io/pypi/dm/gofeatureflag-python-provider)


## Install dependencies

The first things we will do is install the **Open Feature SDK** and the **GO Feature Flag provider**.
The first thing we will do is install the **Open Feature SDK** and the **GO Feature Flag provider**.

```shell
pip install gofeatureflag-python-provider
```

## Initialize your Open Feature client

To evaluate the flags you need to have an Open Feature configured in you app.
To evaluate the flag you need to have an Open Feature configured in you app.
This code block shows you how you can create a client that you can use in your application.

```python
Expand Down
27 changes: 26 additions & 1 deletion website/sdk-versions.json
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
{"maven":{"sdk":"1.8.0","providerKt":"0.0.1-beta.2","providerJava":"0.2.20"},"npm":{"core":"1.3.0","serverSDK":"1.15.0","webSDK":"1.2.1","providerServer":"0.7.0"},"pypi":{"sdk":"0.7.0","provider":"0.2.0"},"nuget":{"sdk":"1.5.1","provider":"0.1.6"},"go":{"provider":"v0.1.37","sdk":"v1.12.0"}}
{
"maven": {
"sdk": "1.8.0",
"providerKt": "0.0.1-beta.2",
"providerJava": "0.2.20",
"android": "0.3.0"
},
"npm": {
"core": "1.3.0",
"serverSDK": "1.15.0",
"webSDK": "1.2.1",
"providerServer": "0.7.0"
},
"pypi": {
"sdk": "0.7.0",
"provider": "0.2.0"
},
"nuget": {
"sdk": "1.5.1",
"provider": "0.1.6"
},
"go": {
"provider": "v0.1.37",
"sdk": "v1.12.0"
}
}

0 comments on commit 18d3aaf

Please sign in to comment.