ssllabs

package module
v0.0.0-...-30d12df Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 13 Imported by: 0

README

ssllabs

Qualys SSL Labs client for Go. The use of this client is subject to https://www.ssllabs.com/about/terms.html

Documentation

Overview

Package ssllabs provides API access on Qualys SSL Labs. The use of this client is subject to https://www.ssllabs.com/about/terms.html

Index

Constants

View Source
const (
	TrustStoreMozilla = "1"
	TrustStoreMacOS   = "2"
	TrustStoreAndroid = "3"
	TrustStoreJava    = "4"
	TrustStoreWindows = "5"
)
View Source
const (
	// Base string for API endpoints
	BaseURL = "https://api.ssllabs.com/api/v3"
	// Base string for beta API endpoints
	BaseURLDev = "https://api.dev.ssllabs.com/api/v3"
)

Variables

This section is empty.

Functions

func OptionBaseURL

func OptionBaseURL(baseURL string) func(*Client)

OptionBaseURL is the functional option to change the base URL for API access

Types

type Cert

type Cert struct {
	Name        string
	Subject     map[string]string
	KeyType     string
	KeyLength   uint
	NotBefore   time.Time
	NotAfter    time.Time
	Certificate string
}

type Certs

type Certs struct {
	TrustStore string
	List       []Cert
}

type Client

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

Client is the ssllabs client for API access

func New

func New(options ...Option) (*Client, error)

New creates a ssllabs client with given options.

func (*Client) GetRootCertsRaw

func (c *Client) GetRootCertsRaw(trustStore string) (*Certs, *http.Response, error)

func (*Client) GetStatusCodes

func (c *Client) GetStatusCodes() (*StatusCodes, *http.Response, error)

GetStatusCodes is interface to /getStatusCodes

func (*Client) Info

func (c *Client) Info() (*Info, *http.Response, error)

Info is interface to /info

type Info

type Info struct {
	EngineVersion        string   `json:"engineVersion"`
	CriteriaVersion      string   `json:"criteriaVersion"`
	MaxAssessments       int      `json:"maxAssessments"`
	CurrentAssessments   int      `json:"currentAssessments"`
	NewAssessmentCoolOff int      `json:"newAssessmentCoolOff"`
	Messages             []string `json:"messages"`
}

type Option

type Option func(*Client)

type Param

type Param struct {
	Key   string
	Value string
}

Param is parameter for API call

type StatusCodes

type StatusCodes struct {
	StatusDetails map[string]string `json:"statusDetails"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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