Documentation ¶
Index ¶
- Constants
- Variables
- func AbsolutePath(datadir string, filename string) string
- func BaseUsrDir(dir string) string
- func DoHttpJSONDataPost(jsonData []byte, url string) ([]byte, error)
- func FileExists(path string) bool
- func GetExternalIP() (string, error)
- func Home() (string, error)
- func InitConfig(c *Config)
- func InitInfura(http, wss string)
- func IsPrivateIP(ip net.IP) bool
- func Keccak256(data ...[]byte) []byte
- func LogInst() *zerolog.Logger
- func MaxInt64(a, b int64) int64
- func MinInt64(a, b int64) int64
- func OpenAndReadAll(filename string) (data []byte, err error)
- func Save2File(data []byte, filename string) error
- func ToISO8601(t time.Time) string
- func WriteToFile(file string, content []byte) error
- type ByteSize
- type Config
- type IP
- type KeccakState
- type NinjaDB
- type Salt
- type StorageSize
Constants ¶
View Source
const ( K = 1 << 10 M = 1 << 20 G = 1 << 30 T = 1 << 40 )
View Source
const ( MaxVersion = "2" Version = MaxVersion + ".1.0" TokenAddr = "0x3455e0b8259144a4C127faCc7d064A0F2424C8a8" LicenseContractAddr = "0xCbbE47ce51382e2F7cD4E5771587F9Cb5c91Ad33" DefaultCmdPort = 16665 WebSocketServicePort = 16666 ExtraServicePort = 16667 ChainServicePort = 16668 DefaultP2pPort = 16669 TestInfuraHttp = "https://kovan.infura.io/v3/a3a5c09826a246d0bfbef8084b81df1f" TestInfuraWss = "wss://kovan.infura.io/ws/v3/a3a5c09826a246d0bfbef8084b81df1f" )
Variables ¶
View Source
var ( InfuraUrl = "" InfuraSubWS = "" )
Functions ¶
func AbsolutePath ¶
func BaseUsrDir ¶
func DoHttpJSONDataPost ¶ added in v1.2.2
func FileExists ¶
func GetExternalIP ¶
func IsPrivateIP ¶
func OpenAndReadAll ¶ added in v1.2.2
func WriteToFile ¶
Types ¶
type Config ¶
type Config struct { LogLevel zerolog.Level `json:"log_level"` InfuraHttp string `json:"infura_http"` InfuraWss string `json:"infura_wss"` }
func DefaultConfig ¶ added in v1.2.2
type NinjaDB ¶ added in v1.2.2
func NewNinjaDB ¶ added in v1.2.2
func (*NinjaDB) MustGetJson ¶ added in v1.2.2
func (*NinjaDB) MustPutJson ¶ added in v1.2.2
type StorageSize ¶
type StorageSize float64
func (StorageSize) String ¶
func (s StorageSize) String() string
func (StorageSize) TerminalString ¶
func (s StorageSize) TerminalString() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.