Documentation ¶
Index ¶
- type CloudsyslogSource
- type Collector
- type CollectorRequest
- type CollectorResponse
- type ErrorResponse
- type HttpSource
- type PollingAuthentication
- type PollingPath
- type PollingResource
- type PollingSource
- type PollingThirdPartyRef
- type Source
- type SumologicClient
- func (s *SumologicClient) CreateCloudsyslogSource(name string, collectorId int) (int, error)
- func (s *SumologicClient) CreateCollector(collector Collector) (int, error)
- func (s *SumologicClient) CreateHttpSource(name string, collectorId int) (int, error)
- func (s *SumologicClient) CreatePollingSource(name, content_type, category string, scan_interval int, paused bool, ...) (int, error)
- func (s *SumologicClient) Delete(urlPath string) ([]byte, error)
- func (s *SumologicClient) DeleteCollector(id int) error
- func (s *SumologicClient) DestroySource(sourceId int, collectorId int) error
- func (s *SumologicClient) Get(urlPath string) ([]byte, string, error)
- func (s *SumologicClient) GetCloudsyslogSource(collectorId, sourceId int) (*CloudsyslogSource, error)
- func (s *SumologicClient) GetCollector(id int) (*Collector, error)
- func (s *SumologicClient) GetHttpSource(collectorId, sourceId int) (*HttpSource, error)
- func (s *SumologicClient) GetPollingSource(collectorId, sourceId int) (*PollingSource, error)
- func (s *SumologicClient) Post(urlPath string, payload interface{}) ([]byte, error)
- func (s *SumologicClient) Put(urlPath string, payload interface{}) ([]byte, error)
- func (s *SumologicClient) UpdateCloudsyslogSource(source CloudsyslogSource, collectorId int) error
- func (s *SumologicClient) UpdateCollector(collector Collector) error
- func (s *SumologicClient) UpdateHttpSource(source HttpSource, collectorId int) error
- func (s *SumologicClient) UpdatePollingSource(source PollingSource, collectorId int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudsyslogSource ¶ added in v0.3.0
type CollectorRequest ¶
type CollectorRequest struct {
Collector Collector `json:"collector"`
}
type CollectorResponse ¶
type CollectorResponse struct {
Collector Collector `json:"collector"`
}
type ErrorResponse ¶ added in v0.2.3
type HttpSource ¶
type HttpSource struct { Source MessagePerRequest bool `json:"messagePerRequest"` Url string `json:"url,omitempty"` }
HTTP source specific
type PollingAuthentication ¶ added in v0.1.0
type PollingPath ¶ added in v0.1.0
type PollingResource ¶ added in v0.1.0
type PollingResource struct { ServiceType string `json:"serviceType"` Authentication PollingAuthentication `json:"authentication"` Path PollingPath `json:"path"` }
type PollingSource ¶ added in v0.1.0
type PollingSource struct { Source ContentType string `json:"contentType"` ScanInterval int `json:"scanInterval"` Paused bool `json:"paused"` ThirdPartyRef PollingThirdPartyRef `json:"thirdPartyRef,omitempty"` }
Polling source specific
type PollingThirdPartyRef ¶ added in v0.1.0
type PollingThirdPartyRef struct {
Resources []PollingResource `json:"resources"`
}
type Source ¶ added in v0.2.3
type Source struct { Id int `json:"id,omitempty"` Type string `json:"sourceType"` Name string `json:"name"` Description string `json:"description,omitempty"` Category string `json:"category,omitempty"` HostName string `json:"hostName,omitempty"` TimeZone string `json:"timeZone,omitempty"` AutomaticDateParsing bool `json:"automaticDateParsing,omitempty"` MultilineProcessingEnabled bool `json:"multilineProcessingEnabled,omitempty"` UseAutolineMatching bool `json:"useAutolineMatching,omitempty"` ManualPrefixRegexp string `json:"manualPrefixRegexp,omitempty"` ForceTimeZone bool `json:"forceTimeZone,omitempty"` DefaultDateFormat string `json:"defaultDateFormat,omitempty"` Filters []string `json:"filters,omitempty"` CutoffTimestamp int64 `json:"cutoffTimestamp,omitempty"` CutoffRelativeTime string `json:"cutoffRelativeTime,omitempty"` }
Common for all sources
type SumologicClient ¶
type SumologicClient struct { AccessId string AccessKey string Environment string BaseUrl *url.URL }
func NewClient ¶
func NewClient(accessId, accessKey, environment string) (*SumologicClient, error)
func (*SumologicClient) CreateCloudsyslogSource ¶ added in v0.3.0
func (s *SumologicClient) CreateCloudsyslogSource(name string, collectorId int) (int, error)
func (*SumologicClient) CreateCollector ¶
func (s *SumologicClient) CreateCollector(collector Collector) (int, error)
func (*SumologicClient) CreateHttpSource ¶
func (s *SumologicClient) CreateHttpSource(name string, collectorId int) (int, error)
func (*SumologicClient) CreatePollingSource ¶ added in v0.1.0
func (s *SumologicClient) CreatePollingSource(name, content_type, category string, scan_interval int, paused bool, collectorId int, auth PollingAuthentication, path PollingPath) (int, error)
func (*SumologicClient) DeleteCollector ¶
func (s *SumologicClient) DeleteCollector(id int) error
func (*SumologicClient) DestroySource ¶ added in v0.2.1
func (s *SumologicClient) DestroySource(sourceId int, collectorId int) error
func (*SumologicClient) GetCloudsyslogSource ¶ added in v0.3.0
func (s *SumologicClient) GetCloudsyslogSource(collectorId, sourceId int) (*CloudsyslogSource, error)
func (*SumologicClient) GetCollector ¶
func (s *SumologicClient) GetCollector(id int) (*Collector, error)
func (*SumologicClient) GetHttpSource ¶
func (s *SumologicClient) GetHttpSource(collectorId, sourceId int) (*HttpSource, error)
func (*SumologicClient) GetPollingSource ¶ added in v0.1.0
func (s *SumologicClient) GetPollingSource(collectorId, sourceId int) (*PollingSource, error)
func (*SumologicClient) Post ¶
func (s *SumologicClient) Post(urlPath string, payload interface{}) ([]byte, error)
func (*SumologicClient) Put ¶ added in v0.2.3
func (s *SumologicClient) Put(urlPath string, payload interface{}) ([]byte, error)
func (*SumologicClient) UpdateCloudsyslogSource ¶ added in v0.3.0
func (s *SumologicClient) UpdateCloudsyslogSource(source CloudsyslogSource, collectorId int) error
func (*SumologicClient) UpdateCollector ¶ added in v0.2.3
func (s *SumologicClient) UpdateCollector(collector Collector) error
func (*SumologicClient) UpdateHttpSource ¶ added in v0.2.3
func (s *SumologicClient) UpdateHttpSource(source HttpSource, collectorId int) error
func (*SumologicClient) UpdatePollingSource ¶ added in v0.3.0
func (s *SumologicClient) UpdatePollingSource(source PollingSource, collectorId int) error
Click to show internal directories.
Click to hide internal directories.