webapi

package
v0.0.0-...-e49772e Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Options

type Options struct {
	AllowCors          bool
	TileServer         string
	UseTileCache       bool
	ImprintFile        string
	DataProtectionFile string
	Version            string
	Seed               string
}

type Request

type Request struct {
	Jsonrpc string          `json:"jsonrpc"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params"`
	Id      *string         `json:"id"`
}

type Response

type Response struct {
	Jsonrpc string          `json:"jsonrpc"`
	Result  json.RawMessage `json:"result,omitempty"`
	Error   *Error          `json:"error,omitempty"`
	Id      *string         `json:"id"`
}

type RpcServer

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

func New

func New(options Options) *RpcServer

func (*RpcServer) ServeHTTP

func (r *RpcServer) ServeHTTP(resp http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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