ct

package
v0.0.0-...-1ed23f6 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package ct defines the interface that Certificate Transparency Logs consumers must implement.

It defines an implementation that doesn't allow the user to filter domains and leaves it to the consumer of the interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CT

type CT interface {
	// Handle makes listens for new domains in CT logs.
	Handle(ctx context.Context, domains chan<- api.Domain) error
}

CT is a Certificate Transparency client.

type Client

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

Client is a generic CT Logs consumer.

func New

func New(cfg *Config, opts ...Option) (*Client, error)

New sets up a CT Logs client.

func (*Client) Handle

func (c *Client) Handle(ctx context.Context, domains chan<- api.Domain) error

Handle handles new domain names received from CT Logs.

type Config

type Config struct {
	// Start is the CT Log first node to read.
	Start int `json:"start"`
	// Size is the number of logs to read.
	Size int `json:"size"`
	// Logs stores the list of CT Logs to use.
	Logs []string `json:"logs"`
	// Concurrency is the number of concurrent goroutines to use while
	// reading the CT Log.
	Concurrency int `json:"concurrency"`
}

Config sets CT Client behavior.

func Load

func Load(r io.Reader) (*Config, error)

Load allows reading configuration from any type that implements the io.Reader interface, like files, network shares, etc.

type Option

type Option func(*http.Client)

Option type allows customizing HTTP client.

Jump to

Keyboard shortcuts

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