feed

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter added in v0.0.2

func Filter(ctx context.Context, cfg *config.Config, client aws.S3ClientAPI, announcers []announce.Announcer) error

Filter function filters the feed and uploads the filtered feed to the bucket if there is a new release

Types

type MockParser added in v1.3.4

type MockParser struct {
	mock.Mock
}

MockParser is an autogenerated mock type for the Parser type

func NewMockParser added in v1.3.4

func NewMockParser(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockParser

NewMockParser creates a new instance of MockParser. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockParser) EXPECT added in v1.3.4

func (_m *MockParser) EXPECT() *MockParser_Expecter

func (*MockParser) ParseURL added in v1.3.4

func (_m *MockParser) ParseURL(url string) (*gofeed.Feed, error)

ParseURL provides a mock function with given fields: url

type MockParser_Expecter added in v1.3.4

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

func (*MockParser_Expecter) ParseURL added in v1.3.4

func (_e *MockParser_Expecter) ParseURL(url interface{}) *MockParser_ParseURL_Call

ParseURL is a helper method to define mock.On call

  • url string

type MockParser_ParseURL_Call added in v1.3.4

type MockParser_ParseURL_Call struct {
	*mock.Call
}

MockParser_ParseURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseURL'

func (*MockParser_ParseURL_Call) Return added in v1.3.4

func (*MockParser_ParseURL_Call) Run added in v1.3.4

func (*MockParser_ParseURL_Call) RunAndReturn added in v1.3.4

func (_c *MockParser_ParseURL_Call) RunAndReturn(run func(string) (*gofeed.Feed, error)) *MockParser_ParseURL_Call

type Parser added in v0.0.5

type Parser interface {
	ParseURL(url string) (*gofeed.Feed, error)
}

Parser is an interface for parsing feed url

type ReleaseChecker

type ReleaseChecker struct {
	aws.S3ClientAPI

	Parser

	config.Repository
	// contains filtered or unexported fields
}

ReleaseChecker checks for new releases and uploads them to the bucket if there is a new release

func NewReleaseChecker

func NewReleaseChecker(client aws.S3ClientAPI, repo config.Repository, sem chan struct{}, parser Parser, bucketName string, logger zerolog.Logger, announcers []announce.Announcer) *ReleaseChecker

NewReleaseChecker creates a new ReleaseChecker instance

func (*ReleaseChecker) CheckGithubReleases

func (r *ReleaseChecker) CheckGithubReleases(ctx context.Context, projectName string, oneShot bool)

CheckGithubReleases checks for new releases and uploads them to the bucket if there is a new release

Jump to

Keyboard shortcuts

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