Documentation ¶
Index ¶
- Constants
- Variables
- type BaseDatabase
- type CommandsDefinition
- type CommandsDefinitions
- type CommandsMaker
- type CorsSettings
- type Database
- type DatabaseDefinition
- type DatabaseDefinitions
- type DatabaseMaker
- type DatabaseSettings
- type Definitions
- type HTTPServerSettings
- type JSONRPCClientSettings
- type JSONRPCServerSettings
- type Level
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) Warning(args ...interface{})
- func (l *Logger) Warningf(format string, args ...interface{})
- type OperatorSettings
- type RPCSettings
- type Settings
- type SettingsValidator
- type StorageSettings
- type TLSSettings
- type TracingSettings
Constants ¶
View Source
const ( PanicLogLevel = Level(log.PanicLevel) FatalLogLevel = Level(log.FatalLevel) ErrorLogLevel = Level(log.ErrorLevel) WarnLogLevel = Level(log.WarnLevel) InfoLogLevel = Level(log.InfoLevel) DebugLogLevel = Level(log.DebugLevel) TraceLogLevel = Level(log.TraceLevel) )
Variables ¶
View Source
var Log = Logger{}
Functions ¶
This section is empty.
Types ¶
type BaseDatabase ¶
type BaseDatabase struct { }
type CommandsDefinition ¶
type CommandsDefinition struct { Name string `json:"name"` Description string `json:"description"` Maker CommandsMaker `json:"-"` }
type CommandsDefinitions ¶
type CommandsDefinitions []CommandsDefinition
type CommandsMaker ¶
type CorsSettings ¶
type Database ¶
type Database interface { Close() error Open() error Get(table string, key []byte) ([][]byte, error) Set(table string, key, value []byte, ttl time.Duration) error Append(table string, key, value []byte, ttl time.Duration) error DeleteAll(table string, key []byte) error DeleteByValue(table string, key, value []byte) error DeleteBySha256(table string, key, hash []byte) error }
A database can deliver and accept message
type DatabaseDefinition ¶
type DatabaseDefinition struct { Name string `json:"name"` Description string `json:"description"` Maker DatabaseMaker `json:"-"` SettingsValidator SettingsValidator `json:"-"` }
type DatabaseDefinitions ¶
type DatabaseDefinitions map[string]DatabaseDefinition
type DatabaseMaker ¶
type DatabaseSettings ¶
type DatabaseSettings struct { Type string `json:"type"` Settings *interface{} }
type Definitions ¶
type Definitions struct { CommandsDefinitions DatabaseDefinitions }
func MergeDefinitions ¶
func MergeDefinitions(a, b Definitions) Definitions
func (Definitions) Marshal ¶
func (d Definitions) Marshal() map[string]interface{}
func (Definitions) MarshalJSON ¶
func (d Definitions) MarshalJSON() ([]byte, error)
We perform JSON marshalling manually to gain more flexibility...
type HTTPServerSettings ¶
type HTTPServerSettings struct { TLS *TLSSettings `json:"tls"` BindAddress string `json:"bind_address"` }
Settings for the JSON-RPC server
type JSONRPCClientSettings ¶
type JSONRPCClientSettings struct { TLS *TLSSettings `json:"tls"` Endpoint string `json:"endpoint"` Local bool `json:"local"` }
Settings for the JSON-RPC server
type JSONRPCServerSettings ¶
type JSONRPCServerSettings struct { Cors *CorsSettings `json:"cors"` TLS *TLSSettings `json:"tls"` BindAddress string `json:"bind_address"` }
Settings for the JSON-RPC server
type OperatorSettings ¶
type OperatorSettings struct { TracesTTLDays int64 `json:"traces_ttl_days` RPC *JSONRPCServerSettings `json:"rpc"` }
type RPCSettings ¶
type RPCSettings struct {
BindAddress string `json:"bind_address"`
}
type Settings ¶
type Settings struct { Definitions *Definitions `json:"definitions"` Storage *StorageSettings `json:"storage"` Operator *OperatorSettings `json:"operator"` Tracing *TracingSettings `json:"tracing"` Database *DatabaseSettings `json:"database"` }
type SettingsValidator ¶
type StorageSettings ¶
type StorageSettings struct { SettingsTTLDays int64 `json:"settings_ttl_days"` TransferDataTTLDays int64 `json:"transfer_data_ttl_days"` RPC *JSONRPCServerSettings `json:"rpc"` }
type TLSSettings ¶
type TracingSettings ¶
type TracingSettings struct { AllHashesTTLDays int64 `json:"all_hashes_ttl_days"` OpenHashesTTLDays int64 `json:"open_hashes_ttl_days` ContactDataTTLDays int64 `json:"contact_data_ttl_days` TracesTTLDays int64 `json:"traces_ttl_days` RPC *JSONRPCServerSettings `json:"rpc"` }
Click to show internal directories.
Click to hide internal directories.