client

package
v0.0.0-...-9bcc1a1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PerfRepoClient

type PerfRepoClient struct {
	Client *http.Client
	URL    string
	Auth   string
}

PerfRepoClient has methods for communicating with a remote PerfRepo instance via REST interface

func NewClient

func NewClient(url, username, password string) *PerfRepoClient

NewClient creates a new PerfRepoClient

func NewSecuredClient

func NewSecuredClient(url, username, password, caFile string) (*PerfRepoClient, error)

NewSecuredClient creates a new PerfRepoClient vith CA (certification authority) setup for TLS.

func (*PerfRepoClient) AddMetric

func (c *PerfRepoClient) AddMetric(testID int64, metric *apis.Metric) (id int64, err error)

AddMetric adds a new Metric to an existing Test. Returns the ID of the Metric or returns 0 when there was an error.

func (*PerfRepoClient) CreateAttachment

func (c *PerfRepoClient) CreateAttachment(testExecutionID int64, attachment apis.Attachment) (int64, error)

CreateAttachment creates a new attachment for a TestExecution identified by its ID. Returns an ID of the attachment itself or error when the operation failed

func (*PerfRepoClient) CreateReport

func (c *PerfRepoClient) CreateReport(report *apis.Report) (id int64, err error)

CreateReport creates a new Report object in PerfRepo. Returns the ID of the Report record in database or returns 0 when there was an error.

func (*PerfRepoClient) CreateReportPermission

func (c *PerfRepoClient) CreateReportPermission(permission *apis.Permission) error

CreateReportPermission adds a new permission to an existing report. Returns nil if the operation was successful.

func (*PerfRepoClient) CreateTest

func (c *PerfRepoClient) CreateTest(test *apis.Test) (id int64, err error)

CreateTest creates a new Test object in PerfRepo with subobjects. Returns the ID of the Test record in database or returns 0 when there was an error.

func (*PerfRepoClient) CreateTestExecution

func (c *PerfRepoClient) CreateTestExecution(testExec *apis.TestExecution) (id int64, err error)

CreateTestExecution creates a new TestExecution object in PerfRepo with subobjects. Returns the ID of the TestExecution record in database or 0 in the event of error

func (*PerfRepoClient) DeleteReport

func (c *PerfRepoClient) DeleteReport(id int64) error

DeleteReport deletes the given Report from the PerfRepo database. Returns nil when the request succeeds.

func (*PerfRepoClient) DeleteReportPermission

func (c *PerfRepoClient) DeleteReportPermission(permission *apis.Permission) error

DeleteReportPermission deletes the given permission from the PerfRepo database. Returns nil when the request succeeds

func (*PerfRepoClient) DeleteTest

func (c *PerfRepoClient) DeleteTest(id int64) error

DeleteTest deletes the given test from the PerfRepo database. Returns nil when the request succeeds.

func (*PerfRepoClient) DeleteTestExecution

func (c *PerfRepoClient) DeleteTestExecution(id int64) error

DeleteTestExecution deletes the given test execution from the PerfRepo database. Returns nil when the request succeeds.

func (*PerfRepoClient) GetAttachment

func (c *PerfRepoClient) GetAttachment(id int64) (*apis.Attachment, error)

GetAttachment returns an existing attachment with given ID or error when the operation failed.

func (*PerfRepoClient) GetMetric

func (c *PerfRepoClient) GetMetric(id int64) (*apis.Metric, error)

GetMetric returns an existing Metric by its identifier or nil if there's an error

func (*PerfRepoClient) GetReport

func (c *PerfRepoClient) GetReport(id int64) (*apis.Report, error)

GetReport returns an existing Report by its identifier or nil if there's an error

func (*PerfRepoClient) GetServerVersion

func (c *PerfRepoClient) GetServerVersion() (string, error)

GetServerVersion returns the server version

func (*PerfRepoClient) GetTest

func (c *PerfRepoClient) GetTest(id int64) (*apis.Test, error)

GetTest returns an existing test by its identifier or nil if there's an error

func (*PerfRepoClient) GetTestByUID

func (c *PerfRepoClient) GetTestByUID(uid string) (*apis.Test, error)

GetTestByUID returns an existing test by UID identifier or nil if there's an error

func (*PerfRepoClient) GetTestExecution

func (c *PerfRepoClient) GetTestExecution(id int64) (*apis.TestExecution, error)

GetTestExecution returns an existing test execution by its identifier or nil if there's an error

func (*PerfRepoClient) SearchTestExecutions

func (c *PerfRepoClient) SearchTestExecutions(criteria *apis.TestExecutionSearch) ([]apis.TestExecution, error)

SearchTestExecutions searches for test executions based on criteria passed as the argument.

func (*PerfRepoClient) UpdateReport

func (c *PerfRepoClient) UpdateReport(report *apis.Report) (id int64, err error)

UpdateReport updates existing Report in PerfRepo. Returns the ID of the Report record in database or returns 0 when there was an error.

func (*PerfRepoClient) UpdateTestExecution

func (c *PerfRepoClient) UpdateTestExecution(testExec *apis.TestExecution) (id int64, err error)

UpdateTestExecution updates a given TestExecution object in PerfRepo. Returns the ID of the TestExecution record in database or 0 in the event of error

Jump to

Keyboard shortcuts

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