Documentation ¶
Overview ¶
Package core contains the core dependencies
Index ¶
- Constants
- Variables
- func BytesToSlice(bytes [32]byte) []byte
- func CopyBigInt(val *big.Int) *big.Int
- func EnumScan(src interface{}) (uint8, error)
- func EnumValue(enum EnumInter) (driver.Value, error)
- func ExpandOrReturnPath(path string) string
- func GetEnv(name, defaultVal string) string
- func GetEnvInt(name string, defaultVal int) int
- func IsTest() bool
- type Enum
- type EnumInter
Constants ¶
const CI = "CI"
CI is the variable used to define the ci is running.
const EnumDataType = "integer"
EnumDataType is exported here to be passed as GormDataType.
Variables ¶
var LogLevels = []zapcore.Level{zapcore.DebugLevel, zapcore.InfoLevel, zapcore.WarnLevel, zapcore.ErrorLevel, zapcore.DPanicLevel, zapcore.PanicLevel, zapcore.FatalLevel}
LogLevels stores available log levels in serverity order.
Functions ¶
func BytesToSlice ¶
BytesToSlice converts a 32 bit array to a slice slice.
func CopyBigInt ¶
CopyBigInt creates a copy of a big int without mutating the original.
func EnumScan ¶ added in v0.0.7
EnumScan converts the enum to a value. the returned uint 8 should be used. Note this should only be used for a non-nullable enum.
func ExpandOrReturnPath ¶ added in v0.0.6
ExpandOrReturnPath expands a homedir path, if it can't be expanded, the original dir is returned since on these systems homedir cannot be used anyway.
func GetEnv ¶
GetEnv gets an environment variable. If it is not present, the default variable is used.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package assets provides static assets we want to embed in the application in the main folder and documentation related assets in subfolders.
|
Package assets provides static assets we want to embed in the application in the main folder and documentation related assets in subfolders. |
Package bytemap is an implementation of https://github.com/google/triemap/blob/main/bytemap.go with generic support for values
|
Package bytemap is an implementation of https://github.com/google/triemap/blob/main/bytemap.go with generic support for values |
Package commandline contains common utilities for use across clis
|
Package commandline contains common utilities for use across clis |
Package config contains the configuration required to run a node.
|
Package config contains the configuration required to run a node. |
Package dbcommon provides common database functionality
|
Package dbcommon provides common database functionality |
Package ginhelper provides some common functionality across gin servers.
|
Package ginhelper provides some common functionality across gin servers. |
Package mapmutex provides an extensible, type-safe mutex implementation TODO: use generics
|
Package mapmutex provides an extensible, type-safe mutex implementation TODO: use generics |
Package merkle provides the tools to create a merkle tree and keep track of its historical states.
|
Package merkle provides the tools to create a merkle tree and keep track of its historical states. |
Package metrics implements a metrics dashboard with either datadog or prometheus (coming soon)
|
Package metrics implements a metrics dashboard with either datadog or prometheus (coming soon) |
newrelic
Package newrelic provides custom wrpapers for newrelic.
|
Package newrelic provides custom wrpapers for newrelic. |
Package observer provides an observer implementation
|
Package observer provides an observer implementation |
Package prom exposes metrics on synapse-node
|
Package prom exposes metrics on synapse-node |
Package server provides a way to access a server TODO: consider moving this into gin helper
|
Package server provides a way to access a server TODO: consider moving this into gin helper |
Package testsuite contains the standard test suite
|
Package testsuite contains the standard test suite |
Package threaditer extends iter with a mutex for thread safe use
|
Package threaditer extends iter with a mutex for thread safe use |
Package toml contains common utilities for implementing toml types.
|
Package toml contains common utilities for implementing toml types. |