package
0.22.0
Repository: https://github.com/fluxcd/go-git-providers.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
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.
GetDomainURL returns the domain URL prepended with https:// if a scheme is not set.
LicenseTemplateVar returns a pointer to a LicenseTemplate.
MakeClientOptions assembles a clientOptions struct from ClientOption mutator functions.
MakeRepositoryCreateOptions returns a RepositoryCreateOptions based off the mutator functions given to e.g.
Error implements the error interface.
ParseOrganizationURL parses an URL to an organization into a OrganizationRef object.
ParseOrgRepositoryURL parses a HTTPS clone URL into a OrgRepositoryRef object.
ParseTypeGit returns the URL to clone a repository using the Git protocol.
ParseTypeHTTPS returns the HTTPS URL to clone a repository.
ParseTypeSSH returns the URL to clone a repository using the SSH protocol.
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.
WithConditionalRequests instructs the client to use Conditional Requests to Stash.
WithCustomCAPostChainTransportHook registers a ChainableRoundTripperFunc "after" the cache and authentication transports in the chain.
WithDestructiveAPICalls tells the client whether it's allowed to do dangerous and possibly destructive actions, like e.g.
WithDomain initializes a Client for a custom instance of the given domain.
WithLogger initializes a Client for a custom Stash instance with a logger.
WithOAuth2Token initializes a Client which authenticates with Stash through an OAuth2 token.
WithPostChainTransportHook registers a ChainableRoundTripperFunc "after" the cache and authentication transports in the chain.
WithPreChainTransportHook registers a ChainableRoundTripperFunc "before" the cache and authentication transports in the chain.

# 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/.
MergeMethodMerge causes a pull request merge to create a simple merge commit.
MergeMethodSquash causes a pull request merge to first squash commits.
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.
TokenPermissionRWRepository Read/Write permission for public/private repositories.
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.
ErrGroupNotFound is returned when the gitlab group does not exist.
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.
ErrMissingHeader is returned when an expected header is missing from the HTTP response.
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

ClientOptions is the struct that tracks data about what options have been set.
CommitFile contains high-level information about a file added to a commit.
CommitInfo contains high-level information about a deploy key.
CommonClientOptions is a struct containing options that are generic to all clients.
DeployKeyInfo contains high-level information about a deploy key.
DeployTokenInfo contains high-level information about a deploy token.
EditOptions is provided to a PullRequestClient's "Edit" method for updating an existing pull request.
ErrIncorrectUser describes that the user provided was incorrect It is returned by `UserRepositories().Create` when an incorrect UserLogin is passed in.
FilesGetOptions specifies optional options when fetcing files.
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.
PullRequestInfo contains high-level information about a pull request.
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.
TreeEntry contains info about each tree object's structure in TreeInfo whether it is a file or tree.
TreeInfo contains high-level information about a git Tree representing the hierarchy between files in a Git repository.
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

BranchClient operates on the branches for a specific repository.
Client is an interface that allows talking to a Git provider.
ClientOption is the interface to implement for passing options to NewClient.
CloneableURL returns the HTTPS URL to clone the repository.
Commit represents a git commit.
CommitClient operates on the commits list for a specific repository.
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.
DeployToken represents a short-lived credential used to access a repository.
DeployTokenClient operates on the deploy token list of a specific repository.
FileClient operates on the branches for a specific repository.
FilesGetOption is an interface for applying options when fetching/getting files.
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.
Keyer is an interface that can be used to get a unique key for an object.
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.
PullRequest represents a pull request.
PullRequestClient operates on the pull requests for a specific repository.
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.
Slugger is an interface that can be used to get a unique slug for an object.
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.
Tree represents a git tree which is the hierarchical structure of your git data.
TreeClient operates on the trees for a Git repository which describe the hierarchy between files in the repository This client can be accessed through Repository.Trees().
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.
MergeMethod is an enum specifying the merge method for a pull request.
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.
TokenPermission is an enum specifying the permissions for a token.
TransportType is an enum specifying the transport type used when cloning a repository.