/microcks-client-go

🔌 Microcks GO client

Primary LanguageMakefileApache License 2.0Apache-2.0

🔌 Microcks GO client

GoDoc GitHub tag Go version License Releases


How to get it

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

go get github.com/JulienBreux/microcks-client-go@latest

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

go get github.com/JulienBreux/microcks-client-go@v0.1.0

How to use it

package main

import (
    "github.com/JulienBreux/microcks-client-go"
)

const server = "http://localhost:8080/api"

fun main() {
	// Create client
	client, err := api.NewClientWithResponses(server)
	if err != nil {
		fatal(err)
	}

	// Request the Keycloak configuration
	ctx := context.Background()
	resp, err := c.actions.GetKeycloakConfigWithResponse(ctx)
	if err != nil {
		fatal(err)
	}

	// Print the response
	fmt.Printf("%+v\n\n", resp.JSON200)
}

License

The MIT License (MIT) - see LICENSE.md for more details