# README
🔌 Microcks GO client
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/[email protected]
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
# 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.
NewExportSnapshotRequest generates requests for ExportSnapshot.
NewGetAggregatedInvocationsStatsRequest generates requests for GetAggregatedInvocationsStats.
NewGetConformanceMetricsAggregationRequest generates requests for GetConformanceMetricsAggregation.
NewGetEventsByTestCaseRequest generates requests for GetEventsByTestCase.
NewGetFeaturesConfigurationRequest generates requests for GetFeaturesConfiguration.
NewGetImportJobCounterRequest generates requests for GetImportJobCounter.
NewGetImportJobsRequest generates requests for GetImportJobs.
NewGetInvocationStatsByServiceRequest generates requests for GetInvocationStatsByService.
NewGetJobsIdRequest generates requests for GetJobsId.
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.
NewPostJobsIdRequest calls the generic PostJobsId builder with application/json body.
NewPostJobsIdRequestWithBody generates requests for PostJobsId 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.
NewSearchServicesRequest generates requests for SearchServices.
NewStartImportJobRequest generates requests for StartImportJob.
NewStopImportJobRequest generates requests for StopImportJob.
NewUpdateSecretRequest generates requests for UpdateSecret.
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.
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.
ParseGetFeaturesConfigurationResponse parses an HTTP response from a GetFeaturesConfigurationWithResponse call.
ParseGetImportJobCounterResponse parses an HTTP response from a GetImportJobCounterWithResponse call.
ParseGetImportJobsResponse parses an HTTP response from a GetImportJobsWithResponse call.
ParseGetInvocationStatsByServiceResponse parses an HTTP response from a GetInvocationStatsByServiceWithResponse call.
ParseGetJobsIdResponse parses an HTTP response from a GetJobsIdWithResponse 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.
ParsePostJobsIdResponse parses an HTTP response from a PostJobsIdWithResponse call.
ParseReportTestCaseResultResponse parses an HTTP response from a ReportTestCaseResultWithResponse 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.
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 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 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
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
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
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
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.
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
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.
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
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.
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.
OperationHeaders Specification of additional headers for a Service/API operations.
OverrideServiceOperationJSONRequestBody defines body for OverrideServiceOperation for application/json ContentType.
ParameterConstraintIn Parameter location.
PostJobsIdJSONRequestBody defines body for PostJobsId for application/json ContentType.
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.
UpdateServiceMetadataJSONRequestBody defines body for UpdateServiceMetadata for application/json ContentType.
UploadArtifactMultipartRequestBody defines body for UploadArtifact for multipart/form-data ContentType.