rpcserver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: GPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTLSCertificate

func CreateTLSCertificate(certPath, keyPath string, hostnames ...string) (err error)

CreateTLSCertificate creates a self-signed key/cert pair for https server you can give the destination path without extension (.crt/.key will be added), and optionally pass hostnames to be written to the cert

func Middleware

func Middleware(ctx *gin.Context)

Middleware attaches CORS (access-control-allow-*) headers to gin.Context on every request to allow cross-domain requests from the frontend.

func Options

func Options(ctx *gin.Context)

Options handles all options request

func Start

func Start()

Start is starting the service

func WebRpcDebugMiddleware

func WebRpcDebugMiddleware(c *gin.Context)

Types

type GinWriteInterceptor

type GinWriteInterceptor struct {
	gin.ResponseWriter
	// contains filtered or unexported fields
}

func (*GinWriteInterceptor) Write

func (gwi *GinWriteInterceptor) Write(bs []byte) (int, error)

func (*GinWriteInterceptor) WriteString

func (gwi *GinWriteInterceptor) WriteString(str string) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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