Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Frameworks(ctx context.Context) ([]framework.Framework, error)
- func (c *Client) GetSlackToken(ctx context.Context) (string, error)
- func (c *Client) Search(ctx context.Context, opts framework.SearchOptions) (framework.Metadata, error)
- func (c *Client) StartJob(ctx context.Context, opts job.StartOptions) (jobID string, isRDC bool, err error)
- func (c *Client) UploadAsset(jobID string, fileName string, contentType string, content []byte) error
- func (c *Client) Versions(ctx context.Context, frameworkName string) ([]framework.Metadata, error)
- type FrameworkResponse
- type Job
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrServerError is returned when the server was not able to correctly handle our request (status code >= 500). ErrServerError = errors.New("internal server error") // ErrJobNotFound is returned when the requested job was not found. ErrJobNotFound = errors.New("job was not found") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HTTPClient *http.Client URL string // e.g.) https://api.<region>.saucelabs.net Credentials credentials.Credentials }
Client service
func (*Client) Frameworks ¶ added in v0.49.0
Frameworks returns the list of available frameworks.
func (*Client) GetSlackToken ¶ added in v0.66.0
GetSlackToken gets slack token.
func (*Client) Search ¶ added in v0.30.0
func (c *Client) Search(ctx context.Context, opts framework.SearchOptions) (framework.Metadata, error)
Search returns metadata for the given search options opts.
func (*Client) StartJob ¶
func (c *Client) StartJob(ctx context.Context, opts job.StartOptions) (jobID string, isRDC bool, err error)
StartJob creates a new job in Sauce Labs.
type FrameworkResponse ¶ added in v0.27.0
type FrameworkResponse struct { Name string `json:"name"` Version string `json:"version"` Runner runner `json:"runner"` Platforms []platform `json:"platforms"` }
FrameworkResponse represents the response body for framework information.
type TokenResponse ¶ added in v0.66.0
type TokenResponse struct {
Token string `json:"token"`
}
TokenResponse represents the response body for slack token.
Click to show internal directories.
Click to hide internal directories.