Documentation ¶
Index ¶
Constants ¶
View Source
const (
// pre-defined default allowlist name
DefaultAllowList = "default"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowList ¶
type AllowList struct { ID uint32 // Allowlist ID Name string // Allowlist name // Any requests which query addresses that are not in the allowlist are rejected. ContractAddresses []string // The allowed methods list. If the list is empty, all methods will be accpeted. AllowMethods []string // The disallowed methods list. If the list is empty, no methods will be rejected. DisallowMethods []string // Restricted `User-Agent` request headers UserAgents []string // Restricted `Origin` request headers Origins []string }
AllowList access control rule list.
func NewAllowList ¶
type CfxValidator ¶
type CfxValidator struct {
// contains filtered or unexported fields
}
type Context ¶
type Context struct { context.Context RpcMethod string ExtractRpcParams func() ([]interface{}, error) }
validation context
type EthValidator ¶
type EthValidator struct {
// contains filtered or unexported fields
}
type ValidatorFactory ¶
Click to show internal directories.
Click to hide internal directories.