sumologic

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudsyslogSource added in v0.3.0

type CloudsyslogSource struct {
	Source
	Token string `json:"token,omitempty"`
}

type Collector

type Collector struct {
	Id            int    `json:"id,omitempty"`
	CollectorType string `json:"collectorType,omitempty"`
	Name          string `json:"name"`
	Description   string `json:"description,omitempty"`
	Category      string `json:"category,omitempty"`
	TimeZone      string `json:"timeZone,omitempty"`
}

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 ErrorResponse struct {
	Status  int    `json:"status"`
	Code    string `json:"code"`
	Message string `json:"message"`
}

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 PollingAuthentication struct {
	Type   string `json:"type"`
	AwsId  string `json:"awsId"`
	AwsKey string `json:"awsKey"`
}

type PollingPath added in v0.1.0

type PollingPath struct {
	Type           string `json:"type"`
	BucketName     string `json:"bucketName"`
	PathExpression string `json:"pathExpression"`
}

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) Delete

func (s *SumologicClient) Delete(urlPath string) ([]byte, 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) Get

func (s *SumologicClient) Get(urlPath string) ([]byte, string, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL