sumologic

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEnvironment = "us2"

Variables

View Source
var SumoMutexKV = mutexkv.NewMutexKV()

Functions

func Provider

func Provider() terraform.ResourceProvider

Types

type Client

type Client struct {
	AccessID    string
	AccessKey   string
	Environment string
	BaseURL     *url.URL
}

func NewClient

func NewClient(accessID, accessKey, environment string) (*Client, error)

func (*Client) CreateCloudsyslogSource

func (s *Client) CreateCloudsyslogSource(cloudSyslogSource CloudSyslogSource, collectorID int) (int, error)

func (*Client) CreateCollector

func (s *Client) CreateCollector(collector Collector) (int, error)

func (*Client) CreateHTTPSource

func (s *Client) CreateHTTPSource(httpSource HTTPSource, collectorID int) (int, error)

func (*Client) CreatePollingSource

func (s *Client) CreatePollingSource(source PollingSource, collectorID int) (int, error)

func (*Client) Delete

func (s *Client) Delete(urlPath string) ([]byte, error)

func (*Client) DeleteCollector

func (s *Client) DeleteCollector(id int) error

func (*Client) DestroySource

func (s *Client) DestroySource(sourceID int, collectorID int) error

func (*Client) Get

func (s *Client) Get(urlPath string) ([]byte, string, error)

func (*Client) GetCloudSyslogSource

func (s *Client) GetCloudSyslogSource(collectorID, sourceID int) (*CloudSyslogSource, error)

func (*Client) GetCollector

func (s *Client) GetCollector(id int) (*Collector, error)

func (*Client) GetCollectorName

func (s *Client) GetCollectorName(name string) (*Collector, error)

func (*Client) GetHTTPSource

func (s *Client) GetHTTPSource(collectorID, sourceID int) (*HTTPSource, error)

func (*Client) GetPollingSource

func (s *Client) GetPollingSource(collectorID, sourceID int) (*PollingSource, error)

func (*Client) GetSourceName

func (s *Client) GetSourceName(collectorID int, sourceName string) (*Source, error)

func (*Client) GetWithCookies

func (s *Client) GetWithCookies(urlPath string, cookies []*http.Cookie) ([]byte, string, error)

func (*Client) Post

func (s *Client) Post(urlPath string, payload interface{}) ([]byte, error)

func (*Client) PostWithCookies

func (s *Client) PostWithCookies(urlPath string, payload interface{}) ([]byte, []*http.Cookie, error)

func (*Client) Put

func (s *Client) Put(urlPath string, payload interface{}) ([]byte, error)

func (*Client) UpdateCloudSyslogSource

func (s *Client) UpdateCloudSyslogSource(source CloudSyslogSource, collectorID int) error

func (*Client) UpdateCollector

func (s *Client) UpdateCollector(collector Collector) error

func (*Client) UpdateHTTPSource

func (s *Client) UpdateHTTPSource(source HTTPSource, collectorID int) error

func (*Client) UpdatePollingSource

func (s *Client) UpdatePollingSource(source PollingSource, collectorID int) error

type CloudSyslogSource

type CloudSyslogSource struct {
	Source
	Token string `json:"url,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"`
	Links            []CollectorLink `json:"links,omitempty"`
	CollectorVersion string          `json:"collectorVersion,omitempty"`
	LastSeenAlive    int             `json:"lastSeenAlive,omitempty"`
	Alive            bool            `json:"alive,omitempty"`
}
type CollectorLink struct {
	Rel  string `json:"rel,omitempty"`
	Href string `json:"href,omitempty"`
}

type CollectorList

type CollectorList struct {
	Collectors []Collector `json:"collectors"`
}

type CollectorRequest

type CollectorRequest struct {
	Collector Collector `json:"collector"`
}

type CollectorResponse

type CollectorResponse struct {
	Collector Collector `json:"collector"`
}

type DefaultDateFormat

type DefaultDateFormat struct {
	Format  string `json:"format"`
	Locator string `json:"locator"`
}

type ErrorResponse

type ErrorResponse struct {
	Status  int    `json:"status"`
	Code    string `json:"code"`
	Message string `json:"message"`
}

type Filter

type Filter struct {
	Name       string `json:"name"`
	FilterType string `json:"filterType"`
	Regexp     string `json:"regexp"`
	Mask       string `json:"mask"`
}

type HTTPSource

type HTTPSource struct {
	Source
	MessagePerRequest bool   `json:"messagePerRequest"`
	URL               string `json:"url,omitempty"`
}

type PollingAuthentication

type PollingAuthentication struct {
	Type    string `json:"type"`
	AwsID   string `json:"awsId"`
	AwsKey  string `json:"awsKey"`
	RoleARN string `json:"roleARN"`
}

type PollingPath

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

type PollingResource

type PollingResource struct {
	ServiceType    string                `json:"serviceType"`
	Authentication PollingAuthentication `json:"authentication"`
	Path           PollingPath           `json:"path"`
}

type PollingSource

type PollingSource struct {
	Source
	ContentType   string               `json:"contentType"`
	ScanInterval  int                  `json:"scanInterval"`
	Paused        bool                 `json:"paused"`
	URL           string               `json:"url"`
	ThirdPartyRef PollingThirdPartyRef `json:"thirdPartyRef,omitempty"`
}

type PollingThirdPartyRef

type PollingThirdPartyRef struct {
	Resources []PollingResource `json:"resources"`
}

type Source

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"`
	MultilineProcessingEnabled bool                `json:"multilineProcessingEnabled"`
	UseAutolineMatching        bool                `json:"useAutolineMatching"`
	ManualPrefixRegexp         string              `json:"manualPrefixRegexp,omitempty"`
	ForceTimeZone              bool                `json:"forceTimeZone"`
	DefaultDateFormats         []DefaultDateFormat `json:"defaultDateFormats,omitempty"`
	Filters                    []Filter            `json:"filters,omitempty"`
	CutoffTimestamp            int                 `json:"cutoffTimestamp,omitempty"`
	CutoffRelativeTime         string              `json:"cutoffRelativeTime,omitempty"`
}

type SourceList

type SourceList struct {
	Sources []Source `json:"sources"`
}

Jump to

Keyboard shortcuts

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