Categorycode.gitea.io/sdk/gitea
modulepackage
0.19.0
Repository: https://gitea.com/gitea/go-sdk
Documentation: pkg.go.dev

# Functions

GetAgent returns a ssh agent.
NewClient initializes and returns a API client.
NewClientWithHTTP creates an API client with a custom http client Deprecated use SetHTTPClient option.
NewHTTPSignWithCert can be used to create a HTTPSign with a certificate if no principal is specified it returns the first certificate found.
NewHTTPSignWithPubkey can be used to create a HTTPSign with a public key if no fingerprint is specified it returns the first public key found.
OptionalBool convert a bool to a bool reference.
OptionalInt64 convert a int64 to a int64 reference.
OptionalString convert a string to a string reference.
SetBasicAuth is an option for NewClient to set username and password.
SetContext is an option for NewClient to set the default context.
SetDebugMode is an option for NewClient to enable debug mode.
SetGiteaVersion configures the Client to assume the given version of the Gitea server, instead of querying the server for it when initializing.
SetHTTPClient is an option for NewClient to set custom http client.
SetOTP is an option for NewClient to set OTP for 2FA.
SetSudo is an option for NewClient to set sudo header.
SetToken is an option for NewClient to set token.
SetUserAgent is an option for NewClient to set user-agent header.
UseSSHCert is an option for NewClient to enable SSH certificate authentication via HTTPSign If you want to auth against the ssh-agent you'll need to set a principal, if you want to use a file on disk you'll need to specify sshKey.
UseSSHPubkey is an option for NewClient to enable SSH pubkey authentication via HTTPSign If you want to auth against the ssh-agent you'll need to set a fingerprint, if you want to use a file on disk you'll need to specify sshKey.
VerifyWebhookSignature verifies that a payload matches the X-Gitea-Signature based on a secret.
VerifyWebhookSignatureMiddleware is a http.Handler for verifying X-Gitea-Signature on incoming webhooks.
Version return the library version.

# Constants

AccessModeAdmin admin access.
AccessModeNone no access.
AccessModeOwner owner.
AccessModeRead read access.
AccessModeWrite write access.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GitServiceGitea represents a gitea service.
GitServiceGithub represents github.com.
GitServiceGitlab represents a gitlab service.
GitServiceGogs represents a gogs service.
GitServicePlain represents a plain git service.
HookTypeDingtalk webhook that dingtalk understand.
HookTypeDiscord webhook that discord understand.
HookTypeFeishu webhook that feishu understand.
HookTypeGitea webhook that gitea understand.
HookTypeGogs webhook that gogs understand.
HookTypeMsteams webhook that msteams understand.
HookTypeSlack webhook that slack understand.
HookTypeTelegram webhook that telegram understand.
IssueFormElementCheckboxes are a multi checkbox input.
IssueFormElementDropdown is a select form.
IssueFormElementInput is a single line input.
IssueFormElementMarkdown is markdown rendered to the form for context, but omitted in the resulting issue.
IssueFormElementTextarea is a multi line input.
IssueTypeAll pr and issue.
IssueTypeIssue only issues.
IssueTypePull only pulls.
MergeStyleMerge merge pull as usual.
MergeStyleRebase rebase pull.
MergeStyleRebaseMerge rebase and merge pull.
MergeStyleSquash squash and merge pull.
NotifyStatusPinned notification is pinned by user.
NotifyStatusRead was already read by user.
NotifyStatusUnread was not read.
NotifySubjectClosed if subject is a pull/issue and is closed at the moment.
NotifySubjectCommit an commit is subject of an notification.
NotifySubjectIssue an issue is subject of an notification.
NotifySubjectMerged if subject is a pull and got merged.
NotifySubjectOpen if subject is a pull/issue and is open at the moment.
NotifySubjectPull an pull is subject of an notification.
NotifySubjectRepository an repository is subject of an notification.
RepoTypeFork is a repo witch was forked from an other one.
RepoTypeMirror represents an mirror repo.
RepoTypeNone dont specify a type.
RepoTypeSource is the default repo type.
RepoUnitActions represents actions of a repository.
RepoUnitCode represent file view of a repository.
RepoUnitExtIssues represent external issues of a repository.
RepoUnitExtWiki represent external wiki of a repository.
RepoUnitIssues represent issues of a repository.
RepoUnitPackages represents packages of a repository.
RepoUnitProjects represent projects of a repository.
RepoUnitPulls represent pulls of a repository.
RepoUnitReleases represent releases of a repository.
RepoUnitWiki represent wiki of a repository.
ReviewStateApproved pr is approved.
ReviewStateComment is a comment review.
ReviewStatePending pr state is pending.
ReviewStateRequestChanges changes for pr are requested.
ReviewStateRequestReview review is requested from user.
ReviewStateUnknown state of pr is unknown.
StateAll is all.
StateClosed pr/issue is closed.
StateOpen pr/issue is opend.
StatusError is for when the Status is Error.
StatusFailure is for when the Status is Failure.
StatusPending is for when the Status is Pending.
StatusSuccess is for when the Status is Success.
StatusWarning is for when the Status is Warning.
TarGZArchive represent tar.gz format.
TrustModelCollaborator gpg signature has to be owned by a repo collaborator.
TrustModelCollaboratorCommitter gpg signature has to match committer and owned by a repo collaborator.
TrustModelCommitter gpg signature has to match committer.
TrustModelDefault use TM set by global config.
VisibleTypeLimited Visible for every connected user.
VisibleTypePrivate Visible only for organization's members.
VisibleTypePublic Visible for everyone.
ZipArchive represent zip format.

