common

package
v1.5.66-0...-d641260 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirIfNotExist

func CreateDirIfNotExist(dir string) error

func FileExists

func FileExists(filePath string) bool

func HexToUtf8

func HexToUtf8(hex [32]byte) string

reverse of Utf8ToHex

func PrivKeyToAddress

func PrivKeyToAddress(privateKey *ecdsa.PrivateKey) (string, error)

func Utf8ToHex

func Utf8ToHex(s string) [32]byte

for parity with the web3.js web3.utils.utf8ToHex() call

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(opts *slog.HandlerOptions) *Logger

func (*Logger) Child

func (l *Logger) Child(serviceName string) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, keyvals ...interface{})

func (*Logger) Debugf

func (l *Logger) Debugf(msg string, keyvals ...interface{})

func (*Logger) Error

func (l *Logger) Error(msg string, keyvals ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(msg string, keyvals ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, keyvals ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(msg string, keyvals ...interface{})

func (*Logger) Printf

func (l *Logger) Printf(format string, v ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(msg string, keyvals ...interface{})

func (*Logger) Warningf

func (l *Logger) Warningf(msg string, keyvals ...interface{})

func (*Logger) With

func (l *Logger) With(keyvals ...interface{}) log.Logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL