screwdriver

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	UpdateBuild(stats map[string]interface{}, buildID int, statusMessage string) error
	GetAPIURL() (string, error)
}

API interface definition

func New

func New(url, token string) (API, error)

New returns a new API object

type BuildUpdatePayload

type BuildUpdatePayload struct {
	Stats         map[string]interface{} `json:"stats"`
	StatusMessage string                 `json:"statusMessage,omitempty"`
}

BuildUpdatePayload structure definition

type SDAPI

type SDAPI struct {
	// contains filtered or unexported fields
}

SDAPI structure definition

func (SDAPI) GetAPIURL

func (a SDAPI) GetAPIURL() (string, error)

GetAPIURL function create a url for calling SD API

func (SDAPI) UpdateBuild

func (a SDAPI) UpdateBuild(stats map[string]interface{}, buildID int, statusMessage string) error

UpdateBuild function calls sd api to update build

type SDError

type SDError struct {
	StatusCode int    `json:"statusCode"`
	Reason     string `json:"error"`
	Message    string `json:"message"`
}

SDError structure definition

func (SDError) Error

func (e SDError) Error() string

Error fn to format error

type Token

type Token struct {
	Token string `json:"token"`
}

Token is a Screwdriver API token.

Jump to

Keyboard shortcuts

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