proofmonitoring

package
v1.0.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Next

func Next(records interface{ Next() (bool, error) }) bool

Next is helper function that simplifies the usage of the iterator.

Types

type Client

type Client struct {
	*lifecycle.Lifecycle
	// contains filtered or unexported fields
}

Client for the monitoring.

func New

func New(provider storage.Provider, documentLoader ld.DocumentLoader, wfClient webfingerClient,
	httpClient httpClient, taskMgr taskManager, opts ...Opt,
) (*Client, error)

New returns monitoring client.

func (*Client) Watch

func (c *Client) Watch(vc *verifiable.Credential, endTime time.Time, domain string, created time.Time) error

Watch starts monitoring.

type Opt

type Opt func(opts *options)

Opt specifies a proof monitoring option.

func WithMaxRecordsPerInterval

func WithMaxRecordsPerInterval(value int) Opt

WithMaxRecordsPerInterval sets the maximum number of records to check in a single monitoring interval.

func WithMonitoringInterval

func WithMonitoringInterval(value time.Duration) Opt

WithMonitoringInterval sets the proof monitoring interval.

func WithRequestTokens

func WithRequestTokens(value map[string]string) Opt

WithRequestTokens sets the request bearer tokens for HTTP requests to the VCT service.

type Proof

type Proof struct {
	Data struct {
		Domain  string    `json:"domain"`
		Created time.Time `json:"created"`
	} `json:"proof"`
}

Proof represents response.

Jump to

Keyboard shortcuts

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