api

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_SERVER_RETURN_NOT_200  = "server returned an error"
	ERROR_FAILED_TO_FETCH        = "failed to fetch"
	ERROR_FAILED_TO_MARSHAL_JSON = "failed to marshal json"
	ERROR_FAILED_TO_PARSE_CERT   = "failed to parse certificate"
	ERROR_FAILED_TO_READ_BODY    = "failed to read body"
)
View Source
const SSLMATE_API_URL = "https://api.certspotter.com/v1/issuances"

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	First string
	Last  string
}

type Json

type Json []map[string]interface{}

type Query

type Query struct {
	Domain            string
	IncludeSubdomains bool
	MatchWildcards    bool
	After             string
	Expand            string
}

type SSLMateCert

type SSLMateCert struct {
	Id      string `json:"id"`
	RawCert string `json:"cert_der"`
}

type SSLMateSearchAPI

type SSLMateSearchAPI struct {
	Token string
}

func Default

func Default() *SSLMateSearchAPI

func New

func New(token string) *SSLMateSearchAPI

func (*SSLMateSearchAPI) Search

func (api *SSLMateSearchAPI) Search(query *Query) ([]x509.Certificate, *Index, error)

func (*SSLMateSearchAPI) SearchJsonCerts

func (api *SSLMateSearchAPI) SearchJsonCerts(query *Query) (Json, error)

func (*SSLMateSearchAPI) SearchSSLMateCerts

func (api *SSLMateSearchAPI) SearchSSLMateCerts(query *Query) ([]SSLMateCert, error)

Jump to

Keyboard shortcuts

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