ctstream

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 8 Imported by: 0

README

ct-stream

The library, streaming the certificates from ct logs, written in golang.

Documentation

Index

Constants

View Source
const (
	ERROR_FAILED_TO_NEW        = "failed to create new client"
	ERROR_FAILED_TO_FETCH_STH  = "failed to fetch STH"
	ERROR_NEW_LOGS_NOT_FOUND   = "new logs not found"
	ERROR_FAILED_TO_GET_CERT   = "failed to get certificate"
	ERROR_FAILED_TO_PARSE_CERT = "failed to parse certificate"
	NO_CERT_AND_PRECERT_LEAF   = "no certificate and precertificate leaf"
)

Variables

View Source
var DefaultMaxEntries int64 = 256

Functions

This section is empty.

Types

type CTClient added in v0.0.6

type CTClient struct {
	Url string
	*client.LogClient
	context.Context
	// contains filtered or unexported fields
}

func DefaultCTClient added in v0.0.6

func DefaultCTClient(url string) (*CTClient, error)

func NewCTClient added in v0.0.6

func NewCTClient(url string, maxEntrySize int64, ops jsonclient.Options) (*CTClient, error)

func (*CTClient) Init added in v0.0.6

func (stream *CTClient) Init() error

func (*CTClient) Next added in v0.0.6

func (stream *CTClient) Next() ([]ct.LogEntry, error)

type CTStream

type CTStream struct {
	Client *CTClient
	Sleep  time.Duration
	// contains filtered or unexported fields
}

func DefaultCTStream added in v0.0.6

func DefaultCTStream(url string) (*CTStream, error)

func NewCTStream added in v0.0.6

func NewCTStream(client *CTClient) (*CTStream, error)

func (*CTStream) Init

func (stream *CTStream) Init() error

func (*CTStream) Next

func (stream *CTStream) Next(callback Callback)

func (*CTStream) Run

func (stream *CTStream) Run(callback Callback, sleep time.Duration)

func (*CTStream) Stop added in v0.0.3

func (stream *CTStream) Stop()

type CTsStream added in v0.0.6

type CTsStream struct {
	Streams []*CTStream
	Sleep   time.Duration
	// contains filtered or unexported fields
}

func DefaultCTsStream added in v0.0.6

func DefaultCTsStream(urls []string) (*CTsStream, error)

func NewCTsStream added in v0.0.6

func NewCTsStream(streams []*CTStream) (*CTsStream, error)

func (*CTsStream) Await added in v0.0.9

func (stream *CTsStream) Await()

func (*CTsStream) Init added in v0.0.6

func (stream *CTsStream) Init() error

func (*CTsStream) Run added in v0.0.6

func (stream *CTsStream) Run(callback Callback, sleep time.Duration)

func (*CTsStream) Start added in v0.0.9

func (stream *CTsStream) Start(callback Callback, sleep time.Duration)

func (*CTsStream) Stop added in v0.0.6

func (stream *CTsStream) Stop()

type Callback

type Callback func(*ctx509.Certificate, LogID, *client.LogClient, error)

type LogID

type LogID = int64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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