api

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRequest

func GetRequest(context APIContext, path string, headers map[string]string, params []QueryParam) (*APIResponse, *APIError)

func PerformRequest

func PerformRequest(context APIContext, req *http.Request) (*APIResponse, *APIError)

Types

type APIContext

type APIContext struct {
	Host      string
	APIKey    string
	VerifyTLS bool
}

type APIError

type APIError struct {
	Err     error
	Message string
}

func GetSecrets

func GetSecrets(context APIContext, lastETag string, project string, config string, nameTransformer string, format string, secrets []string) (*models.SecretsResult, *APIError)

func (*APIError) Error

func (e *APIError) Error() string

type APIResponse

type APIResponse struct {
	HTTPResponse *http.Response
	Body         []byte
}

type ErrorResponse

type ErrorResponse struct {
	Messages []string
	Success  bool
}

type QueryParam

type QueryParam struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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