client

package
v0.0.0-...-ee38f14 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetEnv = os.Getenv
)

Functions

func ExecuteTemplate

func ExecuteTemplate(key string, tmplStr string, variables map[string]string) (string, error)

func LoadTemplate

func LoadTemplate(key string, tmplStr string) (*template.Template, error)

func UseEnvFile

func UseEnvFile(path string) error

func UseMap

func UseMap(variables map[string]string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) Run

func (c *Client) Run(req *data.Request, variables map[string]string) (*Response, error)

type Response

type Response struct {
	StatusCode int
	Body       string
	Headers    http.Header

	CalledURL string
	Time      time.Duration
}

Jump to

Keyboard shortcuts

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