Documentation ¶
Index ¶
- Variables
- type HistoryHandler
- type ImmuGw
- type ImmuGwServer
- func (s *ImmuGwServer) Start() error
- func (s *ImmuGwServer) Stop() error
- func (c *ImmuGwServer) WithCliOptions(cliOptions client.Options) ImmuGw
- func (c *ImmuGwServer) WithClient(client schema.ImmuServiceClient) ImmuGw
- func (c *ImmuGwServer) WithLogger(logger logger.Logger) ImmuGw
- func (c *ImmuGwServer) WithOptions(options Options) ImmuGw
- type ImmuGwServerMock
- func (igm *ImmuGwServerMock) Start() error
- func (igm *ImmuGwServerMock) Stop() error
- func (igm *ImmuGwServerMock) WithCliOptions(options client.Options) ImmuGw
- func (igm *ImmuGwServerMock) WithClient(client schema.ImmuServiceClient) ImmuGw
- func (igm *ImmuGwServerMock) WithLogger(logger logger.Logger) ImmuGw
- func (igm *ImmuGwServerMock) WithOptions(options Options) ImmuGw
- type LastAuditResult
- type MetricsCollection
- type Options
- func (o Options) Bind() string
- func (o Options) MetricsBind() string
- func (o Options) String() string
- func (o Options) WithAddress(address string) Options
- func (o Options) WithAudit(audit bool) Options
- func (o Options) WithAuditInterval(auditInterval time.Duration) Options
- func (o Options) WithAuditPassword(auditPassword string) Options
- func (o Options) WithAuditUsername(auditUsername string) Options
- func (o Options) WithConfig(config string) Options
- func (o Options) WithDetached(detached bool) Options
- func (o Options) WithDir(dir string) Options
- func (o Options) WithImmudbAddress(immudbAddress string) Options
- func (o Options) WithImmudbPort(immudbPort int) Options
- func (o Options) WithLogfile(logfile string) Options
- func (o Options) WithMTLs(MTLs bool) Options
- func (o Options) WithMTLsOptions(MTLsOptions client.MTLsOptions) Options
- func (o Options) WithPidfile(pidfile string) Options
- func (o Options) WithPort(port int) Options
- type Runtime
- type SafeReferenceHandler
- type SafeZAddHandler
- type SafegetHandler
- type SafesetHandler
- type Service
- type SetHandler
- type UseDatabaseHandler
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidItemProof = errors.New("proof does not match the given item")
)
ErrInvalidItemProof ...
Functions ¶
This section is empty.
Types ¶
type HistoryHandler ¶
type HistoryHandler interface {
History(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}
HistoryHandler ...
func NewHistoryHandler ¶
func NewHistoryHandler(mux *runtime.ServeMux, client client.ImmuClient, rt Runtime, json json.JSON) HistoryHandler
NewHistoryHandler ...
type ImmuGw ¶ added in v0.7.0
type ImmuGw interface { Start() error Stop() error WithClient(schema.ImmuServiceClient) ImmuGw WithLogger(logger.Logger) ImmuGw WithOptions(Options) ImmuGw WithCliOptions(client.Options) ImmuGw }
ImmuGw ...
type ImmuGwServer ¶
type ImmuGwServer struct { Options Options CliOptions client.Options Logger logger.Logger Pid server.PIDFile Client schema.ImmuServiceClient MetricServer *metricServer // contains filtered or unexported fields }
ImmuGwServer ...
func DefaultServer ¶
func DefaultServer() *ImmuGwServer
DefaultServer returns a default immudb gateway server
func (*ImmuGwServer) Start ¶
func (s *ImmuGwServer) Start() error
Start starts the immudb gateway server
func (*ImmuGwServer) Stop ¶
func (s *ImmuGwServer) Stop() error
Stop stops the immudb gateway server
func (*ImmuGwServer) WithCliOptions ¶ added in v0.7.0
func (c *ImmuGwServer) WithCliOptions(cliOptions client.Options) ImmuGw
WithCliOptions ...
func (*ImmuGwServer) WithClient ¶
func (c *ImmuGwServer) WithClient(client schema.ImmuServiceClient) ImmuGw
WithClient ...
func (*ImmuGwServer) WithLogger ¶
func (c *ImmuGwServer) WithLogger(logger logger.Logger) ImmuGw
WithLogger ...
func (*ImmuGwServer) WithOptions ¶
func (c *ImmuGwServer) WithOptions(options Options) ImmuGw
WithOptions ...
type ImmuGwServerMock ¶ added in v0.7.0
type ImmuGwServerMock struct { StartF func() error StopF func() error WithClientF func(schema.ImmuServiceClient) ImmuGw WithLoggerF func(logger.Logger) ImmuGw WithOptionsF func(Options) ImmuGw WithCliOptionsF func(client.Options) ImmuGw }
ImmuGwServerMock ...
func (*ImmuGwServerMock) Start ¶ added in v0.7.0
func (igm *ImmuGwServerMock) Start() error
Start ...
func (*ImmuGwServerMock) WithCliOptions ¶ added in v0.7.0
func (igm *ImmuGwServerMock) WithCliOptions(options client.Options) ImmuGw
WithCliOptions ...
func (*ImmuGwServerMock) WithClient ¶ added in v0.7.0
func (igm *ImmuGwServerMock) WithClient(client schema.ImmuServiceClient) ImmuGw
WithClient ...
func (*ImmuGwServerMock) WithLogger ¶ added in v0.7.0
func (igm *ImmuGwServerMock) WithLogger(logger logger.Logger) ImmuGw
WithLogger ...
func (*ImmuGwServerMock) WithOptions ¶ added in v0.7.0
func (igm *ImmuGwServerMock) WithOptions(options Options) ImmuGw
WithOptions ...
type LastAuditResult ¶
type LastAuditResult struct { ServerID string ServerAddress string HasRunConsistencyCheck bool HasError bool ConsistencyCheckResult bool PreviousRootIndex float64 PreviousRoot string CurrentRootIndex float64 CurrentRoot string RunAt time.Time sync.RWMutex }
LastAuditResult ...
type MetricsCollection ¶
type MetricsCollection struct { AuditResultPerServer *prometheus.GaugeVec AuditPrevRootPerServer *prometheus.GaugeVec AuditCurrRootPerServer *prometheus.GaugeVec AuditRunAtPerServer *prometheus.GaugeVec UptimeCounter prometheus.CounterFunc // contains filtered or unexported fields }
MetricsCollection the gateway metrics collection
func (MetricsCollection) UpdateAuditResult ¶
func (mc MetricsCollection) UpdateAuditResult( serverID string, serverAddress string, checked bool, withError bool, result bool, prevRoot *schema.Root, currRoot *schema.Root, )
UpdateAuditResult updates the metrics related to audit result
func (MetricsCollection) WithUptimeCounter ¶
func (mc MetricsCollection) WithUptimeCounter(reg *prometheus.Registry, f func() float64)
WithUptimeCounter ...
type Options ¶
type Options struct { Dir string Address string Port int MetricsPort int ImmudbAddress string ImmudbPort int Audit bool AuditInterval time.Duration AuditUsername string AuditPassword string `json:"-"` Detached bool MTLs bool MTLsOptions client.MTLsOptions Config string Pidfile string Logfile string }
Options immudb gateway server options
func (Options) MetricsBind ¶
MetricsBind return metrics bind address
func (Options) WithAddress ¶
WithAddress sets address
func (Options) WithAuditInterval ¶
WithAuditInterval sets AuditInterval
func (Options) WithAuditPassword ¶
WithAuditPassword sets AuditPasswordauditUsername
func (Options) WithAuditUsername ¶
WithAuditUsername sets AuditUsername
func (Options) WithConfig ¶
WithConfig sets config
func (Options) WithDetached ¶
WithDetached sets immugw to be run in background
func (Options) WithImmudbAddress ¶
WithImmudbAddress sets immudbAddress
func (Options) WithImmudbPort ¶
WithImmudbPort sets immudbPort
func (Options) WithLogfile ¶
WithLogfile sets logfile
func (Options) WithMTLsOptions ¶
func (o Options) WithMTLsOptions(MTLsOptions client.MTLsOptions) Options
WithMTLsOptions sets MTLsOptions
func (Options) WithPidfile ¶
WithPidfile sets pidfile
type Runtime ¶ added in v0.7.0
type Runtime interface { AnnotateContext(context.Context, *runtime.ServeMux, *http.Request) (context.Context, error) Bytes(string) ([]byte, error) HTTPError(context.Context, *runtime.ServeMux, runtime.Marshaler, http.ResponseWriter, *http.Request, error) MarshalerForRequest(*runtime.ServeMux, *http.Request) (runtime.Marshaler, runtime.Marshaler) NewServerMetadataContext(context.Context, runtime.ServerMetadata) context.Context }
Runtime ...
type SafeReferenceHandler ¶
type SafeReferenceHandler interface {
SafeReference(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}
SafeReferenceHandler ...
func NewSafeReferenceHandler ¶
func NewSafeReferenceHandler(mux *runtime.ServeMux, client client.ImmuClient, rt Runtime, json json.JSON) SafeReferenceHandler
NewSafeReferenceHandler ...
type SafeZAddHandler ¶
type SafeZAddHandler interface {
SafeZAdd(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}
SafeZAddHandler ...
func NewSafeZAddHandler ¶
func NewSafeZAddHandler(mux *runtime.ServeMux, client client.ImmuClient, rt Runtime, json json.JSON) SafeZAddHandler
NewSafeZAddHandler ...
type SafegetHandler ¶
type SafegetHandler interface {
Safeget(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}
SafegetHandler ...
func NewSafegetHandler ¶
func NewSafegetHandler(mux *runtime.ServeMux, client client.ImmuClient, rt Runtime, json json.JSON) SafegetHandler
NewSafegetHandler ...
type SafesetHandler ¶
type SafesetHandler interface {
Safeset(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}
SafesetHandler ...
func NewSafesetHandler ¶
func NewSafesetHandler(mux *runtime.ServeMux, client client.ImmuClient, rt Runtime, json json.JSON) SafesetHandler
NewSafesetHandler ...
type SetHandler ¶
type SetHandler interface {
Set(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}
SetHandler ...
func NewSetHandler ¶
func NewSetHandler(mux *runtime.ServeMux, client client.ImmuClient, rt Runtime, json json.JSON) SetHandler
NewSetHandler ...
type UseDatabaseHandler ¶ added in v0.7.0
type UseDatabaseHandler interface {
UseDatabase(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}
UseDatabaseHandler ...
func NewUseDatabaseHandler ¶ added in v0.7.0
func NewUseDatabaseHandler(mux *runtime.ServeMux, client client.ImmuClient, rt Runtime, json json.JSON) UseDatabaseHandler
NewUseDatabaseHandler ...