https://github.com/casvisor/casvisor-java-sdk
Casvisor Java SDK
https://github.com/casvisor/casvisor-java-sdk
Last synced: about 1 year ago
JSON representation
Casvisor Java SDK
- Host: GitHub
- URL: https://github.com/casvisor/casvisor-java-sdk
- Owner: casvisor
- License: apache-2.0
- Created: 2025-01-18T08:27:48.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-14T15:15:49.000Z (over 1 year ago)
- Last Synced: 2025-02-14T16:25:07.866Z (over 1 year ago)
- Language: Java
- Homepage: https://github.com/casvisor/casvisor
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# casvisor-java-sdk
[](https://github.com/casvisor/casvisor-java-sdk/actions/workflows/maven-ci.yml)
[](https://codebeat.co/projects/github-com-casvisor-casvisor-java-sdk-master)
[](https://codecov.io/gh/casvisor/casvisor-java-sdk)
[](https://mvnrepository.com/artifact/org.casbin/casvisor-java-sdk/latest)
[](https://github.com/casvisor/casvisor-java-sdk/releases/latest)
[](https://discord.gg/5rPsrAzK7S)
Casvisor Java SDK is the official Java client for Casvisor, used to interact with Casvisor services.
## Step1. Init Config
Initialization requires 5 parameters, which are all string type:
| Name (in order) | Must | Description |
|------------------|------|-------------------------------------------------------|
| endpoint | Yes | Casvisor server URL, such as `http://localhost:16001` |
| clientId | Yes | Application.clientId |
| clientSecret | Yes | Application.clientSecret |
| organizationName | Yes | Organization name |
| applicationName | Yes | Application name |
### You can either initialize the SDK with global config
```java
CasvisorConfig config = new CasvisorConfig(endpoint, clientId, clientSecret, certificate, organizationName, applicationName);
```
## Step2. Get Service and use
Now provide service: ``RecordService``
You can create them like
```java
RecordService recordService = new RecordService(config);
```
## RecordService
``RecordService``support basic user operations, like:
- ``getRecord(String name)``, get one record by record name.
- ``getRecords()``, get all records.
- ``updateRecord(Record record)/addRecord(Record record)/deleteRecord(Record record)``, write record to database.
## Contribution
We welcome any form of contribution, including but not limited to:
1. Submit issues and suggestions
2. Submit Pull Request
3. Improve documentation
## License
This project is licensed under the [Apache 2.0 License](LICENSE).