Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled" default:"false"`
Type Type `yaml:"type" default:"maxmind"`
Config *RawMessage `yaml:"config"`
}
type Provider ¶
type Provider interface {
Start(ctx context.Context) error
Stop(ctx context.Context) error
Type() string
LookupIP(ctx context.Context, ip net.IP, precision lookup.Precision) (*lookup.Result, error)
}
func NewProvider ¶
func NewProvider(providerType Type, config *RawMessage, log logrus.FieldLogger) (Provider, error)
type RawMessage ¶
type RawMessage struct {
// contains filtered or unexported fields
}
func (*RawMessage) Unmarshal ¶
func (r *RawMessage) Unmarshal(v interface{}) error
func (*RawMessage) UnmarshalYAML ¶
func (r *RawMessage) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.