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 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"`
            }