Documentation
¶
Index ¶
- Constants
- func NewTypedUIDFromString(s string) (types.TypedUID, error)
- type Issue
- func (i *Issue) AmplificationCount() int
- func (i *Issue) Body() string
- func (i *Issue) CommentsCount() int
- func (i *Issue) CreatedAt() time.Time
- func (i *Issue) DownvotesCount() int
- func (i *Issue) ImageURL() string
- func (i *Issue) MarshalJSON() ([]byte, error)
- func (i *Issue) SocialScore() float64
- func (i *Issue) SourceType() string
- func (i *Issue) SourceUIDs() []activitytypes.TypedUID
- func (i *Issue) Title() string
- func (i *Issue) UID() activitytypes.TypedUID
- func (i *Issue) URL() string
- func (i *Issue) UnmarshalJSON(data []byte) error
- func (i *Issue) UpvotesCount() int
- type IssuesFetcher
- type Release
- func (r *Release) AmplificationCount() int
- func (r *Release) Body() string
- func (r *Release) CommentsCount() int
- func (r *Release) CreatedAt() time.Time
- func (r *Release) DownvotesCount() int
- func (r *Release) ImageURL() string
- func (r *Release) MarshalJSON() ([]byte, error)
- func (r *Release) SocialScore() float64
- func (r *Release) SourceType() string
- func (r *Release) SourceUIDs() []activitytypes.TypedUID
- func (r *Release) Title() string
- func (r *Release) UID() activitytypes.TypedUID
- func (r *Release) URL() string
- func (r *Release) UnmarshalJSON(data []byte) error
- func (r *Release) UpvotesCount() int
- type ReleasesFetcher
- type Repository
- func (a *Repository) AmplificationCount() int
- func (a *Repository) Body() string
- func (a *Repository) CommentsCount() int
- func (a *Repository) CreatedAt() time.Time
- func (a *Repository) DownvotesCount() int
- func (a *Repository) ImageURL() string
- func (a *Repository) MarshalJSON() ([]byte, error)
- func (a *Repository) SocialScore() float64
- func (a *Repository) SourceType() string
- func (a *Repository) SourceUIDs() []activitytypes.TypedUID
- func (a *Repository) Title() string
- func (a *Repository) UID() activitytypes.TypedUID
- func (a *Repository) URL() string
- func (a *Repository) UnmarshalJSON(data []byte) error
- func (a *Repository) UpvotesCount() int
- type SourceIssues
- func (s *SourceIssues) Description() string
- func (s *SourceIssues) Icon() string
- func (s *SourceIssues) Initialize(logger *zerolog.Logger, config *sourcetypes.ProviderConfig) error
- func (s *SourceIssues) MarshalJSON() ([]byte, error)
- func (s *SourceIssues) Name() string
- func (s *SourceIssues) Stream(ctx context.Context, since activitytypes.Activity, ...)
- func (s *SourceIssues) Topics() []sourcetypes.TopicTag
- func (s *SourceIssues) UID() activitytypes.TypedUID
- func (s *SourceIssues) URL() string
- func (s *SourceIssues) UnmarshalJSON(data []byte) error
- type SourceRelease
- func (s *SourceRelease) Description() string
- func (s *SourceRelease) Icon() string
- func (s *SourceRelease) Initialize(logger *zerolog.Logger, config *sourcetypes.ProviderConfig) error
- func (s *SourceRelease) MarshalJSON() ([]byte, error)
- func (s *SourceRelease) Name() string
- func (s *SourceRelease) Stream(ctx context.Context, since activitytypes.Activity, ...)
- func (s *SourceRelease) Topics() []sourcetypes.TopicTag
- func (s *SourceRelease) UID() activitytypes.TypedUID
- func (s *SourceRelease) URL() string
- func (s *SourceRelease) UnmarshalJSON(data []byte) error
- type SourceTopic
- func (s *SourceTopic) Description() string
- func (s *SourceTopic) Icon() string
- func (s *SourceTopic) Initialize(logger *zerolog.Logger, config *types.ProviderConfig) error
- func (s *SourceTopic) MarshalJSON() ([]byte, error)
- func (s *SourceTopic) Name() string
- func (s *SourceTopic) Stream(ctx context.Context, since activitytypes.Activity, ...)
- func (s *SourceTopic) Topics() []types.TopicTag
- func (s *SourceTopic) UID() activitytypes.TypedUID
- func (s *SourceTopic) URL() string
- func (s *SourceTopic) UnmarshalJSON(data []byte) error
- type TopicFetcher
- type TypedUID
Constants ¶
View Source
const TypeGithubIssues = "githubissues"
View Source
const TypeGithubReleases = "githubreleases"
View Source
const TypeGithubTopic = "githubtopic"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Issue ¶
type Issue struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
Issue *github.Issue `json:"issue"`
SourceIDs []*TypedUID `json:"source_ids"`
}
func (*Issue) AmplificationCount ¶
func (*Issue) CommentsCount ¶
func (*Issue) DownvotesCount ¶
func (*Issue) MarshalJSON ¶
func (*Issue) SocialScore ¶
func (*Issue) SourceType ¶
func (*Issue) SourceUIDs ¶
func (i *Issue) SourceUIDs() []activitytypes.TypedUID
func (*Issue) UID ¶
func (i *Issue) UID() activitytypes.TypedUID
func (*Issue) UnmarshalJSON ¶
func (*Issue) UpvotesCount ¶
type IssuesFetcher ¶
IssuesFetcher implements preset search functionality for GitHub Issues
func NewIssuesFetcher ¶
func NewIssuesFetcher(logger *zerolog.Logger) *IssuesFetcher
func (*IssuesFetcher) FindByID ¶
func (f *IssuesFetcher) FindByID(ctx context.Context, id activitytypes.TypedUID, config *types.ProviderConfig) (types.Source, error)
func (*IssuesFetcher) Search ¶
func (f *IssuesFetcher) Search(ctx context.Context, query string, config *types.ProviderConfig) ([]types.Source, error)
func (*IssuesFetcher) SourceType ¶
func (f *IssuesFetcher) SourceType() string
type Release ¶
type Release struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
Release *github.RepositoryRelease `json:"release"`
SourceIDs []*TypedUID `json:"source_ids"`
}
func NewRelease ¶
func NewRelease() *Release
func (*Release) AmplificationCount ¶
func (*Release) CommentsCount ¶
func (*Release) DownvotesCount ¶
func (*Release) MarshalJSON ¶
func (*Release) SocialScore ¶
func (*Release) SourceType ¶
func (*Release) SourceUIDs ¶
func (r *Release) SourceUIDs() []activitytypes.TypedUID
func (*Release) UID ¶
func (r *Release) UID() activitytypes.TypedUID
func (*Release) UnmarshalJSON ¶
func (*Release) UpvotesCount ¶
type ReleasesFetcher ¶
ReleasesFetcher implements preset search functionality for GitHub Releases
func NewReleasesFetcher ¶
func NewReleasesFetcher(logger *zerolog.Logger) *ReleasesFetcher
func (*ReleasesFetcher) FindByID ¶
func (f *ReleasesFetcher) FindByID(ctx context.Context, id types2.TypedUID, config *types.ProviderConfig) (types.Source, error)
func (*ReleasesFetcher) Search ¶
func (f *ReleasesFetcher) Search(ctx context.Context, query string, config *types.ProviderConfig) ([]types.Source, error)
func (*ReleasesFetcher) SourceType ¶
func (f *ReleasesFetcher) SourceType() string
type Repository ¶
type Repository struct {
Repository *github.Repository `json:"repository"`
SourceIDs []activitytypes.TypedUID `json:"source_ids"`
}
Repository represents a repository result as an activity
func NewRepository ¶
func NewRepository() *Repository
func (*Repository) AmplificationCount ¶
func (a *Repository) AmplificationCount() int
func (*Repository) Body ¶
func (a *Repository) Body() string
func (*Repository) CommentsCount ¶
func (a *Repository) CommentsCount() int
func (*Repository) CreatedAt ¶
func (a *Repository) CreatedAt() time.Time
func (*Repository) DownvotesCount ¶
func (a *Repository) DownvotesCount() int
func (*Repository) ImageURL ¶
func (a *Repository) ImageURL() string
func (*Repository) MarshalJSON ¶
func (a *Repository) MarshalJSON() ([]byte, error)
func (*Repository) SocialScore ¶
func (a *Repository) SocialScore() float64
func (*Repository) SourceType ¶
func (a *Repository) SourceType() string
func (*Repository) SourceUIDs ¶
func (a *Repository) SourceUIDs() []activitytypes.TypedUID
func (*Repository) Title ¶
func (a *Repository) Title() string
func (*Repository) UID ¶
func (a *Repository) UID() activitytypes.TypedUID
func (*Repository) URL ¶
func (a *Repository) URL() string
func (*Repository) UnmarshalJSON ¶
func (a *Repository) UnmarshalJSON(data []byte) error
func (*Repository) UpvotesCount ¶
func (a *Repository) UpvotesCount() int
type SourceIssues ¶
type SourceIssues struct {
Owner string `json:"owner" validate:"required"`
Repo string `json:"repo" validate:"required"`
// contains filtered or unexported fields
}
func NewIssuesSource ¶
func NewIssuesSource() *SourceIssues
func (*SourceIssues) Description ¶
func (s *SourceIssues) Description() string
func (*SourceIssues) Icon ¶
func (s *SourceIssues) Icon() string
func (*SourceIssues) Initialize ¶
func (s *SourceIssues) Initialize(logger *zerolog.Logger, config *sourcetypes.ProviderConfig) error
func (*SourceIssues) MarshalJSON ¶
func (s *SourceIssues) MarshalJSON() ([]byte, error)
func (*SourceIssues) Name ¶
func (s *SourceIssues) Name() string
func (*SourceIssues) Stream ¶
func (s *SourceIssues) Stream(ctx context.Context, since activitytypes.Activity, feed chan<- activitytypes.Activity, errs chan<- error)
func (*SourceIssues) Topics ¶
func (s *SourceIssues) Topics() []sourcetypes.TopicTag
func (*SourceIssues) UID ¶
func (s *SourceIssues) UID() activitytypes.TypedUID
func (*SourceIssues) URL ¶
func (s *SourceIssues) URL() string
func (*SourceIssues) UnmarshalJSON ¶
func (s *SourceIssues) UnmarshalJSON(data []byte) error
type SourceRelease ¶
type SourceRelease struct {
Owner string `json:"owner" validate:"required"`
Repo string `json:"repo" validate:"required"`
Token string `json:"token"`
IncludePreleases bool `json:"includePrereleases"`
// contains filtered or unexported fields
}
func NewReleaseSource ¶
func NewReleaseSource() *SourceRelease
func (*SourceRelease) Description ¶
func (s *SourceRelease) Description() string
func (*SourceRelease) Icon ¶
func (s *SourceRelease) Icon() string
func (*SourceRelease) Initialize ¶
func (s *SourceRelease) Initialize(logger *zerolog.Logger, config *sourcetypes.ProviderConfig) error
func (*SourceRelease) MarshalJSON ¶
func (s *SourceRelease) MarshalJSON() ([]byte, error)
func (*SourceRelease) Name ¶
func (s *SourceRelease) Name() string
func (*SourceRelease) Stream ¶
func (s *SourceRelease) Stream(ctx context.Context, since activitytypes.Activity, feed chan<- activitytypes.Activity, errs chan<- error)
func (*SourceRelease) Topics ¶
func (s *SourceRelease) Topics() []sourcetypes.TopicTag
func (*SourceRelease) UID ¶
func (s *SourceRelease) UID() activitytypes.TypedUID
func (*SourceRelease) URL ¶
func (s *SourceRelease) URL() string
func (*SourceRelease) UnmarshalJSON ¶
func (s *SourceRelease) UnmarshalJSON(data []byte) error
type SourceTopic ¶
type SourceTopic struct {
Topic string `json:"topic" validate:"required"`
// contains filtered or unexported fields
}
SourceTopic fetches repositories for a single GitHub topic (tag) It can return either trending repositories (by stars) or newly created repositories.
func NewSourceTopic ¶
func NewSourceTopic() *SourceTopic
func (*SourceTopic) Description ¶
func (s *SourceTopic) Description() string
func (*SourceTopic) Icon ¶
func (s *SourceTopic) Icon() string
func (*SourceTopic) Initialize ¶
func (s *SourceTopic) Initialize(logger *zerolog.Logger, config *types.ProviderConfig) error
func (*SourceTopic) MarshalJSON ¶
func (s *SourceTopic) MarshalJSON() ([]byte, error)
func (*SourceTopic) Name ¶
func (s *SourceTopic) Name() string
func (*SourceTopic) Stream ¶
func (s *SourceTopic) Stream(ctx context.Context, since activitytypes.Activity, feed chan<- activitytypes.Activity, errs chan<- error)
func (*SourceTopic) Topics ¶
func (s *SourceTopic) Topics() []types.TopicTag
func (*SourceTopic) UID ¶
func (s *SourceTopic) UID() activitytypes.TypedUID
func (*SourceTopic) URL ¶
func (s *SourceTopic) URL() string
func (*SourceTopic) UnmarshalJSON ¶
func (s *SourceTopic) UnmarshalJSON(data []byte) error
type TopicFetcher ¶
TopicFetcher provides preset/search functionality for GitHub Topic sources
func NewTopicFetcher ¶
func NewTopicFetcher(logger *zerolog.Logger) *TopicFetcher
func (*TopicFetcher) FindByID ¶
func (f *TopicFetcher) FindByID(ctx context.Context, id activitytypes.TypedUID, config *types.ProviderConfig) (types.Source, error)
func (*TopicFetcher) Search ¶
func (f *TopicFetcher) Search(ctx context.Context, query string, config *types.ProviderConfig) ([]types.Source, error)
func (*TopicFetcher) SourceType ¶
func (f *TopicFetcher) SourceType() string
type TypedUID ¶
TypedUID is a custom TypedUID implementation for GitHub repository sources. We need it to read repository owner and name from the UID.
func (TypedUID) MarshalJSON ¶
func (*TypedUID) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.