Categorygithub.com/ManoManoTech/finout
modulepackage
0.0.2
Repository: https://github.com/manomanotech/finout.git
Documentation: pkg.go.dev

# README

Introduction

This package allows you to quickly and easily use the Finout API via Go.

This package provides full support for all Finout API endpoints.

Installation

Install Package

go get github.com/ManoManoTech/finout

Dependencies

  • oapi-codegen, this package is basically the generated code from oapi-codegen for the forged Finout API spec.

Quick Start

Hello Finout

The following is the minimum needed code to call the Finout API.

package main

import (
    "context"
    "io"
    "log"
    "net/http"

    "github.com/ManoManoTech/finout"
)

func main() {
    client, err := finout.NewSecuredClientWithResponses("YOUR_CLIENT_ID", "YOUR_SECRET_KEY")
    if err != nil {
        log.Fatal(err)
    }

    resp, err := client.GetViewWithResponse(context.Background())
    if err != nil {
        log.Fatal(err)
    }

    if resp.StatusCode() == http.StatusOK {
        for _, view := range *resp.JSON200.Data {
            log.Println(*view.Id, *view.Name)
        }
    } else {
        log.Fatalf("Status code: %d", resp.StatusCode())
    }
}

Regenerate the client

If you need to regenerate the client, you can use the following command:

go generate

Documentation

If you need to check the spec, you can use the Swagger Editor with the spec in finout.yaml.

# Functions

Creates a new Client, with reasonable defaults.
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling.
NewDeleteVirtualTagsIdRequest generates requests for DeleteVirtualTagsId.
NewGetCostGuardScansRequest generates requests for GetCostGuardScans.
NewGetEndpointsRequest generates requests for GetEndpoints.
NewGetMegabillQueryLanguageKeysRequest generates requests for GetMegabillQueryLanguageKeys.
NewGetMegabillQueryLanguageValuesCostCenterKeyRequest generates requests for GetMegabillQueryLanguageValuesCostCenterKey.
NewGetViewRequest generates requests for GetView.
NewGetVirtualTagsIdRequest generates requests for GetVirtualTagsId.
NewGetVirtualTagsRequest generates requests for GetVirtualTags.
NewGetVirtualTagsVtagIdMetadataRequest generates requests for GetVirtualTagsVtagIdMetadata.
NewPostCostGuardScansRecommendationsRequest calls the generic PostCostGuardScansRecommendations builder with application/json body.
NewPostCostGuardScansRecommendationsRequestWithBody generates requests for PostCostGuardScansRecommendations with any type of body.
NewPostCostQueryByViewRequest calls the generic PostCostQueryByView builder with application/json body.
NewPostCostQueryByViewRequestWithBody generates requests for PostCostQueryByView with any type of body.
NewPostEndpointsRequest calls the generic PostEndpoints builder with application/json body.
NewPostEndpointsRequestWithBody generates requests for PostEndpoints with any type of body.
NewPostVirtualTagsRequest calls the generic PostVirtualTags builder with application/json body.
NewPostVirtualTagsRequestWithBody generates requests for PostVirtualTags with any type of body.
NewPutVirtualTagsIdRequest calls the generic PutVirtualTagsId builder with application/json body.
NewPutVirtualTagsIdRequestWithBody generates requests for PutVirtualTagsId with any type of body.
NewPutVirtualTagsVtagIdMetadataRequest calls the generic PutVirtualTagsVtagIdMetadata builder with application/json body.
NewPutVirtualTagsVtagIdMetadataRequestWithBody generates requests for PutVirtualTagsVtagIdMetadata with any type of body.
No description provided by the author
No description provided by the author
ParseDeleteVirtualTagsIdResponse parses an HTTP response from a DeleteVirtualTagsIdWithResponse call.
ParseGetCostGuardScansResponse parses an HTTP response from a GetCostGuardScansWithResponse call.
ParseGetEndpointsResponse parses an HTTP response from a GetEndpointsWithResponse call.
ParseGetMegabillQueryLanguageKeysResponse parses an HTTP response from a GetMegabillQueryLanguageKeysWithResponse call.
ParseGetMegabillQueryLanguageValuesCostCenterKeyResponse parses an HTTP response from a GetMegabillQueryLanguageValuesCostCenterKeyWithResponse call.
ParseGetViewResponse parses an HTTP response from a GetViewWithResponse call.
ParseGetVirtualTagsIdResponse parses an HTTP response from a GetVirtualTagsIdWithResponse call.
ParseGetVirtualTagsResponse parses an HTTP response from a GetVirtualTagsWithResponse call.
ParseGetVirtualTagsVtagIdMetadataResponse parses an HTTP response from a GetVirtualTagsVtagIdMetadataWithResponse call.
ParsePostCostGuardScansRecommendationsResponse parses an HTTP response from a PostCostGuardScansRecommendationsWithResponse call.
ParsePostCostQueryByViewResponse parses an HTTP response from a PostCostQueryByViewWithResponse call.
ParsePostEndpointsResponse parses an HTTP response from a PostEndpointsWithResponse call.
ParsePostVirtualTagsResponse parses an HTTP response from a PostVirtualTagsWithResponse call.
ParsePutVirtualTagsIdResponse parses an HTTP response from a PutVirtualTagsIdWithResponse call.
ParsePutVirtualTagsVtagIdMetadataResponse parses an HTTP response from a PutVirtualTagsVtagIdMetadataWithResponse 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 QueryByViewRequestCostType.
Defines values for QueryByViewRequestCostType.
No description provided by the author
No description provided by the author
Defines values for QueryByViewRequestCostType.
Defines values for QueryByViewRequestCostType.
No description provided by the author
Defines values for QueryByViewRequestCostType.

