Documentation
¶
Index ¶
- Variables
- type Github
- func (gh *Github) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)
- func (gh *Github) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)
- func (gh *Github) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
- func (gh *Github) Validate(ctx context.Context) (annotations.Annotations, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidAssetDomains = []string{"avatars.githubusercontent.com"}
Functions ¶
This section is empty.
Types ¶
type Github ¶
type Github struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, githubOrgs []string, instanceURL, accessToken string) (*Github, error)
New returns the v2 version of the github connector.
func (*Github) Asset ¶
GetAsset takes an input AssetRef and attempts to fetch it using the connector's authenticated http client It streams a response, always starting with a metadata object, following by chunked payloads for the asset.
func (*Github) ResourceSyncers ¶
func (gh *Github) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
func (*Github) Validate ¶
func (gh *Github) Validate(ctx context.Context) (annotations.Annotations, error)
Validate hits the Github API to validate that the configured credentials are still valid.
Click to show internal directories.
Click to hide internal directories.