Documentation
¶
Index ¶
- Constants
- func NewLogger() *logger
- func SaveAnyJSONLToElk(file string, indexName string, project string)
- func SaveAnyToElk(file string, indexName string, project string)
- func SaveInteractionToElk(file string, indexName string, project string, host string)
- type Config
- type Hook
- type Interaction
- type LogEntry
- type Options
- type Pusher
- type Store
- type StoreConfig
Constants ¶
View Source
const VERSION = "0.3.3"
Variables ¶
This section is empty.
Functions ¶
func SaveAnyJSONLToElk ¶
func SaveAnyToElk ¶
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 {
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 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.