Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
egimbernat committed Jul 26, 2023
0 parents commit 15f58ae
Show file tree
Hide file tree
Showing 130 changed files with 4,743 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 3

server: https://app.fossa.com

project:
id: github.com/openfga/rust-sdk
name: github.com/openfga/rust-sdk
link: openfga.dev
url: github.com/openfga/rust-sdk
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @openfga/core
64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: Report an issue
about: Create a bug report about an existing issue.
title: ''
labels: 'bug'
assignees: ''

---

**Please do not report security vulnerabilities here**. See the [Responsible Disclosure Program](https://github.com/openfga/rust-sdk/blob/main/.github/SECURITY.md).

**Thank you in advance for helping us to improve this library!** Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible.

By submitting an issue to this repository, you agree to the terms within the [OpenFGA Code of Conduct](https://github.com/openfga/rfcs/blob/main/CODE-OF-CONDUCT.md).

### Description

> Provide a clear and concise description of the issue, including what you expected to happen.
### Version of SDK

> v0.2.0
### Version of OpenFGA (if known)

> v1.1.0
### OpenFGA Flags/Custom Configuration Applicable

> environment:
> - OPENFGA_DATASTORE_ENGINE=postgres
> - OPENFGA_DATASTORE_URI=postgres://postgres:password@postgres:5432/postgres?sslmode=disable
> - OPENFGA_TRACE_ENABLED=true
> - OPENFGA_TRACE_SAMPLE_RATIO=1
> - OPENFGA_TRACE_OTLP_ENDPOINT=otel-collector:4317
> - OPENFGA_METRICS_ENABLE_RPC_HISTOGRAMS=true
### Reproduction

> Detail the steps taken to reproduce this error, what was expected, and whether this issue can be reproduced consistently or if it is intermittent.
>
> 1. Initialize OpenFgaClient with openfga_sdk.ClientConfiguration parameter api_host=127.0.0.1, credentials method client_credentials
> 2. Invoke method read_authorization_models
> 3. See exception thrown
### Sample Code the Produces Issues

>
> ```
> <code snippet>
> ```
### Backtrace (if applicable)

> ```
> <backtrace>
> ```

### Expected behavior
> A clear and concise description of what you expected to happen.
### Additional context
> Add any other context about the problem here.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Feature request
about: Suggest new functionality for this project.
title: ''
labels: 'feature'
assignees: ''

---

**Please do not report security vulnerabilities here**. See the [Responsible Disclosure Program](https://github.com/openfga/rust-sdk/blob/main/.github/SECURITY.md).

**Thank you in advance for helping us to improve this library!** Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible.

By submitting an issue to this repository, you agree to the terms within the [OpenFGA Code of Conduct](https://github.com/openfga/rfcs/blob/main/CODE-OF-CONDUCT.md).

### Describe the problem you'd like to have solved

> A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
### Describe the ideal solution

> A clear and concise description of what you want to happen.
## Alternatives and current workarounds

> A clear and concise description of any alternatives you've considered or any workarounds that are currently in place.
### Additional context

> Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions .github/workflows/semgrep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Semgrep
on:
push:
branches:
- main
jobs:
semgrep:
name: Scan
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep
if: (github.actor != 'dependabot[bot]' && github.actor != 'snyk-bot')
steps:
- uses: actions/checkout@v3
- run: semgrep ci
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@


# IDEs
.idea
.vscode
.sublime-workspace
.sublime-project
.idea/
.vscode/

# Possible credential files
.env
credentials.json

# git conflict leftover files
*.orig

# Mac
.DS_Store

VERSION.txt
git_push.sh
Empty file added .openapi-generator-ignore
Empty file.
129 changes: 129 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
.fossa.yml
.github/CODEOWNERS
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/workflows/semgrep.yaml
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
Cargo.toml
LICENSE
NOTICE.txt
README.md
VERSION.txt
docs/Any.md
docs/Assertion.md
docs/AuthorizationModel.md
docs/CheckRequest.md
docs/CheckResponse.md
docs/Computed.md
docs/ContextualTupleKeys.md
docs/CreateStoreRequest.md
docs/CreateStoreResponse.md
docs/Difference.md
docs/ErrorCode.md
docs/ExpandRequest.md
docs/ExpandResponse.md
docs/GetStoreResponse.md
docs/InternalErrorCode.md
docs/InternalErrorMessageResponse.md
docs/Leaf.md
docs/ListObjectsRequest.md
docs/ListObjectsResponse.md
docs/ListStoresResponse.md
docs/Metadata.md
docs/Node.md
docs/Nodes.md
docs/NotFoundErrorCode.md
docs/ObjectRelation.md
docs/OpenFgaApi.md
docs/PathUnknownErrorMessageResponse.md
docs/ReadAssertionsResponse.md
docs/ReadAuthorizationModelResponse.md
docs/ReadAuthorizationModelsResponse.md
docs/ReadChangesResponse.md
docs/ReadRequest.md
docs/ReadResponse.md
docs/RelationMetadata.md
docs/RelationReference.md
docs/Status.md
docs/Store.md
docs/Tuple.md
docs/TupleChange.md
docs/TupleKey.md
docs/TupleKeys.md
docs/TupleOperation.md
docs/TupleToUserset.md
docs/TypeDefinition.md
docs/Users.md
docs/Userset.md
docs/UsersetTree.md
docs/UsersetTreePeriodDifference.md
docs/UsersetTreePeriodTupleToUserset.md
docs/Usersets.md
docs/ValidationErrorMessageResponse.md
docs/WriteAssertionsRequest.md
docs/WriteAuthorizationModelRequest.md
docs/WriteAuthorizationModelResponse.md
docs/WriteRequest.md
git_push.sh
src/apis/configuration.rs
src/apis/mod.rs
src/apis/open_fga_api.rs
src/lib.rs
src/models/any.rs
src/models/assertion.rs
src/models/authorization_model.rs
src/models/check_request.rs
src/models/check_response.rs
src/models/computed.rs
src/models/contextual_tuple_keys.rs
src/models/create_store_request.rs
src/models/create_store_response.rs
src/models/difference.rs
src/models/error_code.rs
src/models/expand_request.rs
src/models/expand_response.rs
src/models/get_store_response.rs
src/models/internal_error_code.rs
src/models/internal_error_message_response.rs
src/models/leaf.rs
src/models/list_objects_request.rs
src/models/list_objects_response.rs
src/models/list_stores_response.rs
src/models/metadata.rs
src/models/mod.rs
src/models/node.rs
src/models/nodes.rs
src/models/not_found_error_code.rs
src/models/object_relation.rs
src/models/path_unknown_error_message_response.rs
src/models/read_assertions_response.rs
src/models/read_authorization_model_response.rs
src/models/read_authorization_models_response.rs
src/models/read_changes_response.rs
src/models/read_request.rs
src/models/read_response.rs
src/models/relation_metadata.rs
src/models/relation_reference.rs
src/models/status.rs
src/models/store.rs
src/models/tuple.rs
src/models/tuple_change.rs
src/models/tuple_key.rs
src/models/tuple_keys.rs
src/models/tuple_operation.rs
src/models/tuple_to_userset.rs
src/models/type_definition.rs
src/models/users.rs
src/models/userset.rs
src/models/userset_tree.rs
src/models/userset_tree_period_difference.rs
src/models/userset_tree_period_tuple_to_userset.rs
src/models/usersets.rs
src/models/validation_error_message_response.rs
src/models/write_assertions_request.rs
src/models/write_authorization_model_request.rs
src/models/write_authorization_model_response.rs
src/models/write_request.rs
1 change: 1 addition & 0 deletions .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.4.0
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
language: rust
Empty file added CHANGELOG.md
Empty file.
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing to OpenFGA projects

A big welcome and thank you for considering contributing to the OpenFGA open source projects. It’s people like you that make it a reality for users in our community.

Reading and following these guidelines will help us make the contribution process easy and effective for everyone involved. It also communicates that you agree to respect the time of the developers managing and developing these open source projects. In return, we will reciprocate that respect by addressing your issue, assessing changes, and helping you finalize your pull requests.

### Table of Contents

* [Code of Conduct](#code-of-conduct)
* [Getting Started](#getting-started)
* [Making Changes](#making-changes)
* [Opening Issues](#opening-issues)
* [Submitting Pull Requests](#submitting-pull-requests) [Note: We are not accepting Pull Requests at this time!]
* [Getting in Touch](#getting-in-touch)
* [Have a question or problem?](#have-a-question-or-problem)
* [Vulnerability Reporting](#vulnerability-reporting)

## Code of Conduct

By participating and contributing to this project, you are expected to uphold our [Code of Conduct](https://github.com/openfga/.github/blob/main/CODE_OF_CONDUCT.md).

## Getting Started

### Making Changes

When contributing to a repository, the first step is to open an issue on [sdk-generator](https://github.com/openfga/sdk-generator) to discuss the change you wish to make before making them.

### Opening Issues

Before you submit a new issue please make sure to search all open and closed issues. It is possible your feature request/issue has already been answered. Make sure to also check the [OpenFGA discussions](https://github.com/orgs/openfga/discussions).

That repo includes an issue template that will walk through all the places to check before submitting your issue here. Please follow the instructions there to make sure this is not a duplicate issue and that we have everything we need to research and reproduce this problem.

### Submitting Pull Requests

Considering that the SDKs are autogenerated, please make sure to submit your Pull Requests to the [sdk-generator](https://github.com/openfga/sdk-generator). We will not accept PRs to this repository because they will be overwritten on the next sdk generation.

## Getting in touch

### Have a question or problem?

Please do not open issues for general support or usage questions. Instead, join us over in the [OpenFGA discussions](https://github.com/orgs/openfga/discussions) or [support community](https://discord.gg/8naAwJfWN6).

### Vulnerability Reporting

Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://github.com/openfga/rust-sdk/blob/main/.github/SECURITY.md) details the procedure for disclosing security issues.
17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "CHANGE_ME"
version = "0.0.1"
authors = ["community@openfga.dev"]
description = "A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar."
license = "Apache-2.0"
edition = "2018"

[dependencies]
serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde"] }
[dependencies.reqwest]
version = "^0.11"
features = ["json", "multipart"]
Loading

0 comments on commit 15f58ae

Please sign in to comment.