# README
Microcks Go Client
Go client for accessing and using Microcks API
Versioning
Latest released version is 0.2.0
. Please check the table bealow to see what version of Microcks API it matches.
Go Client | Microcks Version |
---|---|
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.21+ and fetch the desired version using the go get
command. For example:
go get microcks.io/[email protected]
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.
# Packages
No description provided by the author
# Functions
NewActivateImportJobRequest generates requests for ActivateImportJob.
Creates a new Client, with reasonable defaults.
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling.
NewCreateImportJobRequest calls the generic CreateImportJob builder with application/json body.
NewCreateImportJobRequestWithBody generates requests for CreateImportJob with any type of body.
NewCreateSecretRequest calls the generic CreateSecret builder with application/json body.
NewCreateSecretRequestWithBody generates requests for CreateSecret with any type of body.
NewCreateTestRequest calls the generic CreateTest builder with application/json body.
NewCreateTestRequestWithBody generates requests for CreateTest with any type of body.
NewDeleteImportJobRequest generates requests for DeleteImportJob.
NewDeleteSecretRequest generates requests for DeleteSecret.
NewDeleteServiceRequest generates requests for DeleteService.
NewDownloadArtifactRequestWithBody generates requests for DownloadArtifact with any type of body.
NewDownloadArtifactRequestWithFormdataBody calls the generic DownloadArtifact builder with application/x-www-form-urlencoded body.
NewExportSnapshotRequest generates requests for ExportSnapshot.
NewGetAggregatedInvocationsStatsRequest generates requests for GetAggregatedInvocationsStats.
NewGetConformanceMetricsAggregationRequest generates requests for GetConformanceMetricsAggregation.
NewGetEventsByTestCaseRequest generates requests for GetEventsByTestCase.
NewGetFeaturesConfigRequest generates requests for GetFeaturesConfig.
NewGetImportJobCounterRequest generates requests for GetImportJobCounter.
NewGetImportJobRequest generates requests for GetImportJob.
NewGetImportJobsRequest generates requests for GetImportJobs.
NewGetInvocationStatsByServiceRequest generates requests for GetInvocationStatsByService.
NewGetKeycloakConfigRequest generates requests for GetKeycloakConfig.
NewGetLatestAggregatedInvocationsStatsRequest generates requests for GetLatestAggregatedInvocationsStats.
NewGetLatestTestResultsRequest generates requests for GetLatestTestResults.
NewGetMessagesByTestCaseRequest generates requests for GetMessagesByTestCase.
NewGetResourceRequest generates requests for GetResource.
NewGetResourcesByServiceRequest generates requests for GetResourcesByService.
NewGetSecretRequest generates requests for GetSecret.
NewGetSecretsCounterRequest generates requests for GetSecretsCounter.
NewGetSecretsRequest generates requests for GetSecrets.
NewGetServiceRequest generates requests for GetService.
NewGetServicesCounterRequest generates requests for GetServicesCounter.
NewGetServicesLabelsRequest generates requests for GetServicesLabels.
NewGetServicesRequest generates requests for GetServices.
NewGetServiceTestConformanceMetricRequest generates requests for GetServiceTestConformanceMetric.
NewGetTestResultRequest generates requests for GetTestResult.
NewGetTestResultsByServiceCounterRequest generates requests for GetTestResultsByServiceCounter.
NewGetTestResultsByServiceRequest generates requests for GetTestResultsByService.
NewGetTopIvnocationsStatsByDayRequest generates requests for GetTopIvnocationsStatsByDay.
NewImportSnapshotRequestWithBody generates requests for ImportSnapshot with any type of body.
NewOverrideServiceOperationRequest calls the generic OverrideServiceOperation builder with application/json body.
NewOverrideServiceOperationRequestWithBody generates requests for OverrideServiceOperation with any type of body.
NewReportTestCaseResultRequest calls the generic ReportTestCaseResult builder with application/json body.
NewReportTestCaseResultRequestWithBody generates requests for ReportTestCaseResult with any type of body.
NewSearchSecretsRequest generates requests for SearchSecrets.
NewSearchServicesRequest generates requests for SearchServices.
NewStartImportJobRequest generates requests for StartImportJob.
NewStopImportJobRequest generates requests for StopImportJob.
NewUpdateImportJobRequest calls the generic UpdateImportJob builder with application/json body.
NewUpdateImportJobRequestWithBody generates requests for UpdateImportJob with any type of body.
NewUpdateSecretRequest calls the generic UpdateSecret builder with application/json body.
NewUpdateSecretRequestWithBody generates requests for UpdateSecret with any type of body.
NewUpdateServiceMetadataRequest calls the generic UpdateServiceMetadata builder with application/json body.
NewUpdateServiceMetadataRequestWithBody generates requests for UpdateServiceMetadata with any type of body.
NewUploadArtifactRequestWithBody generates requests for UploadArtifact with any type of body.
ParseActivateImportJobResponse parses an HTTP response from a ActivateImportJobWithResponse call.
ParseCreateImportJobResponse parses an HTTP response from a CreateImportJobWithResponse call.
ParseCreateSecretResponse parses an HTTP response from a CreateSecretWithResponse call.
ParseCreateTestResponse parses an HTTP response from a CreateTestWithResponse call.
ParseDeleteImportJobResponse parses an HTTP response from a DeleteImportJobWithResponse call.
ParseDeleteSecretResponse parses an HTTP response from a DeleteSecretWithResponse call.
ParseDeleteServiceResponse parses an HTTP response from a DeleteServiceWithResponse call.
ParseDownloadArtifactResponse parses an HTTP response from a DownloadArtifactWithResponse call.
ParseExportSnapshotResponse parses an HTTP response from a ExportSnapshotWithResponse call.
ParseGetAggregatedInvocationsStatsResponse parses an HTTP response from a GetAggregatedInvocationsStatsWithResponse call.
ParseGetConformanceMetricsAggregationResponse parses an HTTP response from a GetConformanceMetricsAggregationWithResponse call.
ParseGetEventsByTestCaseResponse parses an HTTP response from a GetEventsByTestCaseWithResponse call.
ParseGetFeaturesConfigResponse parses an HTTP response from a GetFeaturesConfigWithResponse call.
ParseGetImportJobCounterResponse parses an HTTP response from a GetImportJobCounterWithResponse call.
ParseGetImportJobResponse parses an HTTP response from a GetImportJobWithResponse call.
ParseGetImportJobsResponse parses an HTTP response from a GetImportJobsWithResponse call.
ParseGetInvocationStatsByServiceResponse parses an HTTP response from a GetInvocationStatsByServiceWithResponse call.
ParseGetKeycloakConfigResponse parses an HTTP response from a GetKeycloakConfigWithResponse call.
ParseGetLatestAggregatedInvocationsStatsResponse parses an HTTP response from a GetLatestAggregatedInvocationsStatsWithResponse call.
ParseGetLatestTestResultsResponse parses an HTTP response from a GetLatestTestResultsWithResponse call.
ParseGetMessagesByTestCaseResponse parses an HTTP response from a GetMessagesByTestCaseWithResponse call.
ParseGetResourceResponse parses an HTTP response from a GetResourceWithResponse call.
ParseGetResourcesByServiceResponse parses an HTTP response from a GetResourcesByServiceWithResponse call.
ParseGetSecretResponse parses an HTTP response from a GetSecretWithResponse call.
ParseGetSecretsCounterResponse parses an HTTP response from a GetSecretsCounterWithResponse call.
ParseGetSecretsResponse parses an HTTP response from a GetSecretsWithResponse call.
ParseGetServiceResponse parses an HTTP response from a GetServiceWithResponse call.
ParseGetServicesCounterResponse parses an HTTP response from a GetServicesCounterWithResponse call.
ParseGetServicesLabelsResponse parses an HTTP response from a GetServicesLabelsWithResponse call.
ParseGetServicesResponse parses an HTTP response from a GetServicesWithResponse call.
ParseGetServiceTestConformanceMetricResponse parses an HTTP response from a GetServiceTestConformanceMetricWithResponse call.
ParseGetTestResultResponse parses an HTTP response from a GetTestResultWithResponse call.
ParseGetTestResultsByServiceCounterResponse parses an HTTP response from a GetTestResultsByServiceCounterWithResponse call.
ParseGetTestResultsByServiceResponse parses an HTTP response from a GetTestResultsByServiceWithResponse call.
ParseGetTopIvnocationsStatsByDayResponse parses an HTTP response from a GetTopIvnocationsStatsByDayWithResponse call.
ParseImportSnapshotResponse parses an HTTP response from a ImportSnapshotWithResponse call.
ParseOverrideServiceOperationResponse parses an HTTP response from a OverrideServiceOperationWithResponse call.
ParseReportTestCaseResultResponse parses an HTTP response from a ReportTestCaseResultWithResponse call.
ParseSearchSecretsResponse parses an HTTP response from a SearchSecretsWithResponse call.
ParseSearchServicesResponse parses an HTTP response from a SearchServicesWithResponse call.
ParseStartImportJobResponse parses an HTTP response from a StartImportJobWithResponse call.
ParseStopImportJobResponse parses an HTTP response from a StopImportJobWithResponse call.
ParseUpdateImportJobResponse parses an HTTP response from a UpdateImportJobWithResponse call.
ParseUpdateSecretResponse parses an HTTP response from a UpdateSecretWithResponse call.
ParseUpdateServiceMetadataResponse parses an HTTP response from a UpdateServiceMetadataWithResponse call.
ParseUploadArtifactResponse parses an HTTP response from a UploadArtifactWithResponse call.
WithBaseURL overrides the baseURL.
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client.
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request.
# Constants
Defines values for AbstractExchangeType.
Defines values for AbstractExchangeType.
Defines values for BindingType.
Defines values for OAuth2GrantType.
Defines values for Trend.
Defines values for ServiceType.
Defines values for ServiceType.
Defines values for ServiceType.
Defines values for BindingType.
Defines values for ServiceType.
Defines values for ServiceType.
No description provided by the author
Defines values for BindingType.
Defines values for Trend.
Defines values for Trend.
Defines values for BindingType.
Defines values for BindingType.
Defines values for ParameterConstraintIn.
Defines values for ParameterConstraintIn.
Defines values for ParameterConstraintIn.
Defines values for OAuth2GrantType.
Defines values for OAuth2GrantType.
Defines values for UnidirectionalEventType.
Defines values for RequestResponsePairType.
Defines values for RequestResponsePairType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ResourceType.
Defines values for ServiceType.
Defines values for ServiceType.
Defines values for Trend.
Defines values for TestRunnerType.
Defines values for TestRunnerType.
Defines values for TestRunnerType.
Defines values for TestRunnerType.
Defines values for TestRunnerType.
Defines values for TestRunnerType.
Defines values for TestRunnerType.
Defines values for TestRunnerType.
Defines values for UnidirectionalEventType.
Defines values for Trend.
Defines values for BindingType.
# Structs
AbstractExchange Abstract bean representing a Service or API Exchange.
No description provided by the author
ArtifactDownload Artifact Download specification to be imported by Microcks.
ArtifactUpload Artifact to be imported by Microcks.
Binding Protocol binding details for asynchronous operations.
Client which conforms to the OpenAPI3 specification for this service.
ClientWithResponses builds on ClientInterface to offer response payloads.
Counter A simple Counter type.
No description provided by the author
No description provided by the author
No description provided by the author
DailyInvocationStatistic The daily statistic of a service mock invocations.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EventMessage defines model for EventMessage.
Exchange Abstract representation of a Service or API exchange type (request/response, event based, ...).
ExportSnapshotParams defines parameters for ExportSnapshot.
No description provided by the author
GetAggregatedInvocationsStatsParams defines parameters for GetAggregatedInvocationsStats.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetImportJobsParams defines parameters for GetImportJobs.
No description provided by the author
GetInvocationStatsByServiceParams defines parameters for GetInvocationStatsByService.
No description provided by the author
No description provided by the author
GetLatestAggregatedInvocationsStatsParams defines parameters for GetLatestAggregatedInvocationsStats.
No description provided by the author
GetLatestTestResultsParams defines parameters for GetLatestTestResults.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetSecretsParams defines parameters for GetSecrets.
No description provided by the author
GetServiceParams defines parameters for GetService.
No description provided by the author
No description provided by the author
No description provided by the author
GetServicesParams defines parameters for GetServices.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetTopIvnocationsStatsByDayParams defines parameters for GetTopIvnocationsStatsByDay.
No description provided by the author
Header Transport headers for both Requests and Responses.
HeaderDTO Data Transfert Object for headers of both Requests and Responses.
ImportJob An ImportJob allow defining a repository artifact to poll for discovering Services and APIs mocks and tests.
No description provided by the author
KeycloakConfig Representation of Keycloak / SSO configuration used by Microcks server.
Metadata Commodity object for holding metadata on any entity.
OAuth2AuthorizedClient OAuth2 authorized client that performed a test.
OAuth2ClientContent Represents a volatile OAuth2 client context usually associated with a Test request.
Operation An Operation of a Service or API.
OperationOverrideDTO Data Transfer object for grouping the mutable properties of an Operation.
OverrideServiceOperationParams defines parameters for OverrideServiceOperation.
No description provided by the author
ParameterConstraint Companion object for Operation that may be used to express constraints on request parameters.
No description provided by the author
Request A mock invocation or test request.
RequestResponsePair defines model for RequestResponsePair.
Resource Resource represents a Service or API artifacts such as specification, contract.
Response A mock invocation or test response.
SearchSecretsParams defines parameters for SearchSecrets.
No description provided by the author
SearchServicesParams defines parameters for SearchServices.
No description provided by the author
Secret A Secret allows grouping informations on how to access a restricted resource such as a repsoitory URL.
SecretRef Lightweight reference for an existing Secret.
Service Represents a Service or API definition as registred into Microcks repository.
ServiceRef Lightweight reference of an existing Service.
ServiceResponse defines model for ServiceResponse.
ServiceView Aggregate bean for grouping a Service an its messages pairs.
SnapshotUpload Upload of a repository snapshot file.
No description provided by the author
No description provided by the author
TestCaseResult Companion objects for TestResult.
TestCaseReturnDTO defines model for TestCaseReturnDTO.
TestConformanceMetric Represents the test conformance metrics (current score, history and evolution trend) of a Service.
TestRequest Test request is a minimalist wrapper for requesting the launch of a new test.
TestResult Represents the result of a Service or API test run by Microcks.
TestResultSummary Represents the summary result of a Service or API test run by Microcks.
TestStepResult TestStepResult is an entity embedded within TestCaseResult.
UnidirectionalEvent defines model for UnidirectionalEvent.
No description provided by the author
No description provided by the author
No description provided by the author
UploadArtifactParams defines parameters for UploadArtifact.
No description provided by the author
WeightedMetricValue Value of a metric with an associated weight.
# Interfaces
The interface specification for the client above.
ClientWithResponsesInterface is the interface specification for the client with responses above.
Doer performs HTTP requests.
# Type aliases
AbstractExchangeType Discriminant type for identifying kind of exchange.
BindingType Protocol binding identifier.
ClientOption allows setting custom parameters during construction.
CounterMap A generic map of counter.
CreateImportJobJSONRequestBody defines body for CreateImportJob for application/json ContentType.
CreateSecretJSONRequestBody defines body for CreateSecret for application/json ContentType.
CreateTestJSONRequestBody defines body for CreateTest for application/json ContentType.
DownloadArtifactFormdataRequestBody defines body for DownloadArtifact for application/x-www-form-urlencoded ContentType.
ImportSnapshotMultipartRequestBody defines body for ImportSnapshot for multipart/form-data ContentType.
LabelsMap A map which keys are already used labels keys and values are already used values for this key.
MessageArray Array of Message for Service operations.
OAuth2GrantType Enumeration for the different supported grants/flows of OAuth2.
OperationHeaders Specification of additional headers for a Service/API operations.
OverrideServiceOperationJSONRequestBody defines body for OverrideServiceOperation for application/json ContentType.
ParameterConstraintIn Parameter location.
ReportTestCaseResultJSONRequestBody defines body for ReportTestCaseResult for application/json ContentType.
RequestEditorFn is the function signature for the RequestEditor callback function.
RequestResponsePairType Discriminant type for identifying kind of exchange.
ResourceType Types of managed resources for Services or APIs.
ServiceType Service or API Type.
StringArray A simple array of String.
TestRunnerType Type of test strategy (different strategies are implemented by different runners).
Trend Evolution trend qualifier.
UnidirectionalEventType Discriminant type for identifying kind of exchange.
UpdateImportJobJSONRequestBody defines body for UpdateImportJob for application/json ContentType.
UpdateSecretJSONRequestBody defines body for UpdateSecret for application/json ContentType.
UpdateServiceMetadataJSONRequestBody defines body for UpdateServiceMetadata for application/json ContentType.
UploadArtifactMultipartRequestBody defines body for UploadArtifact for multipart/form-data ContentType.