Skip to content

Commit

Permalink
fix: add doc base
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahanmmi committed Apr 12, 2024
1 parent 946efb6 commit aa95e9a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/es/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ type Doc interface {
KeysAndIndex() ([]string, string)
}

type DocBase map[string]any

func (d DocBase) GetIdAndIndex() (string, string) {
return d["es_id"].(string), d["es_index"].(string)
}

func HashOf(strings ...string) string {
h := sha256.New()
for _, s := range strings {
Expand Down

0 comments on commit aa95e9a

Please sign in to comment.