Skip to content

Commit

Permalink
Merge pull request #13 from formancehq/feat/num-1043-auth-opentelemetry
Browse files Browse the repository at this point in the history
feat: add otlp instrumentation
  • Loading branch information
flemzord authored Nov 25, 2022
2 parents 6b53e4c + d8d9212 commit 879ae60
Show file tree
Hide file tree
Showing 91 changed files with 4,833 additions and 6,028 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ updates:
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
interval: "daily"
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
exclude: (client|internal/grpc)
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: .cloud
- id: check-added-large-files
- repo: https://github.com/formancehq/pre-commit-hooks
rev: dd079f7c30ad72446d615f55a000d4f875e79633
hooks:
- id: gogenerate
files: swagger.yaml
- id: gomodtidy
- id: goimports
- id: gofmt
- id: golangci-lint
- id: gotests
- id: commitlint
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ FROM ubuntu:jammy
RUN apt update && apt install -y ca-certificates curl && rm -rf /var/lib/apt/lists/*
COPY --from=builder /src/main /main
EXPOSE 3068
ENV OTEL_SERVICE_NAME auth
ENTRYPOINT ["/main"]
CMD ["--help"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ task lint

## Run the demo

Execute command :
Execute command :
```bash
docker compose up
```
Expand Down
22 changes: 11 additions & 11 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ tasks:
cmds:
- rm -rf ./authclient
- >
docker run --rm
-w /local
-v ${PWD}:/local
openapitools/openapi-generator-cli:latest generate
-i swagger.yaml
-g go
-o ./authclient
--git-user-id=formancehq
--git-repo-id=auth
-p packageVersion=latest
-p isGoSubmodule=true
docker run --rm
-w /local
-v ${PWD}:/local
openapitools/openapi-generator-cli:latest generate
-i swagger.yaml
-g go
-o ./authclient
--git-user-id=formancehq
--git-repo-id=auth
-p packageVersion=latest
-p isGoSubmodule=true
-p packageName=authclient
install-deps-demo-client:
Expand Down
23 changes: 9 additions & 14 deletions authclient/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,30 @@
.travis.yml
README.md
api/openapi.yaml
api_default.go
api_clients.go
api_scopes.go
api_users.go
client.go
configuration.go
docs/Client.md
docs/ClientAllOf.md
docs/ClientOptions.md
docs/ClientSecret.md
docs/ClientsApi.md
docs/CreateClientResponse.md
docs/CreateScopeResponse.md
docs/CreateSecretResponse.md
docs/DefaultApi.md
docs/ListClientsResponse.md
docs/ListScopesResponse.md
docs/ListUsersResponse.md
docs/ReadClientResponse.md
docs/ReadUserResponse.md
docs/Scope.md
docs/ScopeAllOf.md
docs/ScopeOptions.md
docs/Secret.md
docs/SecretAllOf.md
docs/ScopesApi.md
docs/SecretOptions.md
docs/User.md
docs/UsersApi.md
git_push.sh
go.mod
go.sum
model_client.go
model_client_all_of.go
model_client_options.go
model_client_secret.go
model_create_client_response.go
Expand All @@ -41,12 +37,11 @@ model_list_scopes_response.go
model_list_users_response.go
model_read_client_response.go
model_read_user_response.go
model_scope.go
model_scope_all_of.go
model_scope_options.go
model_secret.go
model_secret_all_of.go
model_secret_options.go
model_user.go
response.go
test/api_clients_test.go
test/api_scopes_test.go
test/api_users_test.go
utils.go
2 changes: 1 addition & 1 deletion authclient/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.1-SNAPSHOT
6.3.0-SNAPSHOT
44 changes: 19 additions & 25 deletions authclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,34 +74,32 @@ ctx = context.WithValue(context.Background(), authclient.ContextOperationServerV

## Documentation for API Endpoints

All URIs are relative to *https://.o.formance.cloud/auth*
All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**AddScopeToClient**](docs/DefaultApi.md#addscopetoclient) | **Put** /clients/{clientId}/scopes/{scopeId} | Add scope to client
*DefaultApi* | [**AddTransientScope**](docs/DefaultApi.md#addtransientscope) | **Put** /scopes/{scopeId}/transient/{transientScopeId} | Add a transient scope to a scope
*DefaultApi* | [**CreateClient**](docs/DefaultApi.md#createclient) | **Post** /clients | Create client
*DefaultApi* | [**CreateScope**](docs/DefaultApi.md#createscope) | **Post** /scopes | Create scope
*DefaultApi* | [**CreateSecret**](docs/DefaultApi.md#createsecret) | **Post** /clients/{clientId}/secrets | Add a secret to a client
*DefaultApi* | [**DeleteClient**](docs/DefaultApi.md#deleteclient) | **Delete** /clients/{clientId} | Delete client
*DefaultApi* | [**DeleteScope**](docs/DefaultApi.md#deletescope) | **Delete** /scopes/{scopeId} | Delete scope
*DefaultApi* | [**DeleteScopeFromClient**](docs/DefaultApi.md#deletescopefromclient) | **Delete** /clients/{clientId}/scopes/{scopeId} | Delete scope from client
*DefaultApi* | [**DeleteSecret**](docs/DefaultApi.md#deletesecret) | **Delete** /clients/{clientId}/secrets/{secretId} | Delete a secret from a client
*DefaultApi* | [**DeleteTransientScope**](docs/DefaultApi.md#deletetransientscope) | **Delete** /scopes/{scopeId}/transient/{transientScopeId} | Delete a transient scope from a scope
*DefaultApi* | [**ListClients**](docs/DefaultApi.md#listclients) | **Get** /clients | List clients
*DefaultApi* | [**ListScopes**](docs/DefaultApi.md#listscopes) | **Get** /scopes | List scopes
*DefaultApi* | [**ListUsers**](docs/DefaultApi.md#listusers) | **Get** /users | List users
*DefaultApi* | [**ReadClient**](docs/DefaultApi.md#readclient) | **Get** /clients/{clientId} | Read client
*DefaultApi* | [**ReadScope**](docs/DefaultApi.md#readscope) | **Get** /scopes/{scopeId} | Read scope
*DefaultApi* | [**ReadUser**](docs/DefaultApi.md#readuser) | **Get** /users/{userId} | Read user
*DefaultApi* | [**UpdateClient**](docs/DefaultApi.md#updateclient) | **Put** /clients/{clientId} | Update client
*DefaultApi* | [**UpdateScope**](docs/DefaultApi.md#updatescope) | **Put** /scopes/{scopeId} | Update scope
*ClientsApi* | [**AddScopeToClient**](docs/ClientsApi.md#addscopetoclient) | **Put** /clients/{clientId}/scopes/{scopeId} | Add scope to client
*ClientsApi* | [**CreateClient**](docs/ClientsApi.md#createclient) | **Post** /clients | Create client
*ClientsApi* | [**CreateSecret**](docs/ClientsApi.md#createsecret) | **Post** /clients/{clientId}/secrets | Add a secret to a client
*ClientsApi* | [**DeleteClient**](docs/ClientsApi.md#deleteclient) | **Delete** /clients/{clientId} | Delete client
*ClientsApi* | [**DeleteScopeFromClient**](docs/ClientsApi.md#deletescopefromclient) | **Delete** /clients/{clientId}/scopes/{scopeId} | Delete scope from client
*ClientsApi* | [**DeleteSecret**](docs/ClientsApi.md#deletesecret) | **Delete** /clients/{clientId}/secrets/{secretId} | Delete a secret from a client
*ClientsApi* | [**ListClients**](docs/ClientsApi.md#listclients) | **Get** /clients | List clients
*ClientsApi* | [**ReadClient**](docs/ClientsApi.md#readclient) | **Get** /clients/{clientId} | Read client
*ClientsApi* | [**UpdateClient**](docs/ClientsApi.md#updateclient) | **Put** /clients/{clientId} | Update client
*ScopesApi* | [**AddTransientScope**](docs/ScopesApi.md#addtransientscope) | **Put** /scopes/{scopeId}/transient/{transientScopeId} | Add a transient scope to a scope
*ScopesApi* | [**CreateScope**](docs/ScopesApi.md#createscope) | **Post** /scopes | Create scope
*ScopesApi* | [**DeleteScope**](docs/ScopesApi.md#deletescope) | **Delete** /scopes/{scopeId} | Delete scope
*ScopesApi* | [**DeleteTransientScope**](docs/ScopesApi.md#deletetransientscope) | **Delete** /scopes/{scopeId}/transient/{transientScopeId} | Delete a transient scope from a scope
*ScopesApi* | [**ListScopes**](docs/ScopesApi.md#listscopes) | **Get** /scopes | List scopes
*ScopesApi* | [**ReadScope**](docs/ScopesApi.md#readscope) | **Get** /scopes/{scopeId} | Read scope
*ScopesApi* | [**UpdateScope**](docs/ScopesApi.md#updatescope) | **Put** /scopes/{scopeId} | Update scope
*UsersApi* | [**ListUsers**](docs/UsersApi.md#listusers) | **Get** /users | List users
*UsersApi* | [**ReadUser**](docs/UsersApi.md#readuser) | **Get** /users/{userId} | Read user


## Documentation For Models

- [Client](docs/Client.md)
- [ClientAllOf](docs/ClientAllOf.md)
- [ClientOptions](docs/ClientOptions.md)
- [ClientSecret](docs/ClientSecret.md)
- [CreateClientResponse](docs/CreateClientResponse.md)
Expand All @@ -112,11 +110,7 @@ Class | Method | HTTP request | Description
- [ListUsersResponse](docs/ListUsersResponse.md)
- [ReadClientResponse](docs/ReadClientResponse.md)
- [ReadUserResponse](docs/ReadUserResponse.md)
- [Scope](docs/Scope.md)
- [ScopeAllOf](docs/ScopeAllOf.md)
- [ScopeOptions](docs/ScopeOptions.md)
- [Secret](docs/Secret.md)
- [SecretAllOf](docs/SecretAllOf.md)
- [SecretOptions](docs/SecretOptions.md)
- [User](docs/User.md)

Expand Down
Loading

0 comments on commit 879ae60

Please sign in to comment.