Documentation ¶
Index ¶
- func NewClient(authContext context.Context, ev gordon.Env) (*github.Client, error)
- type Client
- func (c *Client) Asset(ctx context.Context, repo *gogh.Repo, assetID int64) (io.ReadCloser, error)
- func (c *Client) LatestRelease(ctx context.Context, repo *gogh.Repo) (*github.RepositoryRelease, error)
- func (c *Client) Release(ctx context.Context, repo *gogh.Repo, tag string) (*github.RepositoryRelease, error)
- type FileTokenManager
- type MemoryTokenManager
- type TokenManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Asset ¶
Asset downloads an asset. Parameters:
- repo: Target repository.
- assetID: Target asset ID.
func (*Client) LatestRelease ¶
func (c *Client) LatestRelease(ctx context.Context, repo *gogh.Repo) (*github.RepositoryRelease, error)
LatestRelease gets the latest release. Parameters:
- repo: Target repository.
type FileTokenManager ¶ added in v0.1.17
type FileTokenManager struct {
// contains filtered or unexported fields
}
func (*FileTokenManager) DeleteGithubToken ¶ added in v0.1.17
func (m *FileTokenManager) DeleteGithubToken(user string) error
func (*FileTokenManager) GetGithubToken ¶ added in v0.1.17
func (m *FileTokenManager) GetGithubToken(user string) (string, error)
func (*FileTokenManager) SetGithubToken ¶ added in v0.1.17
func (m *FileTokenManager) SetGithubToken(user, token string) error
type MemoryTokenManager ¶ added in v0.1.10
type MemoryTokenManager struct {
// contains filtered or unexported fields
}
func (*MemoryTokenManager) DeleteGithubToken ¶ added in v0.1.10
func (m *MemoryTokenManager) DeleteGithubToken(user string) error
func (*MemoryTokenManager) GetGithubToken ¶ added in v0.1.10
func (m *MemoryTokenManager) GetGithubToken(user string) (string, error)
func (*MemoryTokenManager) SetGithubToken ¶ added in v0.1.10
func (m *MemoryTokenManager) SetGithubToken(user, token string) error
type TokenManager ¶ added in v0.1.10
type TokenManager interface { SetGithubToken(user, token string) error GetGithubToken(user string) (string, error) DeleteGithubToken(user string) error }
func NewFile ¶ added in v0.1.17
func NewFile(file string) (TokenManager, error)
func NewFileForHost ¶ added in v0.1.17
func NewFileForHost(host string) (TokenManager, error)
func NewMemory ¶ added in v0.1.10
func NewMemory(s string) (TokenManager, error)
Click to show internal directories.
Click to hide internal directories.