server

package
v0.0.0-...-91f0152 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpsCertFile         = "./key/cert.pem"
	DecryptedHttpsKeyFile = "./key/decryptedKey.pem"
)

Variables

This section is empty.

Functions

func StartServer

func StartServer(keyGrantor, listenAddr, bchRpcClientInfo string)

Types

type Resp

type Resp struct {
	Success bool   `json:"success"`
	Error   string `json:"error,omitempty"`
	Result  any    `json:"result,omitempty"`
}

func NewErrResp

func NewErrResp(err string) Resp

func NewOkResp

func NewOkResp(result any) Resp

func NewResp

func NewResp(result any, err error) Resp

func UnmarshalResp

func UnmarshalResp(jsonBytes []byte) (resp Resp)

func (Resp) ToJSON

func (resp Resp) ToJSON() []byte

func (Resp) WriteTo

func (resp Resp) WriteTo(w http.ResponseWriter)

Jump to

Keyboard shortcuts

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