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

client

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = time.Second * 25
)

Variables

View Source
var ErrInsecure = errors.New("this client connection is insecure")

Functions

func NewHTTPClient

func NewHTTPClient(timeout time.Duration) *http.Client

NewHTTPClient returns a more appropriate HTTP client as opposed the default provided by `net/http`

func NewHTTPClientWithTransport

func NewHTTPClientWithTransport(timeout time.Duration, transport *http.Transport) *http.Client

NewHTTPClientWithTransport returns a more appropriate HTTP client as opposed the default provided by `net/http`

func NewHTTPClientWithoutProxy added in v1.7.6

func NewHTTPClientWithoutProxy(timeout time.Duration) *http.Client

NewHTTPClientWithoutProxy returns a HTTP client without Proxy. Use it when you would like to skip proxy setting for some requests (e.g. version checks)

func NewService

func NewService(host, wsHost string, conn *Connection) service

func ResultWriter

func ResultWriter(w io.Writer, results []TestCase)

ResultWriter writes testcase results to a writer

Types

type Connection

type Connection struct {
	*http.Client
}

func NewConnection

func NewConnection() (*Connection, error)

type Service

type Service interface {
	Version() (VersionResponse, error)
	Run(discoveryFile, configFile, exportConfig string) ([]TestCase, error)
}

Service is a gateway to backend services provided by FCS

type TestCase

type TestCase struct {
	Id   string `json:"id"`
	Pass bool   `json:"pass"`
	Fail string `json:"fail,omitempty"`
}

TestCase result for a run

type TestCaseResult

type TestCaseResult struct {
	Type string   `json:"type"`
	Test TestCase `json:"test"`
}

type VersionResponse

type VersionResponse struct {
	Version string `json:"version"`
	Message string `json:"message"`
	Update  bool   `json:"update"`
}

Jump to

Keyboard shortcuts

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