Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// BaseURL is the base url for certspotter API endpoint.
BaseURL = "https://api.certspotter.com/v1"
)
View Source
var ( // ErrUnexpectedStatus is returned for status codes other than 2XX ErrUnexpectedStatus = errors.New("unexpected status") )
Functions ¶
func CheckResponse ¶
CheckResponse returns an error if http.Response was unsuccessful.
Types ¶
type Certificate ¶
type Certificate struct { Data string `json:"data"` SHA256 string `json:"sha256"` Type string `json:"type"` }
Certificate represents a cerspotter certificate object.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a certspotter API client.
func (*Client) Do ¶
Do sends a request with options to certspotter api and encodes json response into val.
func (*Client) GetIssuances ¶
func (c *Client) GetIssuances(ctx context.Context, opts *GetIssuancesOptions) ([]*Issuance, *http.Response, error)
GetIssuances returns issuances and response for options.
type GetIssuancesOptions ¶
type GetIssuancesOptions struct { Domain string `url:"domain"` IncludeSubdomains bool `url:"include_subdomains,omitempty"` MatchWildcards bool `url:"match_wildcards,omitempty"` After string `url:"after,omitempty"` Expand []string `url:"expand,omitempty"` }
GetIssuancesOptions are options used when getting issuances.
type Issuance ¶
type Issuance struct { ID string `json:"id"` DNSNames []string `json:"dns_names"` TBSSHA256 string `json:"tbs_sha256"` NotBefore time.Time `json:"not_before"` NotAfter time.Time `json:"not_after"` PubKeySHA256 string `json:"pubkey_sha256"` Issuer *Issuer `json:"issuer"` Certificate *Certificate `json:"cert"` }
Issuance represents a cerspotter issuance object.
Click to show internal directories.
Click to hide internal directories.