output

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	APIKey        string `yaml:"api_key"`
	ClientTimeout int    `yaml:"client_timeout"`
	SourceID      string `yaml:"source_id"`
}

Cfg stores the configuration parameters for NS1

type Feed

type Feed struct {
	Name     string `yaml:"name"`
	FeedName string `yaml:"feed_name"`
}

Feed contains all the information related one single Feed for the NS1 API call

type NS1

type NS1 struct {
	Cfg *Cfg
	// contains filtered or unexported fields
}

NS1 stores the NSONE API client and some internal configuration to send the data to NSONE

func (*NS1) Configure

func (ns1 *NS1) Configure(cfg *Cfg) error

Configure sets the configuration for the NS1 client

func (NS1) GetFeedsForSourceID

func (ns1 NS1) GetFeedsForSourceID(sourceID string) (map[string]bool, error)

GetFeedsForSourceID returns a map with all the feed names as keys for future checks

func (*NS1) Push

func (ns1 *NS1) Push(data map[string]*internal.FeedData) error

Push will send the data to the NSONE API

Jump to

Keyboard shortcuts

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