logmonitor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogMonitor

type LogMonitor struct {
	Log    string                  `json:"logUrl"`
	STH    *command.GetSTHResponse `json:"sthResponse"`
	PubKey []byte                  `json:"pubKey"`

	Status status `json:"status"`
}

LogMonitor provides information about log monitor.

type Store

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

Store implements storage for log monitors.

func New

func New(provider storage.Provider) (*Store, error)

New returns new instance of log monitor store.

func (*Store) Activate

func (s *Store) Activate(logURL string) error

Activate stores a log to be monitored. If it already exists active flag will be set to true.

func (*Store) Deactivate

func (s *Store) Deactivate(logURL string) error

Deactivate flags log monitor as inactive.

func (*Store) Delete

func (s *Store) Delete(logURL string) error

Delete deletes log monitor.

func (*Store) Get

func (s *Store) Get(logURL string) (*LogMonitor, error)

Get retrieves log monitor.

func (*Store) GetActiveLogs

func (s *Store) GetActiveLogs() ([]*LogMonitor, error)

GetActiveLogs retrieves all active log monitors.

func (*Store) GetInactiveLogs

func (s *Store) GetInactiveLogs() ([]*LogMonitor, error)

GetInactiveLogs retrieves all inactive log monitors.

func (*Store) Update

func (s *Store) Update(logMonitor *LogMonitor) error

Update updates a log monitor.

Jump to

Keyboard shortcuts

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