Documentation
¶
Index ¶
- Variables
- func HTTPConfigDecodeHook(from, to reflect.Value) (interface{}, error)
- func Run(ctx context.Context, ctxParam contextFields, apiParam apiFields, ...) error
- func SetContextFields(opts ...FieldOption) contextFields
- func SetHTTPConfig(config *HTTPConfig)
- func WithAPIFields(opts ...FieldOption) apiFields
- type AddressChecker
- type Config
- type DomainChecker
- type FieldConfig
- type FieldOption
- type HTTP
- type HTTPConfig
- type IPChecker
- type Option
- type UserGrant
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrHalt = errors.New("interrupt")
)
View Source
var ServerLog *logrus
Functions ¶
func HTTPConfigDecodeHook ¶
func SetContextFields ¶
func SetContextFields(opts ...FieldOption) contextFields
func SetHTTPConfig ¶
func SetHTTPConfig(config *HTTPConfig)
func WithAPIFields ¶
func WithAPIFields(opts ...FieldOption) apiFields
Types ¶
type AddressChecker ¶
func NewIPChecker ¶
func NewIPChecker(i string) (AddressChecker, error)
type Config ¶
type Config struct {
HTTP HTTPConfig
}
type DomainChecker ¶
type DomainChecker struct {
Domain string
}
func (*DomainChecker) Matches ¶
func (c *DomainChecker) Matches(domain string) bool
type FieldConfig ¶
type FieldOption ¶
type FieldOption func(*FieldConfig)
func SetFields ¶
func SetFields(name string, values ...interface{}) FieldOption
type HTTPConfig ¶
type HTTPConfig struct {
DenyList []AddressChecker
}
type Option ¶
type Option func(*runConfig)
func ActionToOptions ¶
func WithAllowedToFail ¶
func WithAllowedToFail() Option
func WithLogger ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.