clientapi

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, a ...interface{})

Debug in color...

func EncodeContent

func EncodeContent(content *string) error

EncodeContent utility function to encode a folder's content as a tar.gz archive and return base64 encoded to be submitted as -content parameter

Types

type APIRequest

type APIRequest struct {
	AppRoleID       *string
	AppSecretID     *string // AppRole auth or Token
	Token           *string
	GoStintRole     *string
	JobJSON         *string // request can be whole JSON:
	QName           *string // or can be passed as parameters:
	ContainerImage  *string
	ImagePullPolicy *string
	Content         *string
	EntryPoint      *string
	Run             *string
	WorkingDir      *string
	EnvVars         *string
	SecretRefs      *string
	SecretFileType  *string
	ContOnWarnings  *bool
	URL             *string
	VaultURL        *string
}

APIRequest structure the job request passed to the client api

type GetResponse

type GetResponse struct {
	ID             string `json:"_id"`
	Status         string `json:"status"`
	NodeUUID       string `json:"node_uuid"`
	QName          string `json:"qname"`
	ContainerImage string `json:"container_image"`
	Submitted      string `json:"submitted"`
	Started        string `json:"started"`
	Ended          string `json:"ended"`
	Output         string `json:"output"`
	ReturnCode     int    `json:"return_code"`
}

GetResponse structure holds response from gostint job query

func GetJob

func GetJob(c *APIRequest, token string, ID string) (*GetResponse, error)

GetJob returns a job status from gostint

func RunJob

func RunJob(c *APIRequest, debugLogging bool, pollSecs int, waitFor bool) (*GetResponse, error)

RunJob to submit a job request to gostint api

func (*GetResponse) String

func (r *GetResponse) String() string

Jump to

Keyboard shortcuts

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