https://github.com/ionos-cloud/sdk-go-logging
https://github.com/ionos-cloud/sdk-go-logging
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ionos-cloud/sdk-go-logging
- Owner: ionos-cloud
- License: apache-2.0
- Created: 2023-06-08T08:38:58.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-09T14:50:21.000Z (7 months ago)
- Last Synced: 2024-12-26T08:27:29.052Z (4 months ago)
- Size: 136 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go API client for ionoscloud
The logging service offers a centralized platform to collect and store logs from various systems and applications. It includes tools to search, filter, visualize, and create alerts based on your log data.
This API provides programmatic control over logging pipelines, enabling you to create new pipelines or modify existing ones. It mirrors the functionality of the DCD visual tool, ensuring a consistent experience regardless of your chosen interface.
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.- API version: 0.0.1
- Package version: 1.2.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen## Installation
Install the following dependencies:
```shell
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
```Put the package under your project folder and add the following in import:
```golang
import ionoscloud "github.com/ionos-cloud/sdk-go-logging"
```To use a proxy, set the environment variable `HTTP_PROXY`:
```golang
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```## Configuration of Server URL
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
### Select Server Configuration
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerIndex, 1)
```### Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```Note, enum values are always validated and all unused variables are silently ignored.
## Documentation for API Endpoints
All URIs are relative to *https://logging.de-txl.ionos.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CentralApi* | [**CentralLoggingGet**](docs/api/CentralApi.md#centralloggingget) | **Get** /central | Gets the central logging properties.
*CentralApi* | [**CentralLoggingToggle**](docs/api/CentralApi.md#centralloggingtoggle) | **Put** /central | Toggles the central logging.
*PipelinesApi* | [**PipelinesDelete**](docs/api/PipelinesApi.md#pipelinesdelete) | **Delete** /pipelines/{pipelineId} | Delete a pipeline
*PipelinesApi* | [**PipelinesFindById**](docs/api/PipelinesApi.md#pipelinesfindbyid) | **Get** /pipelines/{pipelineId} | Fetch a pipeline
*PipelinesApi* | [**PipelinesGet**](docs/api/PipelinesApi.md#pipelinesget) | **Get** /pipelines | List pipelines
*PipelinesApi* | [**PipelinesKeyPost**](docs/api/PipelinesApi.md#pipelineskeypost) | **Post** /pipelines/{pipelineId}/key | Renews the key of a Pipeline
*PipelinesApi* | [**PipelinesPatch**](docs/api/PipelinesApi.md#pipelinespatch) | **Patch** /pipelines/{pipelineId} | Patch a pipeline
*PipelinesApi* | [**PipelinesPost**](docs/api/PipelinesApi.md#pipelinespost) | **Post** /pipelines | Create a pipeline## Documentation For Models
- [CentralLoggingResponse](docs/models/CentralLoggingResponse.md)
- [CentralLoggingResponseMetadata](docs/models/CentralLoggingResponseMetadata.md)
- [CentralLoggingResponseProperties](docs/models/CentralLoggingResponseProperties.md)
- [CentralLoggingToggle](docs/models/CentralLoggingToggle.md)
- [CentralLoggingToggleProperties](docs/models/CentralLoggingToggleProperties.md)
- [DeletedMetadata](docs/models/DeletedMetadata.md)
- [DeletedMetadataAllOf](docs/models/DeletedMetadataAllOf.md)
- [DeletedPipeline](docs/models/DeletedPipeline.md)
- [Destination](docs/models/Destination.md)
- [ErrorMessage](docs/models/ErrorMessage.md)
- [ErrorResponse](docs/models/ErrorResponse.md)
- [Metadata](docs/models/Metadata.md)
- [Pipeline](docs/models/Pipeline.md)
- [PipelineCreate](docs/models/PipelineCreate.md)
- [PipelineCreateProperties](docs/models/PipelineCreateProperties.md)
- [PipelineCreatePropertiesLogs](docs/models/PipelineCreatePropertiesLogs.md)
- [PipelineListResponse](docs/models/PipelineListResponse.md)
- [PipelinePatch](docs/models/PipelinePatch.md)
- [PipelinePatchProperties](docs/models/PipelinePatchProperties.md)
- [PipelineProperties](docs/models/PipelineProperties.md)
- [PipelineResponse](docs/models/PipelineResponse.md)
- [PipelineResponseAllOf](docs/models/PipelineResponseAllOf.md)
- [PipelineResponseAllOf1](docs/models/PipelineResponseAllOf1.md)
- [PipelinesKeyPost200Response](docs/models/PipelinesKeyPost200Response.md)
- [Processor](docs/models/Processor.md)
- [ProvisioningMetadata](docs/models/ProvisioningMetadata.md)
- [ProvisioningMetadataAllOf](docs/models/ProvisioningMetadataAllOf.md)
- [ProvisioningPipeline](docs/models/ProvisioningPipeline.md)## Documentation For Authorization
Authentication schemes defined for the API:
### tokenAuth- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP headerNote, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request.
Example
```golang
auth := context.WithValue(
context.Background(),
sw.ContextAPIKeys,
map[string]sw.APIKey{
"Authorization": {Key: "API_KEY_STRING"},
},
)
r, err := client.Service.Operation(auth, args)
```## Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains
a number of utility functions to easily obtain pointers to values of basic types.
Each of these functions takes a value of the given basic type and returns a pointer to it:* `PtrBool`
* `PtrInt`
* `PtrInt32`
* `PtrInt64`
* `PtrFloat`
* `PtrFloat32`
* `PtrFloat64`
* `PtrString`
* `PtrTime`## Author