Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *elastic.Client // contains filtered or unexported fields }
Client ...
func NewClient ¶
NewClient creates an elastic search client and adds an index named fighters that will use the mapping variable to set the layout of its body if it doesn't already exist.
func (*Client) AddFighter ¶
AddFighter adds a fighter to the elasticsearch index c := es.NewClient(address, mappingPath, index) err := c.AddFighter(f)
func (*Client) GetFighters ¶
GetFighters ... queries the fighters index to unmarshal and store every fighter from the elastic search index to an array. Then passes a struct containing the array to a function that will print out a battle message.
Click to show internal directories.
Click to hide internal directories.