Documentation
¶
Index ¶
Constants ¶
View Source
const VERSION = "0.4.1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
Hook is a hook that writes logs of specified LogLevels to specified Writer
type Interaction ¶
type Interaction struct {
Timestamp time.Time `json:"timestamp"`
ProjectName string `json:"project"`
HostName string `json:"host"`
URL string `json:"url"`
Raw string `json:"raw,omitempty"`
ResponseHTTPVersion string `json:"responseHTTPVersion,omitempty"`
ResponseStatusCode string `json:"responseStatusCode,omitempty"`
ResponseStatusMessage string `json:"responseStatusMessage,omitempty"`
RequestHeader string `json:"requestHeader"`
RequestBody string `json:"requestBody,omitempty"`
ResponseHeader string `json:"responseHeader"`
ResponseBody string `json:"responseBody"`
}
type Options ¶
type Options struct {
Consumer string
ConfigFile string
InputFile string
Project string
Index string
Host string
Type string
Silent bool
Version bool
NoColor bool
Verbose bool
}
func ParseOptions ¶
func ParseOptions() *Options
ParseOptions parses the command line flags provided by a user
type Pusher ¶
type Pusher struct {
// contains filtered or unexported fields
}
func FromConfig ¶
func FromOptions ¶
func (*Pusher) SaveAnyJSONLToELK ¶ added in v0.4.0
func (p *Pusher) SaveAnyJSONLToELK()
func (*Pusher) SaveAnyJSONLToGraylog ¶ added in v0.4.0
func (p *Pusher) SaveAnyJSONLToGraylog()
func (*Pusher) SaveAnyToElk ¶ added in v0.4.0
func (p *Pusher) SaveAnyToElk()
func (*Pusher) SaveAnyToGraylog ¶ added in v0.4.0
func (p *Pusher) SaveAnyToGraylog()
func (*Pusher) SaveInteractionToElk ¶ added in v0.4.0
func (p *Pusher) SaveInteractionToElk()
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store allows to index and search documents.
func NewStore ¶
func NewStore(c StoreConfig) (*Store, error)
NewStore returns a new instance of the store.
func (*Store) CreateBulkFromData ¶
CreateBulkFromData takes a byte array and creates a BulkRequest from it and stores it at the defined index.
func (*Store) CreateFromData ¶
CreateFromData takes a byte array and creates an IndexRequest from it and stores it at the defined index.
func (*Store) CreateFromObject ¶
Create indexes a new document into store.
func (*Store) CreateIndex ¶
CreateIndex creates a new index with mapping.
type StoreConfig ¶
type StoreConfig struct {
Client *elasticsearch.Client
IndexName string
ProjectName string
}
StoreConfig configures the store.
Click to show internal directories.
Click to hide internal directories.