# Structs

Client which conforms to the OpenAPI3 specification for this service.
ClientWithResponses builds on ClientInterface to offer response payloads.
CreateEndpointRequest defines model for CreateEndpointRequest.
CreateEndpointResponse defines model for CreateEndpointResponse.
CreateVirtualTagRequest defines model for CreateVirtualTagRequest.
CreateVirtualTagResponse defines model for CreateVirtualTagResponse.
No description provided by the author
No description provided by the author
GetEndpoints defines model for GetEndpoints.
No description provided by the author
GetKeysResponse defines model for GetKeysResponse.
No description provided by the author
No description provided by the author
GetScansResponse defines model for GetScansResponse.
GetValuesResponse defines model for GetValuesResponse.
No description provided by the author
GetViewsResponse defines model for GetViewsResponse.
GetVirtualTagMetadataResponse defines model for GetVirtualTagMetadataResponse.
GetVirtualTagResponse defines model for GetVirtualTagResponse.
GetVirtualTags defines model for GetVirtualTags.
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
No description provided by the author
No description provided by the author
No description provided by the author
QueryByViewRequest defines model for QueryByViewRequest.
QueryByViewResponse defines model for QueryByViewResponse.
ScanRecommendationsRequest defines model for ScanRecommendationsRequest.
ScanRecommendationsResponse defines model for ScanRecommendationsResponse.
UpdateVirtualTagMetadataResponse defines model for UpdateVirtualTagMetadataResponse.
UpdateVirtualTagRequest defines model for UpdateVirtualTagRequest.
UpdateVirtualTagResponse defines model for UpdateVirtualTagResponse.

# 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

ClientOption allows setting custom parameters during construction.
PostCostGuardScansRecommendationsJSONRequestBody defines body for PostCostGuardScansRecommendations for application/json ContentType.
PostCostQueryByViewJSONRequestBody defines body for PostCostQueryByView for application/json ContentType.
PostEndpointsJSONRequestBody defines body for PostEndpoints for application/json ContentType.
PostVirtualTagsJSONRequestBody defines body for PostVirtualTags for application/json ContentType.
PutVirtualTagsIdJSONRequestBody defines body for PutVirtualTagsId for application/json ContentType.
PutVirtualTagsVtagIdMetadataJSONRequestBody defines body for PutVirtualTagsVtagIdMetadata for application/json ContentType.
QueryByViewRequestCostType defines model for QueryByViewRequest.CostType.
RequestEditorFn is the function signature for the RequestEditor callback function.
UpdateVirtualTagMetadataRequest defines model for UpdateVirtualTagMetadataRequest.