githubapi

package
v0.0.0-...-e8827da Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 16 Imported by: 2

Documentation

Overview

Package githubapi implements notifications.Service using GitHub API clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(clientV3 *githubv3.Client, clientV4 *githubv4.Client, router github.Router) notifications.Service

NewService creates a GitHub-backed notifications.Service using given GitHub clients. At this time it infers the current user from the client (its authentication info), and cannot be used to serve multiple users.

Caching can't be used for Activity.ListNotifications until GitHub REST API v3 fixes the odd behavior of returning 304 even when some notifications get marked as read. Otherwise read notifications remain forever (until a new notification comes in).

This service uses Cache-Control: no-cache request header to disable caching. Responses from cache must be marked with "X-From-Cache" header (i.e., the field MarkCachedResponses in httpcache.Transport must be set to true).

If router is nil, github.DotCom router is used, which links to subjects on github.com.

Types

This section is empty.

Jump to

Keyboard shortcuts

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