models

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Features

type Features map[string]interface{}

func (Features) Bool

func (f Features) Bool(s string) bool

type StoreDocument

type StoreDocument struct {
	Features  Features                  `json:"features"`
	Throttles map[string]ThrottleConfig `json:"throttles"`
}

type ThrottleConfig

type ThrottleConfig struct {
	// Whitelist is a list of hash results that will always be allowed through the throttle.
	Whitelist []uint `json:"whitelist,omitempty"`
	// Probability of a hash result making it through the throttle.
	Probability float64 `json:"probability,omitempty"`
	// When true will force the rejection for all the requests going through the throttle
	ForceRejectAll bool `json:"forceRejectAll,omitempty"`
}

Jump to

Keyboard shortcuts

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