Documentation ¶
Index ¶
- func Des(esRes *esapi.Response) (r map[string]interface{}, err error)
- func Find(slice []string, val string) (int, bool)
- func FormatExists(i interface{}) bool
- func MapToYamlBytes(r map[string]interface{}) (b []byte, err error)
- func MapToYamlish(r map[string]interface{}, s int)
- func ParseBytes(b []byte, fmtExists bool, outputFmt string) (err error)
- func Request(r esRequest, c *elastic7.Client) error
- func RequestNew(r esRequest, c *elastic7.Client) ([]byte, error)
- func SetFormat(s reflect.Value, outputFmt string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Find ¶
https://golangcode.com/check-if-element-exists-in-slice/ Find takes a slice and looks for an element in it. If found it will return it's key, otherwise it will return -1 and a bool of false.
func FormatExists ¶
func FormatExists(i interface{}) bool
Check if the 'Format' field exists for a struct beneath a provided interface
func MapToYamlBytes ¶
Convert a generic interface of type map[string]interface{} to yaml bytes
func MapToYamlish ¶
Display a generic interface as yaml
func ParseBytes ¶
Convert bytes into a desired output format
func RequestNew ¶
Generic function used to execute requests and return bytes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.