https://github.com/microcks/microcks-go-client
Go client for accessing and using Microcks API
https://github.com/microcks/microcks-go-client
api-client contract-testing go microcks mocking
Last synced: 10 months ago
JSON representation
Go client for accessing and using Microcks API
- Host: GitHub
- URL: https://github.com/microcks/microcks-go-client
- Owner: microcks
- License: apache-2.0
- Created: 2023-09-28T20:03:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T12:36:49.000Z (over 1 year ago)
- Last Synced: 2024-10-30T05:42:57.598Z (over 1 year ago)
- Topics: api-client, contract-testing, go, microcks, mocking
- Language: Go
- Homepage: https://microcks.io
- Size: 108 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY-INSIGHTS.yml
- Governance: GOVERNANCE.md
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# Microcks Go Client
A Go Client or SDK that allows you to interact with the Microcks API.
[](https://www.apache.org/licenses/LICENSE-2.0)


[](https://microcks.io/discord-invite/)
[](https://artifacthub.io/packages/search?repo=microcks)
[](https://landscape.cncf.io/?item=app-definition-and-development--application-definition-image-build--microcks)
## Build Status
Latest released version is `0.3.1`.
Current development version is `0.4.0`.
#### Fossa license and security scans
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-go-client?ref=badge_shield&issueType=license)
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-go-client?ref=badge_shield&issueType=security)
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-go-client?ref=badge_small)
#### OpenSSF best practices on Microcks core
[](https://bestpractices.coreinfrastructure.org/projects/7513)
[](https://securityscorecards.dev/viewer/?uri=github.com/microcks/microcks)
## Community
* [Documentation](https://microcks.io/documentation/tutorials/getting-started/)
* [Microcks Community](https://github.com/microcks/community) and community meeting
* Join us on [Discord](https://microcks.io/discord-invite/), on [GitHub Discussions](https://github.com/orgs/microcks/discussions) or [CNCF Slack #microcks channel](https://cloud-native.slack.com/archives/C05BYHW1TNJ)
To get involved with our community, please make sure you are familiar with the project's [Code of Conduct](./CODE_OF_CONDUCT.md).
## Versions
Latest released version is `0.3.1`. Please check the table bealow to see what version of Microcks API it matches.
| Go Client | Microcks Version |
| --------- | ---------------- |
| `0.3.x` | `1.10.0` and above |
| `0.2.0` | `1.10.0` and above |
| `0.1.0` | `1.8.0` and above |
## Installation
To get the latest version, use go1.22 and fetch using the `go get` command. For example:
```
go get microcks.io/go-client@latest
```
To get a specific version, use go1.22 and fetch the desired version using the `go get` command. For example:
```
go get microcks.io/go-client@v0.3.1
```
## Quickstart
```go
package main
import (
"context"
"fmt"
"log"
client "microcks.io/go-client"
)
const server = "http://localhost:8080/api"
func main() {
// Create client
c, err := client.NewClientWithResponses(server)
if err != nil {
log.Fatal(err)
}
// Request the Keycloak configuration
ctx := context.Background()
resp, err := c.GetKeycloakConfigWithResponse(ctx)
if err != nil {
log.Fatal(err)
}
// Print the response
fmt.Printf("%+v\n\n", resp.JSON200)
}
```
### License
The Apache License (apache) - see [`LICENSE.md`](https://github.com/microcks/microcks-go-client/blob/main/LICENSE.md) for more details.