Documentation ¶
Index ¶
- func CanMakeMailchimpRequest(client *MailchimpClient) error
- func FetchEntriesFromContentful(contentType string, spaceID string, token string, limit string) []byte
- type CmaClient
- type ContributionStats
- type DHubTags
- type GitHubAggregator
- type IssueStats
- type MailchimpClient
- type MailchimpList
- type MailchimpMember
- type MailchimpMemberRequest
- type MailchimpMemberStatus
- type NewsFeed
- type Stars
- type StatRange
- type Statistics
- type TwitterInfo
- type VideoInfo
- type YoutubeBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanMakeMailchimpRequest ¶ added in v1.46.3
func CanMakeMailchimpRequest(client *MailchimpClient) error
Types ¶
type ContributionStats ¶
type ContributionStats struct { Commits map[StatRange]int `json:"commits"` Contributors map[StatRange]int `json:"unique_contributors"` }
ContributionStats contains aggregated info related to contribution to a organization repositories
type DHubTags ¶
type DHubTags struct {
// contains filtered or unexported fields
}
DHubTags is a structure for retrieving DockerHub tags
func NewDockerHubTags ¶
NewDockerHubTags creates new struct with default values
type GitHubAggregator ¶
type GitHubAggregator struct {
// contains filtered or unexported fields
}
GitHubAggregator is a structure for retrieving DockerHub tags
func NewGitHubAggregator ¶
func NewGitHubAggregator(ghToken string, includeBeta bool) *GitHubAggregator
NewGitHubAggregator creates new struct with default values
func (*GitHubAggregator) GetContributionStats ¶
func (s *GitHubAggregator) GetContributionStats() *ContributionStats
GetContributionStats returns aggregated contribution stats for organization repositories
func (*GitHubAggregator) GetIssueStats ¶
func (s *GitHubAggregator) GetIssueStats() *IssueStats
GetIssueStats returns issues/PRs statistics
func (*GitHubAggregator) GetLatestTags ¶
func (s *GitHubAggregator) GetLatestTags() map[string]string
GetLatestTags returns copy of latest versions/tags map
func (*GitHubAggregator) GetStars ¶
func (s *GitHubAggregator) GetStars() *Stars
GetStars returns count of stars for each repository and total count
type IssueStats ¶
type IssueStats struct { OpenPRs int `json:"open_pull_requests"` OpenIssues int `json:"open_issues"` ClosedIssues int `json:"closed_issues"` TotalIssues int `json:"total_issues"` }
IssueStats hold issues stats
type MailchimpClient ¶
func NewMailchimpClient ¶
func NewMailchimpClient(apiKey string) *MailchimpClient
func (*MailchimpClient) AddSubscription ¶
func (client *MailchimpClient) AddSubscription(rq io.Reader, listId string) (*MailchimpMember, error)
type MailchimpList ¶
type MailchimpList struct {
*gochimp3.ListResponse
}
func (*MailchimpList) ResubsribeMember ¶ added in v1.46.3
func (l *MailchimpList) ResubsribeMember(email string, rq *MailchimpMemberRequest) (*MailchimpMember, error)
type MailchimpMember ¶
type MailchimpMemberRequest ¶
type MailchimpMemberRequest = gochimp3.MemberRequest
type MailchimpMemberStatus ¶ added in v1.46.3
type MailchimpMemberStatus string
const ( MailchimpMemberSubscribed MailchimpMemberStatus = "subscribed" MailchimpMemberUnsubscribed MailchimpMemberStatus = "unsubscribed" MailchimpMemberPending MailchimpMemberStatus = "pending" MailchimpMemberNone MailchimpMemberStatus = "" )
type NewsFeed ¶
type NewsFeed struct { Items []struct { Fields struct { Text string `json:"text"` Hashtags []string `json:"hashtags"` } `json:"fields"` } `json:"items"` }
NewsFeed is a struct for the Contentful News Feed
type Statistics ¶
type Statistics struct { CommentCount uint64 `json:"comment_count,omitempty"` LikeCount uint64 `json:"like_count,omitempty"` ViewCount uint64 `json:"view_count,omitempty"` }
Statistics represents video statistics
type TwitterInfo ¶
type TwitterInfo struct { Text string `json:"text"` Entities struct{} `json:"entities"` }
TwitterInfo is a struct for mapping the News Feed to Twitter
func GetTwitterFeed ¶
func GetTwitterFeed(cma *CmaClient, count int) []*TwitterInfo
GetTwitterFeed provides a list of tweets from local cache or Contentful after mapping
type VideoInfo ¶
type VideoInfo struct { ID string `json:"id"` Title string `json:"title"` Thumbnail youtube.ThumbnailDetails `json:"thumbnail,omitempty"` Duration string `json:"duration,omitempty"` PublishedAt string `json:"published_at"` Statistics Statistics `json:"statistics,omitempty"` }
VideoInfo represents video details
type YoutubeBuffer ¶
type YoutubeBuffer struct {
// contains filtered or unexported fields
}
YoutubeBuffer represents buffer of videos
func NewYoutubeVideosBuffer ¶
func NewYoutubeVideosBuffer( channelID string, cacheSize int, apiKey string, ) (*YoutubeBuffer, error)
NewYoutubeVideosBuffer creates new buffer of YouTube videos info
func (*YoutubeBuffer) GetAllVideos ¶
func (y *YoutubeBuffer) GetAllVideos() []VideoInfo
GetAllVideos returns all videos available in the buffer
func (*YoutubeBuffer) GetVideos ¶
func (y *YoutubeBuffer) GetVideos(c int) []VideoInfo
GetVideos returns slice with specified count of videos