api

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FeaturedProjectsOrganization = "organizations/1"

Functions

func ValidateURL

func ValidateURL(s string) error

Types

type APIClient

type APIClient struct {
	Server string
}

func (*APIClient) IsTokenValid

func (client *APIClient) IsTokenValid(token string) (bool, error)

func (*APIClient) ListProjects

func (client *APIClient) ListProjects(token string) ([]*Project, error)

func (*APIClient) StartRemoteFuzzingRun

func (client *APIClient) StartRemoteFuzzingRun(artifact *Artifact, token string) (string, error)

func (*APIClient) UploadBundle

func (client *APIClient) UploadBundle(path string, projectName string, token string) (*Artifact, error)

type APIError

type APIError struct {
	StatusCode int
	// contains filtered or unexported fields
}

APIError is returned when a REST request returns a status code other than 200 OK

func (APIError) Error

func (e APIError) Error() string

func (APIError) Format

func (e APIError) Format(s fmt.State, verb rune)

func (APIError) Unwrap

func (e APIError) Unwrap() error

type Artifact

type Artifact struct {
	DisplayName  string `json:"display-name"`
	ResourceName string `json:"resource-name"`
}

type Project

type Project struct {
	Name                  string `json:"name"`
	DisplayName           string `json:"display_name"`
	OwnerOrganizationName string `json:"owner_organization_name"`
}

Jump to

Keyboard shortcuts

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