package
0.0.8
Repository: https://github.com/dinosk/go-git-providers.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

BoolVar returns a pointer to the given bool.
BuildClientFromTransportChain builds a *http.Client from a chain of ChainableRoundTripperFuncs.
GetCloneURL returns the URL to clone a repository for a given transport type.
LicenseTemplateVar returns a pointer to a LicenseTemplate.
MakeRepositoryCreateOptions returns a RepositoryCreateOptions based off the mutator functions given to e.g.
ParseOrganizationURL parses an URL to an organization into a OrganizationRef object.
ParseOrgRepositoryURL parses a HTTPS clone URL into a OrgRepositoryRef object.
ParseUserRepositoryURL parses a HTTPS clone URL into a UserRepositoryRef object.
ParseUserURL parses an URL to an organization into a UserRef object.
RepositoryPermissionVar returns a pointer to a RepositoryPermission.
RepositoryVisibilityVar returns a pointer to a RepositoryVisibility.
StringVar returns a pointer to the given string.
ValidateAndDefaultInfo can be used in client Create() and Reconcile() functions, where the request object, which implements InfoRequest, shall be first validated, and then defaulted.
ValidateLicenseTemplate validates a given LicenseTemplate.
ValidateRepositoryPermission validates a given RepositoryPermission.
ValidateRepositoryVisibility validates a given RepositoryVisibility.

# Constants

IdentityTypeOrganization represents an identity for an organization.
IdentityTypeSuborganization represents an identity for a sub-organization.
IdentityTypeUser represents an identity for a user account.
LicenseTemplateApache2 specifies use of the Apache 2.0 license, see https://choosealicense.com/licenses/apache-2.0/.
LicenseTemplateGPL3 specifies use of the GNU General Public License v3.0, see https://choosealicense.com/licenses/gpl-3.0/.
LicenseTemplateMIT specifies use of the MIT license, see https://choosealicense.com/licenses/mit/.
RepositoryPermissionAdmin ("admin") - team members can pull, push and administer this repository This is called "admin" or "owner" in GitLab.
RepositoryPermissionMaintain ("maintain") - team members can manage the repository without access to sensitive or destructive actions.
RepositoryPermissionPull ("pull") - team members can pull, but not push to or administer this repository This is called "guest" in GitLab.
RepositoryPermissionPush ("push") - team members can pull and push, but not administer this repository This is called "developer" in GitLab.
RepositoryPermissionTriage ("triage") - team members can proactively manage issues and pull requests without write access.
RepositoryVisibilityInternal specifies that the repository should accessible within the own organization.
RepositoryVisibilityPrivate specifies that the repository should only be accessible by specifically added team members.
RepositoryVisibilityPublic specifies that the repository should be publicly accessible.
TransportTypeGit specifies a clone URL of the form: git@<domain>:<org>/[<sub-orgs...>/]<repo>.git.
TransportTypeHTTPS specifies a clone URL of the form: https://<domain>/<org>/[<sub-orgs...>/]<repo>.git.
TransportTypeSSH specifies a clone URL of the form: ssh://git@<domain>/<org>/[<sub-orgs...>/]<repo>.

# Variables

