microcks / microcks-go-client

Go client for accessing and using Microcks API

Home Page:https://microcks.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Microcks Go Client

Go client for accessing and using Microcks API

License Project Chat Go version GitHub release

Versioning

Latest released version is 0.1.0. It has been produced from Microcks 1.8.0 OpenAPI definition and can be used with all the above 1.x versions.

Installation

To get the latest version, use go1.21+ and fetch using the go get command. For example:

go get microcks.io/go-client@latest

To get a specific version, use go1.21+ and fetch the desired version using the go get command. For example:

go get microcks.io/go-client@v0.1.0

Quickstart

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 for more details.

About

Go client for accessing and using Microcks API

https://microcks.io

License:Apache License 2.0


Languages

Language:Go 53.0%Language:Makefile 47.0%