Help us shape the future of Go! Take the 2026 Go Developer Survey

logzio_client

package module
v1.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 9 Imported by: 0

README

Logz.io Terraform client library

Client library for Logz.io API, see below for supported endpoints.

The primary purpose of this library is to act as the API interface for the logz.io Terraform provider. To use it, you'll need to create an API token and provide it to the client library along with your logz.io regional API server address.

The library currently supports the following API endpoints:

Contributing
  1. Clone this repo locally.
  2. As this package uses Go modules, make sure you are outside of $GOPATH or you have the GO111MODULE=on environment variable set. Then run go get to pull down the dependencies.
  3. Use logzio_client.CallLogzioApi when you need to make a Logz.io API call.
  4. Use structs to represent the requests/responses body, rather than maps.
  5. Sample responses for tests should be under testdata/fixtures.
Run tests

go test -v -race ./...

Trademark Disclaimer

Terraform is a trademark of HashiCorp, Inc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHttpHeaders

func AddHttpHeaders(apiToken string, req *http.Request)

func CallLogzioApi added in v1.9.0

func CallLogzioApi(logzioCall LogzioApiCallDetails) ([]byte, error)

func CheckValidStatus

func CheckValidStatus(response *http.Response, status []int) bool

func Contains

func Contains(slice []string, s string) bool

func CreateHttpRequest

func CreateHttpRequest(req *http.Request) (map[string]any, error)

func CreateHttpRequestBytesResponse added in v1.5.0

func CreateHttpRequestBytesResponse(req *http.Request) ([]byte, error)

Types

type LogzioApiCallDetails added in v1.9.0

type LogzioApiCallDetails struct {
	ApiToken     string
	HttpMethod   string
	Url          string
	Body         []byte
	SuccessCodes []int
	NotFoundCode int
	ResourceId   any
	ApiAction    string
	ResourceName string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL