Documentation
¶
Index ¶
- Constants
- Variables
- func AppendToDBLogFile(lines []string) error
- func ByteToHex(b []byte) string
- func CopyFile(src, dst string) error
- func CreateDir(path string)
- func DeleteFile(path string)
- func EncodeMD5(value string) string
- func Exists(path string) bool
- func GenerateToken(address string, mode string, username string, password string) (string, error)
- func GetNodeID() string
- func HexToByte(s string) []byte
- func InitConfig()
- func InitFiles()
- func InitJWTMethod()
- func InitKey()
- func InitNodeKey()
- func InitValidatorKey()
- func JsonToStruct(j []byte, s interface{})
- func NodeSign(msg []byte) []byte
- func NodeStringSign(msg []byte) string
- func ReadAll(path string) string
- func ReadPIDFile(path string) string
- func ReadTxFromDBLogFile(beginHeight int, endHeight int) ([]string, error)
- func SavePID(pid int, pidFile string)
- func SignToHex(b []byte) string
- func StartRedimintDaemon()
- func StartRedisDaemon()
- func StartTendermintDaemon()
- func StopPID(pid string)
- func StructToJson(v interface{}) []byte
- func ValidatorSign(msg []byte) []byte
- func ValidatorStringSign(msg []byte) string
- type AppConfig
- type Claims
- type Configuration
- type HttpServerConfig
- type IPFSConfig
- type NodeKeySignMethod
- type Percent
- type RedisConfig
- type RpcConfig
- type TendermintConfig
Constants ¶
View Source
const ( TDPID_FILE = "./.tendermint_pid" RDPID_FILE = "./.redimint_pid" DBPID_FILE = "./.redis_pid" )
View Source
const ( DbTxLogFilePath = "../log/db_transactions" AppLogFilePath = "../log/application.log" )
Variables ¶
View Source
var NodeKey *p2p.NodeKey
View Source
var ValidatorKey *privval.FilePVKey
Functions ¶
func AppendToDBLogFile ¶
command | addr | sign | seq | height | time
func DeleteFile ¶
func DeleteFile(path string)
func GenerateToken ¶
GenerateToken generate tokens used for auth
func InitConfig ¶
func InitConfig()
func InitJWTMethod ¶
func InitJWTMethod()
func InitNodeKey ¶
func InitNodeKey()
func InitValidatorKey ¶
func InitValidatorKey()
func JsonToStruct ¶
func JsonToStruct(j []byte, s interface{})
func NodeStringSign ¶
func ReadPIDFile ¶
func ReadTxFromDBLogFile ¶
command | addr | sign | seq | height | time
func StartRedimintDaemon ¶
func StartRedimintDaemon()
func StartRedisDaemon ¶
func StartRedisDaemon()
func StartTendermintDaemon ¶
func StartTendermintDaemon()
func StructToJson ¶
func StructToJson(v interface{}) []byte
func ValidatorSign ¶
#################### Validator key ####################
func ValidatorStringSign ¶
Types ¶
type Claims ¶
type Configuration ¶
type Configuration struct { App AppConfig `yaml:"app-config"` Rpc RpcConfig `yaml:"rpc-config"` IPFS IPFSConfig `yaml:"ipfs-config"` Redis RedisConfig `yaml:"redis-config"` Tendermint TendermintConfig `yaml:"tendermint-config"` HttpServer HttpServerConfig `yaml:"http-server-config"` }
var Config Configuration
type HttpServerConfig ¶
type IPFSConfig ¶
type IPFSConfig struct {
Url string `yaml:"url"`
}
type NodeKeySignMethod ¶
type NodeKeySignMethod struct { }
func (NodeKeySignMethod) Alg ¶
func (n NodeKeySignMethod) Alg() string
func (NodeKeySignMethod) Sign ¶
func (n NodeKeySignMethod) Sign(signingString string, key interface{}) (string, error)
func (NodeKeySignMethod) Verify ¶
func (n NodeKeySignMethod) Verify(signingString, signature string, key interface{}) error
type RedisConfig ¶
type TendermintConfig ¶
type TendermintConfig struct {
Url string `yaml:"url"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.