utils

package
v0.0.0-...-8c7407d Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoHTTPRequest

func DoHTTPRequest(request *http.Request, skipSslVerification bool) (*http.Response, error)

DoHTTPRequest makes an HTTP request with timeout

Types

type RequestBuilder

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

RequestBuilder builds Zally specific requests

func NewRequestBuilder

func NewRequestBuilder(baseURL string, token string, app *cli.App) *RequestBuilder

NewRequestBuilder creates an instance of RequestBuilder

func (*RequestBuilder) Build

func (r *RequestBuilder) Build(httpVerb string, uri string, body io.Reader) (*http.Request, error)

Build creates HTTP request

type ResultPrinter

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

ResultPrinter helps to print results to the CLI

func NewResultPrinter

func NewResultPrinter(buffer io.Writer, formatter formatters.Formatter) ResultPrinter

NewResultPrinter creates an instance of ResultPrinter

func (*ResultPrinter) PrintRules

func (r *ResultPrinter) PrintRules(rules *domain.Rules)

PrintRules prints a list of supported rules

func (*ResultPrinter) PrintViolations

func (r *ResultPrinter) PrintViolations(violations *domain.Violations)

PrintViolations creates string representation of Violation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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