api

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERR_CONN_CREATE  = "Could not create connection with server, correct server details?"
	ERR_CONN_SILENCE = "No response from server, correct server details?"
	ERR_CONN_RES     = "Could not read response from server.."
	ERR_CONN_AUTH    = "Request is not authorized, do you have access or have authenticated?"
)

Variables

This section is empty.

Functions

func ClientAuthApiKeyGET

func ClientAuthApiKeyGET(r *config.Red_t, path, server, apikey string) ([]byte, int, error)

func ClientAuthBasicGET

func ClientAuthBasicGET(r *config.Red_t, path, server, username, password string) ([]byte, int, error)

func ClientGET

func ClientGET(r *config.Red_t, path string) ([]byte, int, error)

func ClientPOST

func ClientPOST(r *config.Red_t, path string, body []byte) ([]byte, int, error)

func ClientPUT

func ClientPUT(r *config.Red_t, path string, body []byte) ([]byte, int, error)

func StatusCode

func StatusCode(status int) error

Types

type ResponseError

type ResponseError struct {
	Errors []string `json:"errors"`
}

func ParseResponseError

func ParseResponseError(body []byte) ResponseError

Jump to

Keyboard shortcuts

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