api

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2017 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient  *http.Client
	APIEndpoint string
	JWT         string
	UserAgent   string
}

Client represents the API client

func NewClient

func NewClient(apiEndpoint string, jwtToken string) *Client

NewClient returns a new initialized API client

func (*Client) Har

func (c *Client) Har(file string) (string, error)

Har converts the given HAR archive file into a StormForger test case definition

func (*Client) Login added in v0.0.2

func (c *Client) Login(email string, password string) (string, error)

Login acquires a JWT access token for the given email/password

func (*Client) Ping

func (c *Client) Ping() (bool, error)

Ping performs an authenticated ping to check if the API is working and the user is properly authenticated.

FIXME would be nice to return a struct

where we see the status and in case of
success also the email address of the
authenticated user (useful) to check
if we are authenticated as the correct user

func (*Client) TestRunCallLog added in v0.2.0

func (c *Client) TestRunCallLog(pathID string, preview bool) (io.ReadCloser, error)

TestRunCallLog will download the first 10k lines of the test run's call log

Jump to

Keyboard shortcuts

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