Versions in this module Expand all Collapse all v1 v1.0.13 May 26, 2025 v1.0.12 May 26, 2025 v1.0.11 May 26, 2025 v1.0.10 May 26, 2025 v1.0.9 May 26, 2025 v1.0.8 May 26, 2025 v1.0.7 May 26, 2025 v1.0.6 May 26, 2025 v1.0.5 May 26, 2025 v1.0.4 May 26, 2025 v1.0.3 May 26, 2025 v1.0.2 May 26, 2025 v1.0.1 May 26, 2025 Changes in this version + func ConvertAPIURLToWebURL(apiURL string) (string, error) + func ListNotifications(options NotificationOptions) error + func MarkAsRead(id string) error + type BackgroundRefresher struct + func NewBackgroundRefresher(client *Client, interval time.Duration, options NotificationOptions) *BackgroundRefresher + func (b *BackgroundRefresher) ForceRefresh() + func (b *BackgroundRefresher) GetLastError() error + func (b *BackgroundRefresher) GetNotifications() []*github.Notification + func (b *BackgroundRefresher) IsRunning() bool + func (b *BackgroundRefresher) SetInterval(interval time.Duration) + func (b *BackgroundRefresher) SetOnUpdateCallback(callback func([]*github.Notification)) + func (b *BackgroundRefresher) SetOptions(options NotificationOptions) + func (b *BackgroundRefresher) Start() + func (b *BackgroundRefresher) Stop() + type CacheManager struct + Client *Client + Config *config.Config + Manager *cache.Manager + func NewCacheManager(client *Client, cfg *config.Config) (*CacheManager, error) + func (cm *CacheManager) Close() error + func (cm *CacheManager) GetNotifications(ctx context.Context, opts *github.NotificationListOptions) ([]*github.Notification, *github.Response, error) + func (cm *CacheManager) GetRepositoryNotifications(ctx context.Context, owner, repo string, opts *github.NotificationListOptions) ([]*github.Notification, *github.Response, error) + func (cm *CacheManager) InvalidateNotificationsCache() + func (cm *CacheManager) PrefetchNotificationDetails(notifications []*github.Notification) + type Client struct + func NewClient(ctx context.Context, opts ...ClientOption) (*Client, error) + func NewClientOrExit(ctx context.Context, opts ...ClientOption) *Client + func NewMockClient(ctx context.Context) (*Client, *httptest.Server, error) + func NewTestClient(ctx context.Context, handler http.Handler) (*Client, *httptest.Server, error) + func (c *Client) Do(req *http.Request, v interface{}) (*github.Response, error) + func (c *Client) FetchNotificationDetails(notifications []*github.Notification) error + func (c *Client) FilterNotifications(notifications []*github.Notification, filterString, sortBy string) []*github.Notification + func (c *Client) GetAllNotifications(opts NotificationOptions) ([]*github.Notification, error) + func (c *Client) GetFilteredNotifications(opts NotificationOptions) ([]*github.Notification, error) + func (c *Client) GetNotification(id string) (*github.Notification, error) + func (c *Client) GetNotificationsByOrg(org string, opts NotificationOptions) ([]*github.Notification, error) + func (c *Client) GetNotificationsByRepo(repo string, opts NotificationOptions) ([]*github.Notification, error) + func (c *Client) GetRawClient() *github.Client + func (c *Client) GetThread(threadID string) (*github.Notification, *github.Response, error) + func (c *Client) GetUnreadNotifications(opts NotificationOptions) ([]*github.Notification, error) + func (c *Client) GroupNotifications(ctx context.Context, notifications []*github.Notification, groupBy string) ([]*NotificationGroup, error) + func (c *Client) ListNotifications(opts *github.NotificationListOptions) ([]*github.Notification, *github.Response, error) + func (c *Client) MarkAllNotificationsRead() error + func (c *Client) MarkNotificationRead(threadID string) error + func (c *Client) MarkRepositoryNotificationsRead(owner, repo string) error + func (c *Client) MarkThreadRead(threadID string) (*github.Response, error) + func (c *Client) OptimizedGetAllNotifications(opts NotificationOptions) ([]*github.Notification, error) + func (c *Client) SetRawClient(client *github.Client) + func (c *Client) WithContext(ctx context.Context) *Client + type ClientOption func(*Client) + func WithBaseURL(baseURL string) ClientOption + func WithCacheTTL(cacheTTL time.Duration) ClientOption + func WithDebug(debug bool) ClientOption + func WithMaxConcurrent(maxConcurrent int) ClientOption + func WithRetryCount(retryCount int) ClientOption + func WithRetryDelay(retryDelay time.Duration) ClientOption + func WithTimeout(timeout time.Duration) ClientOption + func WithUploadURL(uploadURL string) ClientOption + type Filter struct + Field string + Operator string + Value string + type NotificationGroup struct + Count int + ID string + Name string + Notifications []*github.Notification + Type string + UnreadCount int + type NotificationOptions struct + All bool + BackgroundRefresh bool + BatchSize int + Before time.Time + CacheTTL time.Duration + FilterString string + MaxConcurrent int + OrgName string + Page int + Participating bool + PerPage int + RepoName string + Since time.Time + StreamResponse bool + Unread bool + UseCache bool + UseETag bool + UseOptimized bool + type NotificationResult struct + Error error + Notifications []*github.Notification + Response *github.Response + type NotificationStream struct + func NewNotificationStream(client *Client, options NotificationOptions) *NotificationStream + func (s *NotificationStream) CollectAll() ([]*github.Notification, error) + func (s *NotificationStream) Errors() <-chan error + func (s *NotificationStream) Notifications() <-chan *github.Notification + func (s *NotificationStream) Start() error + func (s *NotificationStream) Stop() v1.0.0 May 26, 2025