# Structs

AccessToken represents an API access token.
AddCollaboratorOption options when adding a user as a collaborator of a repository.
AddTimeOption options for adding time to an issue.
AdminListOrgsOptions options for listing admin's organizations.
AdminListUsersOptions options for listing admin users.
AnnotatedTag represents an annotated tag.
AnnotatedTagObject contains meta information of the tag object.
Attachment a generic attachment.
Branch represents a repository branch.
BranchProtection represents a branch protection for a repository.
ChangedFile is a changed file in a diff.
Client represents a thread-safe Gitea API client.
CollaboratorPermissionResult result type for CollaboratorPermission.
CombinedStatus holds the combined state of several statuses for a single commit.
Comment represents a comment on a commit or issue.
Commit contains information generated from a Git commit.
CommitAffectedFiles store information about files affected by the commit.
CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE.
CommitMeta contains meta information of a commit in terms of API.
CommitStats contains stats from a Git commit.
CommitUser contains information of a user in the context of a commit.
Compare represents a comparison between two commits.
ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content.
CreateAccessTokenOption options when create access token.
CreateBranchOption options when creating a branch in a repository.
CreateBranchProtectionOption options for creating a branch protection.
CreateEmailOption options when creating email addresses.
CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used).
CreateForkOption options for creating a fork.
CreateGPGKeyOption options create user GPG key.
CreateHookOption options when create a hook.
CreateIssueCommentOption options for creating a comment on an issue.
CreateIssueOption options to create one issue.
CreateKeyOption options when creating a key.
CreateLabelOption options for creating a label.
CreateMilestoneOption options for creating a milestone.
CreateOauth2Option required options for creating an Application.
CreateOrgOption options for creating an organization.
CreatePullRequestOption options when creating a pull request.
CreatePullReviewComment represent a review comment for creation api.
CreatePullReviewOptions are options to create a pull review.
No description provided by the author
CreateReleaseOption options when creating a release.
CreateRepoFromTemplateOption options when creating repository using a template.
CreateRepoOption options when creating repository.
CreateSecretOption represents the options for creating a secret.
CreateStatusOption holds the information needed to create a new Status for a Commit.
CreateTagOption options when creating a tag.
CreateTeamOption options for creating a team.
CreateUserOption create user options.
CronTask represents a Cron task.
DeleteEmailOption options when deleting email addresses.
DeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used).
DeployKey a deploy key.
DismissPullReviewOptions are options to dismiss a pull review.
EditAttachmentOptions options for editing attachments.
EditBranchProtectionOption options for editing a branch protection.
EditGitHookOption options when modifying one Git hook.
EditHookOption options when modify one hook.
EditIssueCommentOption options for editing a comment.
EditIssueOption options for editing an issue.
EditLabelOption options for editing a label.
EditMilestoneOption options for editing a milestone.
EditOrgOption options for editing an organization.
EditPullRequestOption options when modify pull request.
EditReleaseOption options when editing a release.
EditRepoOption options when editing a repository's properties.
EditTeamOption options for editing a team.
EditUserOption edit user options.
Email an email address belonging to a user.
ErrUnknownVersion is an unknown version from the API.
ExternalTracker represents settings for external tracker.
ExternalWiki represents setting for external wiki.
FileCommitResponse contains information generated from a Git commit for a repo's file.
FileDeleteResponse contains information about a repo's file that was deleted.
FileLinksResponse contains the links for a repo's file.
FileOptions options for all file APIs.
FileResponse contains information about a repo's file.
GitBlobResponse represents a git blob.
GitEntry represents a git tree.
GitHook represents a Git repository hook.
GitObject represents a Git object.
GitTreeResponse returns a git tree.
GlobalAPISettings contains global api settings exposed by it.
GlobalAttachmentSettings contains global Attachment settings exposed by API.
GlobalRepoSettings represent the global repository settings of a gitea instance witch is exposed by API.
GlobalUISettings represent the global ui settings of a gitea instance witch is exposed by API.
GPGKey a user GPG key to sign commit and tag in repository.
GPGKeyEmail an email attached to a GPGKey.
Hook a hook is a web hook when one repository changed.
HTTPSign contains the signer used for signing requests.
HTTPSignConfig contains the configuration for creating a HTTPSign.
Identity for a person's identity like an author or committer.
InternalTracker represents settings for internal tracker.
Issue represents an issue in a repository.
IssueFormElement describes a part of a IssueTemplate form.
IssueFormElementAttributes contains the combined set of attributes available on all element types.
IssueFormElementValidations contains the combined set of validations available on all element types.
IssueLabelsOption a collection of labels.
IssueTemplate provides metadata and content on an issue template.
Label a label to an issue or a pr.
ListAccessTokensOptions options for listing a users's access tokens.
ListBranchProtectionsOptions list branch protection options.
ListCollaboratorsOptions options for listing a repository's collaborators.
ListCommitOptions list commit options.
ListCronTaskOptions list options for ListCronTasks.
ListDeployKeysOptions options for listing a repository's deploy keys.
ListEmailsOptions options for listing current's user emails.
ListFollowersOptions options for listing followers.
ListFollowingOptions options for listing a user's users being followed.
ListForksOptions options for listing repository's forks.
ListGPGKeysOptions options for listing a user's GPGKeys.
ListHooksOptions options for listing hooks.
ListIssueCommentOptions list comment options.
ListIssueOption list issue options.
ListLabelsOptions options for listing repository's labels.
ListMilestoneOption list milestone options.
ListNotificationOptions represents the filter options.
ListOauth2Option for listing Oauth2 Applications.
ListOptions options for using Gitea's API pagination.
ListOrgActionSecretOption list OrgActionSecret options.
ListOrgMembershipOption list OrgMembership options.
ListOrgReposOptions options for a organization's repositories.
ListOrgsOptions options for listing organizations.
ListPackagesOptions options for listing packages.
ListPublicKeysOptions options for listing a user's PublicKeys.
ListPullRequestCommitsOptions options for listing pull requests.
ListPullRequestFilesOptions options for listing pull request files.
ListPullRequestsOptions options for listing pull requests.
ListPullReviewsOptions options for listing PullReviews.
ListReleaseAttachmentsOptions options for listing release's attachments.
ListReleasesOptions options for listing repository's releases.
ListRepoActionSecretOption list RepoActionSecret options.
ListRepoBranchesOptions options for listing a repository's branches.
ListRepoGitHooksOptions options for listing repository's githooks.
ListReposOptions options for listing repositories.
ListRepoTagsOptions options for listing a repository's tags.
ListRepoTopicsOptions options for listing repo's topics.
ListStargazersOptions options for listing a repository's stargazers.
ListStatusesOption options for listing a repository's commit's statuses.
ListTeamMembersOptions options for listing team's members.
ListTeamRepositoriesOptions options for listing team's repositories.
ListTeamsOptions options for listing teams.
ListTrackedTimesOptions options for listing repository's tracked times.
MarkNotificationOptions represents the filter & modify options.
MergePullRequestOption options when merging a pull request.
MigrateRepoOption options for migrating a repository from an external service.
Milestone milestone is a collection of issues on one repository.
NotificationSubject contains the notification subject (Issue/Pull/Commit).
NotificationThread expose Notification on API.
Oauth2 represents an Oauth2 Application.
Organization represents an organization.
OrgPermissions represents the permissions for an user in an organization.
Package represents a package.
PackageFile represents a file from a package.
PayloadCommit represents a commit.
PayloadCommitVerification represents the GPG verification of a commit.
PayloadUser represents the author or committer of a commit.
Permission represents a set of permissions.
PRBranchInfo information about a branch.
PublicKey publickey is a user key to push code to repository.
PullRequest represents a pull request.
PullRequestDiffOptions options for GET /repos/<owner>/<repo>/pulls/<idx>.[diff|patch].
PullRequestMeta PR info if an issue is a PR.
PullReview represents a pull request review.
PullReviewComment represents a comment on a pull request review.
PullReviewRequestOptions are options to add or remove pull review requests.
PushMirrorResponse returns a git push mirror.
Reaction contain one reaction.
Reference represents a Git reference.
Release represents a repository release.
RepoCommit contains information of a commit in the context of a repository.
Repository represents a repository.
RepositoryMeta basic repository information.
Response represents the gitea response.
SearchRepoOptions options for searching repositories.
SearchTeamsOptions options for searching teams.
SearchUsersOption options for SearchUsers.
No description provided by the author
Status holds a single Status of a single Commit.
StopWatch represents a running stopwatch of an issue / pr.
SubmitPullReviewOptions are options to submit a pending pull review.
Tag represents a repository tag.
Team represents a team in an organization.
TeamSearchResults is the JSON struct that is returned from Team search API.
TrackedTime worked time for an issue / pr.
TransferRepoOption options when transfer a repository's ownership.
UpdateFileOptions options for updating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used).
User represents a user.
UserSettings represents user settings.
UserSettingsOptions represents options to change user settings.
WatchInfo represents an API watch status of one repository.

# Type aliases

AccessMode represent the grade of access you have to something.
AccessTokenScope represents the scope for an access token.
ArchiveType represent supported archive formats by gitea.
ClientOption are functions used to init a new client.
GitServiceType represents a git service.
HookType represent all webhook types gitea currently offer.
IssueFormElementType is an enum.
IssueType is issue a pull or only an issue.
MergeStyle is used specify how a pull is merged.
NotifyStatus notification status type.
NotifySubjectState reflect state of notification subject.
NotifySubjectType represent type of notification subject.
RepoType represent repo type.
RepoUnitType represent all unit types of a repo gitea currently offer.
ReviewStateType review state type.
StateType issue state type.
StatusState holds the state of a Status It can be "pending", "success", "error", "failure", and "warning".
TrustModel represent how git signatures are handled in a repository.
VisibleType defines the visibility.