Skip to content

Go library for querying ECS fields by name.

License

Notifications You must be signed in to change notification settings

andrewkroh/go-ecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-ecs

go-ecs is a library for querying ECS fields by name to obtain the fields definition (e.g. Elasticsearch field data type, description, etc).

The library includes data from tagged released of elastic/ecs.

Install

go get github.com/andrewkroh/go-ecs@main

Usage

package main

import (
	"fmt"

	"github.com/andrewkroh/go-ecs"
)

func main() {
	field, err := ecs.Lookup("host.os.name", "8.10")
	if err != nil {
		return err
	}

	fmt.Println("data_type", field.DataType)
	fmt.Println("is array", field.Array)
	fmt.Println("pattern", field.Pattern)
	fmt.Println("description", field.Description)
}

About

Go library for querying ECS fields by name.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 3

  •  
  •  
  •  

Languages