mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-23 10:56:22 +02:00
25 lines
368 B
Go
25 lines
368 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
"net/netip"
|
|
|
|
"github.com/qdm12/gluetun/pkg/publicip/models"
|
|
)
|
|
|
|
type Fetcher interface {
|
|
String() string
|
|
CanFetchAnyIP() bool
|
|
Token() (token string)
|
|
InfoFetcher
|
|
}
|
|
|
|
type InfoFetcher interface {
|
|
FetchInfo(ctx context.Context, ip netip.Addr) (
|
|
result models.PublicIP, err error)
|
|
}
|
|
|
|
type Warner interface {
|
|
Warn(message string)
|
|
}
|