ds

package
v0.0.0-...-a6a622b Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchLogForWorker

func FetchLogForWorker(ctx context.Context, params FetchParams) error

FetchLogForWorker fetches the specified log and passes all entries to the worker.

func NewServer

func NewServer(dm *dt.DomainMap, ip string, port int) (*http.Server, *dtHandler)

NewServer creates a new domain server. The handler flags should only be modified BEFORE calling serve().

Types

type FetchParams

type FetchParams struct {
	InitialTreeSize  uint64
	STHCheckInterval time.Duration
	LogID            [32]byte
	LogIndex         uint64
	LogClient        *client.LogClient
	ReturnOnError    bool

	C chan<- dt.WorkerTransaction
}

type GetConsistencyProofRequest

type GetConsistencyProofRequest struct {
	DomainName string `schema:"domain_name,required"`
	First      uint64 `schema:"first,required"`
	Second     uint64 `schema:"second,required"`
}

type GetConsistencyProofResponse

type GetConsistencyProofResponse struct {
	Proof [][]byte `json:"proof"`
}

type GetDomainRootAndProofRequest

type GetDomainRootAndProofRequest struct {
	DomainName    string `schema:"domain_name,required"`
	DomainMapSize uint64 `schema:"domain_map_size,required"`
}

type GetDomainRootAndProofResponse

type GetDomainRootAndProofResponse struct {
	DomainTreeSize       uint64   `json:"domain_tree_size"`
	DomainTreeRootHash   []byte   `json:"domain_tree_root_hash"`
	NormalizedDomainName string   `json:"normalized_domain_name"`
	AuditPath            [][]byte `json:"audit_path"`
}

type GetDomainTreeIndexRequest

type GetDomainTreeIndexRequest struct {
	DomainName       string `schema:"domain_name,required"`
	LogIndex         uint64 `schema:"log_index,required"`
	CertificateIndex uint64 `schema:"certificate_index,required"`
}

type GetDomainTreeIndexResponse

type GetDomainTreeIndexResponse struct {
	DomainTreeIndex uint64 `json:"domain_tree_index"`
}

type GetEntriesRequest

type GetEntriesRequest struct {
	DomainName string `schema:"domain_name,required"`
	Start      uint64 `schema:"start,required"`
	End        uint64 `schema:"end,required"`
}

type GetEntriesResponse

type GetEntriesResponse struct {
	Entries [][2]uint64 `json:"entries"`
}

type GetEntryAndProofRequest

type GetEntryAndProofRequest struct {
	DomainName     string `schema:"domain_name,required"`
	Index          uint64 `schema:"index,required"`
	DomainTreeSize uint64 `schema:"domain_tree_size,required"`
}

type GetEntryAndProofResponse

type GetEntryAndProofResponse struct {
	Entry     [2]uint64 `json:"entry"`
	AuditPath [][]byte  `json:"audit_path"`
}

type GetSMHRequest

type GetSMHRequest struct {
}

type GetSMHResponse

type GetSMHResponse dt.SignedMapHead

type GetSourceConsistencyProofRequest

type GetSourceConsistencyProofRequest struct {
	First  uint64 `schema:"first,required"`
	Second uint64 `schema:"second,required"`
}

type GetSourceConsistencyProofResponse

type GetSourceConsistencyProofResponse struct {
	Proof [][]byte `json:"proof"`
}

type GetSourceLogAndProofRequest

type GetSourceLogAndProofRequest struct {
	Index          uint64 `schema:"index,required"`
	SourceTreeSize uint64 `schema:"source_tree_size,required"`
}

type GetSourceLogAndProofResponse

type GetSourceLogAndProofResponse struct {
	LogID     []byte   `json:"log_id"`
	AuditPath [][]byte `json:"audit_path"`
}

type GetSourceLogsRequest

type GetSourceLogsRequest struct {
	Start uint64 `schema:"start,required"`
	End   uint64 `schema:"end,required"`
}

type GetSourceLogsResponse

type GetSourceLogsResponse struct {
	LogIDs [][]byte `json:"log_ids"`
}

Jump to

Keyboard shortcuts

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