commitstream

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit added in v0.1.4

type Commit struct {
	Name  string
	Email struct {
		User   string
		Domain string
	}
	Repo    string
	Message string
}

type CommitStream added in v0.1.4

type CommitStream struct {
	GithubOptions *GithubOptions
	Filter        *Filter
	Stats         ProcessingStats
	Debug         bool
	// contains filtered or unexported fields
}

func (*CommitStream) Start added in v0.1.4

func (cs *CommitStream) Start(handler Handler)

type Config added in v0.1.4

type Config struct {
	Settings YamlConfig
	FilePath string
}

func (*Config) Load added in v0.1.4

func (c *Config) Load() error

type CsvHander added in v0.1.4

type CsvHander struct{}

func (CsvHander) Callback added in v0.1.4

func (h CsvHander) Callback(commits []Commit)

type ElasticHandler added in v0.1.4

type ElasticHandler struct {
	RemoteURI    string
	Username     string
	Password     string
	NoDuplicates bool
	UseZincAwsS3 bool
}

func (ElasticHandler) Callback added in v0.1.4

func (e ElasticHandler) Callback(commits []Commit)

func (*ElasticHandler) DoPost added in v0.1.4

func (e *ElasticHandler) DoPost(path string, data string)

func (*ElasticHandler) Import added in v0.1.4

func (e *ElasticHandler) Import(commit Commit)

func (*ElasticHandler) ImportBulk added in v0.1.4

func (e *ElasticHandler) ImportBulk(commits []Commit)

func (*ElasticHandler) Setup added in v0.1.4

func (e *ElasticHandler) Setup()

type FeedResult

type FeedResult struct {
	CommitAuthors map[string]string
	RepoName      string
	RepoURL       string
	Message       string
}

type Filter added in v0.1.4

type Filter struct {
	Email               string
	Name                string
	Enabled             bool
	IgnorePrivateEmails bool
	IncludeMessages     bool
	SearchAllCommits    bool
	DomainsFile         string
	DomainsList         map[string]bool
}

type GithubHandler added in v0.1.4

type GithubHandler struct {
	Cstream *CommitStream
	// contains filtered or unexported fields
}

func (*GithubHandler) Run added in v0.1.4

func (gh *GithubHandler) Run(results chan<- []Commit)

type GithubOptions added in v0.1.4

type GithubOptions struct {
	AuthToken string
	Rate      int
}

type Handler added in v0.1.4

type Handler interface {
	Callback([]Commit)
}

type NoHandler added in v0.1.4

type NoHandler struct{}

func (NoHandler) Callback added in v0.1.4

func (n NoHandler) Callback(commits []Commit)

type ProcessingStats added in v0.1.4

type ProcessingStats struct {
	IncomingRate  uint32
	ProcessedRate uint32
	FilteredRate  uint32
	Total         uint32
}

type Session

type Session struct {
	// contains filtered or unexported fields
}

type YamlConfig added in v0.1.4

type YamlConfig struct {
	Destination   string
	Elasticsearch struct {
		Uri          string
		Username     string
		Password     string
		UseZincAwsS3 bool `yaml:"use-zinc-aws-s3"`
		NoDuplicates bool `yaml:"no-duplicates"`
	}

	Github struct {
		Token string
	}

	Script struct {
		Path       string
		MaxWorkers int `yaml:"max-workers"`
	}
}

Jump to

Keyboard shortcuts

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