ErrAlreadyExists is returned by .Create() requests if the given resource already exists.
ErrDestructiveCallDisallowed happens when the client isn't set up with WithDestructiveAPICalls() but a destructive action is called.
ErrDomainUnsupported describes the case where e.g.
ErrInvalidArgument describes a generic error where an invalid argument have been specified to a function.
ErrInvalidClientOptions is the error returned when calling NewClient() with invalid options (e.g.
ErrInvalidPermissionLevel is the error returned when there is no mapping from the given level to the gitprovider levels.
ErrInvalidServerData is returned when the server returned invalid data, e.g.
ErrInvalidTransportChainReturn is returned if a ChainableRoundTripperFunc returns nil, which is invalid.
ErrNoProviderSupport describes that the provider doesn't support the requested feature.
ErrNotFound is returned by .Get() and .Update() calls if the given resource doesn't exist.
ErrNotTopLevelOrganization describes the case where it's mandatory to specify a top-level organization (e.g.
ErrUnexpectedEvent describes a case where something really unexpected happened in the program.
ErrURLInvalid is returned if an URL is invalid when parsing.
ErrURLMissingRepoName is returned if there is no repository name in the URL.
ErrURLUnsupportedParts is returned if an URL with fragment, query values and/or user information is parsed.
ErrURLUnsupportedScheme is returned if an URL without the HTTPS scheme is parsed.

# Structs

CommonClientOptions is a struct containing options that are generic to all clients.
DeployKeyInfo contains high-level information about a deploy key.
HTTPError is an error that contains context about the HTTP request/response that failed.
InvalidCredentialsError describes that that the request login credentials (e.g.
OrganizationInfo represents an (top-level- or sub-) organization.
OrganizationRef is an implementation of OrganizationRef.
OrgRepositoryRef is a struct with information about a specific repository owned by an organization.
RateLimitError is an error, extending HTTPError, that contains context about rate limits.
RepositoryCreateOptions specifies optional options when creating a repository.
RepositoryInfo represents a Git repository provided by a Git provider.
TeamAccessInfo contains high-level information about a team's access to a repository.
TeamInfo is a representation for a team of users inside of an organization.
UserRef represents a user account in a Git provider.
UserRepositoryRef is a struct with information about a specific repository owned by a user.
ValidationError is an error, extending HTTPError, that contains context about failed server-side validation.
ValidationErrorItem represents a single invalid field in an invalid request.

# Interfaces

Client is an interface that allows talking to a Git provider.
DefaultedInfoRequest is a superset of InfoRequest, also including a Default() function that can modify the underlying object, adding default values.
Deletable is an interface which all objects that can be deleted using the Client implement.
DeployKey represents a short-lived credential (e.g.
DeployKeyClient operates on the access credential list for a specific repository.
IdentityRef references an organization or user account in a Git provider.
InfoRequest is an interface which all {Object}Info objects that can be used as Create() or Reconcile() requests in the Client should implement.
Object is the interface all types should implement.
Organization represents an organization in a Git provider.
OrganizationBound describes an object that is bound to a given organization, e.g.
OrganizationsClient operates on organizations the user has access to.
OrgRepositoriesClient operates on repositories for organizations.
OrgRepository describes a repository owned by an organization.
Reconcilable is an interface which all objects that can be reconciled using the Client implement.
RepositoryBound describes an object that is bound to a given repository, e.g.
RepositoryCreateOption is an interface for applying options to when creating repositories.
RepositoryReconcileOption is an interface for applying options to when reconciling repositories.
RepositoryRef describes a reference to a repository owned by either a user account or organization.
ResourceClient allows access to resource-specific sub-clients.
Team represents a team in an organization in a Git provider.
TeamAccess describes a binding between a repository and a team.
TeamAccessClient operates on the teams list for a specific repository.
TeamsClient allows reading teams for a specific organization.
Updatable is an interface which all objects that can be updated using the Client implement.
UserRepositoriesClient operates on repositories for users.
UserRepository describes a repository owned by an user.

# Type aliases

ChainableRoundTripperFunc is a function that returns a higher-level "out" RoundTripper, chained to call the "in" RoundTripper internally, with extra logic.
IdentityType is a typed string for what kind of identity type an IdentityRef is.
LicenseTemplate is an enum specifying a license template that can be used when creating a repository.
ProviderID is a typed string for a given Git provider The provider constants are defined in their respective packages.
RepositoryPermission is an enum specifying the access level for a certain team or person for a given repository.
RepositoryVisibility is an enum specifying the visibility of a repository.
TransportType is an enum specifying the transport type used when cloning a repository.