Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRateLimiter ¶
Types ¶
type JRPCRequest ¶
type JRPCRequest struct { ID string `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params json.RawMessage `json:"params"` }
type JRPCResponse ¶
type JRPCResponse struct { ID string `json:"id,omitempty"` JSONRPC string `json:"jsonrpc,omitempty"` Result json.RawMessage `json:"result,omitempty"` Error *JRPCError `json:"error,omitempty"` }
type MethodPrefix ¶
type MethodPrefix string
const ( MethodInvalid MethodPrefix = "" MethodIdx MethodPrefix = "idx_" MethodAuth MethodPrefix = "auth_" )
type RateLimitStrategy ¶
type RateLimitStrategy string
const ( RateLimitStrategyIP RateLimitStrategy = "ip" RateLimitStrategyKey RateLimitStrategy = "key" RateLimitStrategyNone RateLimitStrategy = "none" )
func ToRateLimitStrategy ¶
func ToRateLimitStrategy(s string) RateLimitStrategy
Click to show internal directories.
Click to hide internal directories.