Documentation ¶
Index ¶
- func AuditorHealthHandlerFunc(immuServiceClient schema.ImmuServiceClient) http.HandlerFunc
- func AuditorVersionHandlerFunc(w http.ResponseWriter, r *http.Request)
- func StartHTTPServerForMonitoring(addr string, listenAndServe func(server *http.Server) error, l logger.Logger, ...) *http.Server
- type AuditNotificationConfig
- type AuditNotificationRequest
- type Auditor
- type HealthResponse
- type Signature
- type State
- type VersionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditorHealthHandlerFunc ¶ added in v1.0.5
func AuditorHealthHandlerFunc(immuServiceClient schema.ImmuServiceClient) http.HandlerFunc
func AuditorVersionHandlerFunc ¶ added in v1.0.5
func AuditorVersionHandlerFunc(w http.ResponseWriter, r *http.Request)
Types ¶
type AuditNotificationConfig ¶ added in v0.8.1
type AuditNotificationConfig struct { URL string Username string Password string RequestTimeout time.Duration PublishFunc func(*http.Request) (*http.Response, error) }
AuditNotificationConfig holds the URL and credentials used to publish audit result to ledger compliance.
type AuditNotificationRequest ¶ added in v0.8.1
type AuditNotificationRequest struct { Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` DB string `json:"db" validate:"required"` RunAt time.Time `json:"run_at" validate:"required" example:"2020-11-13T00:53:42+01:00"` Tampered bool `json:"tampered"` PreviousState *State `json:"previous_state"` CurrentState *State `json:"current_state"` }
AuditNotificationRequest ...
type Auditor ¶
type Auditor interface {
Run(interval time.Duration, singleRun bool, stopc <-chan struct{}, donec chan<- struct{}) error
}
Auditor the auditor interface
func DefaultAuditor ¶
func DefaultAuditor( interval time.Duration, serverAddress string, dialOptions []grpc.DialOption, username string, passwordBase64 string, auditDatabases []string, serverSigningPubKey *ecdsa.PublicKey, notificationConfig AuditNotificationConfig, serviceClient schema.ImmuServiceClient, uuidProvider state.UUIDProvider, history cache.HistoryCache, updateMetrics func(string, string, bool, bool, bool, *schema.ImmutableState, *schema.ImmutableState), log logger.Logger, monitoringHTTPAddr *string) (Auditor, error)
DefaultAuditor creates initializes a default auditor implementation
type HealthResponse ¶ added in v1.0.5
type HealthResponse struct {
Immudb string `json:"immudb"`
}
type State ¶ added in v0.9.0
type State struct { Tx uint64 `json:"tx" validate:"required"` Hash string `json:"hash" validate:"required"` Signature Signature `json:"signature" validate:"required"` }
State ...
type VersionResponse ¶ added in v1.0.5
type VersionResponse struct { Component string `json:"component" example:"immudb"` Version string `json:"version" example:"1.0.1-c9c6495"` BuildTime string `json:"buildtime" example:"1604692129"` BuiltBy string `json:"builtby,omitempty"` Static bool `json:"static"` FIPS bool `json:"fips"` }
VersionResponse ...
var Version VersionResponse
Click to show internal directories.
Click to hide internal directories.