Skip to content

Commit

Permalink
Add IPField interface to support IP address retrieval (#60)
Browse files Browse the repository at this point in the history
- Add an interface for IP Field
  • Loading branch information
CascadingRadium authored Feb 20, 2025
1 parent 9af4b44 commit 17c09f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion document.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

package index

import "time"
import (
"net"
"time"
)

type Document interface {
ID() string
Expand Down Expand Up @@ -83,6 +86,10 @@ type GeoShapeField interface {
GeoShape() (GeoJSON, error)
}

type IPField interface {
IP() (net.IP, error)
}

// TokenizableSpatialField is an optional interface for fields that
// supports pluggable custom hierarchial spatial token generation.
type TokenizableSpatialField interface {
Expand Down

0 comments on commit 17c09f7

Please sign in to comment.