utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JRPC_Version = "2.0"
)

Variables

This section is empty.

Functions

func CanonicalizeFilePath

func CanonicalizeFilePath(path string) string

func CanonicalizePath

func CanonicalizePath(path string) string

func ComparePBTimestamp

func ComparePBTimestamp(t1 *google_protobuf.Timestamp, t2 *google_protobuf.Timestamp) int

if t1 > t2, return 1 else if t1 < t2, return -1 esle (t1 == t2), return 0

func ConvertPBTimestamp

func ConvertPBTimestamp(t *google_protobuf.Timestamp) time.Time

func CreatePBTimestamp

func CreatePBTimestamp(t time.Time) *google_protobuf.Timestamp

func DoubleSHA256

func DoubleSHA256(data []byte) ([]byte, error)

func HMACSHA256

func HMACSHA256(data []byte, seed []byte) ([]byte, error)

func JRPCError

func JRPCError(err error, data interface{}) *errorResponse

func JRPCErrorF

func JRPCErrorF(code int, message string, data interface{}) *errorResponse

func JRPCSuccess

func JRPCSuccess(data interface{}) *successResponse

func SHA256RIPEMD160

func SHA256RIPEMD160(data []byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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