Documentation ¶
Overview ¶
package organization implements the `whosonfirst/go-whosonfirst-iterate/v2/emitter.Emitter` interface for iterating multiple repositories in a GitHub organization.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOrganizationEmitter ¶
NewOrganizationEmitter returns a new `OrganizationEmitter` configured by 'uri' which takes the form of:
org://{PATH}?{PARAMETERS}
Where {PATH} is an optional path where individual Git repositories should be downloaded for processing; {PARAMETERS} is optional and may be any of the valid parameters used in URIs to create a new `whosonfirst/go-whosonfirst-iterate-git.GitEmitter`. If {PATH} is not defined then Git repositories are download in to, and processed from, memory. If {PATH} is defined any Git repositories downloaded will be remove after processing (unless the `?preserve=1` query parameter is present).
Types ¶
type OrganizationEmitter ¶
type OrganizationEmitter implements the `emitter.Emitter` interface for iterating multiple repositories in a GitHub organization.
func (*OrganizationEmitter) WalkURI ¶
func (em *OrganizationEmitter) WalkURI(ctx context.Context, cb emitter.EmitterCallbackFunc, uri string) error
WalkURI fetchesone or more respositories belonging to a GitHub orgnization invoking 'cb' for each file in those respositores. The list of files to process is determined by 'uri' which takes the form of:
{GITHUB_ORGANIZATION}://?prefix={STRING}&exclude={STRING}&access_token={STRING}
Where {PREFIX} is zero or more "prefix" parameters to filter the list of repositories by for inclusion; {EXCLUDE} is zero or more "exclude" query parameters to filter the list of repositories by for exclusion; {ACCESS_TOKEN} is an optional GitHub API access token to include with the underlying calls to the GitHub API.