Documentation
¶
Overview ¶
package forgejo implements a client for the Forgejo API. The version corresponds to the highest supported version of the forgejo API, but backwards-compatibility is mostly given.
Index ¶
- Constants
- func GetAgent() (agent.Agent, error)
- func OptionalBool(v bool) *bool
- func OptionalInt64(v int64) *int64
- func OptionalString(v string) *string
- func VerifyWebhookSignature(secret, expected string, payload []byte) (bool, error)
- func VerifyWebhookSignatureMiddleware(secret string) func(http.Handler) http.Handler
- func Version() string
- type APRemoteFollowOption
- type AccessMode
- type AccessToken
- type AccessTokenScope
- type ActionRun
- type ActionRunJob
- type ActionRunner
- type ActionTask
- type ActionVariable
- type Activity
- type ActivityOpType
- type ActivityPubObject
- type ActivityPubSigner
- type AddCollaboratorOption
- type AddTimeOption
- type AdminListAllEmailsOptions
- type AdminListOrgsOptions
- type AdminListRunnersOptions
- type AdminListUnadoptedOptions
- type AdminListUserAccessTokensOptions
- type AdminListUsersOptions
- type AdminSearchEmailsOptions
- type AnnotatedTag
- type AnnotatedTagObject
- type ArchiveType
- type Attachment
- type BlockedUser
- type Branch
- type BranchProtection
- type ChangeFileOperation
- type ChangeFilesOptions
- type ChangedFile
- type Client
- func (c *Client) AcceptRepoTransfer(owner, reponame string) (*Repository, *Response, error)
- func (c *Client) ActivityPubFollow(opt APRemoteFollowOption) (*Response, error)
- func (c *Client) AddCollaborator(user, repo, collaborator string, opt AddCollaboratorOption) (*Response, error)
- func (c *Client) AddEmail(opt CreateEmailOption) ([]*Email, *Response, error)
- func (c *Client) AddIssueLabels(owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)
- func (c *Client) AddIssueSubscription(owner, repo string, index int64, user string) (*Response, error)
- func (c *Client) AddRepoFlag(owner, repo, flag string) (*Response, error)
- func (c *Client) AddRepoTeam(user, repo, team string) (*Response, error)
- func (c *Client) AddRepoTopic(user, repo, topic string) (*Response, error)
- func (c *Client) AddTeamMember(id int64, user string) (*Response, error)
- func (c *Client) AddTeamRepository(id int64, org, repo string) (*Response, error)
- func (c *Client) AddTime(owner, repo string, index int64, opt AddTimeOption) (*TrackedTime, *Response, error)
- func (c *Client) AdminAddRuleToQuotaGroup(quotaGroup, quotaRule string) (*Response, error)
- func (c *Client) AdminAddUserToQuotaGroup(quotaGroup, username string) (*Response, error)
- func (c *Client) AdminAdoptRepository(owner, repo string) (*Response, error)
- func (c *Client) AdminCreateHook(opt CreateHookOption) (*Hook, *Response, error)
- func (c *Client) AdminCreateOrg(user string, opt CreateOrgOption) (*Organization, *Response, error)
- func (c *Client) AdminCreateQuotaGroup(opt CreateQuotaGroupOption) (*models.QuotaGroup, *Response, error)
- func (c *Client) AdminCreateQuotaRule(opt CreateQuotaRuleOption) (*models.QuotaRuleInfo, *Response, error)
- func (c *Client) AdminCreateRepo(user string, opt CreateRepoOption) (*Repository, *Response, error)
- func (c *Client) AdminCreateUser(opt CreateUserOption) (*User, *Response, error)
- func (c *Client) AdminCreateUserAccessToken(user string, opt CreateAccessTokenOption) (*AccessToken, *Response, error)
- func (c *Client) AdminCreateUserPublicKey(user string, opt CreateKeyOption) (*PublicKey, *Response, error)
- func (c *Client) AdminDeleteHook(id int64) (*Response, error)
- func (c *Client) AdminDeleteQuotaGroup(quotaGroup string) (*Response, error)
- func (c *Client) AdminDeleteQuotaRule(quotaRule string) (*Response, error)
- func (c *Client) AdminDeleteRunner(runnerID int64) (*Response, error)
- func (c *Client) AdminDeleteUnadoptedRepository(owner, repo string) (*Response, error)
- func (c *Client) AdminDeleteUser(user string) (*Response, error)
- func (c *Client) AdminDeleteUserAccessToken(user, token string) (*Response, error)
- func (c *Client) AdminDeleteUserEmails(user string, opt DeleteEmailOption) (*Response, error)
- func (c *Client) AdminDeleteUserPublicKey(user string, keyID int) (*Response, error)
- func (c *Client) AdminEditHook(id int64, opt EditHookOption) (*Hook, *Response, error)
- func (c *Client) AdminEditQuotaRule(quotaRule string, opt EditQuotaRuleOption) (*models.QuotaRuleInfo, *Response, error)
- func (c *Client) AdminEditUser(user string, opt EditUserOption) (*Response, error)
- func (c *Client) AdminGetHook(id int64) (*Hook, *Response, error)
- func (c *Client) AdminGetQuotaGroup(quotaGroup string) (*models.QuotaGroup, *Response, error)
- func (c *Client) AdminGetQuotaRule(quotaRule string) (*models.QuotaRuleInfo, *Response, error)
- func (c *Client) AdminGetRunner(runnerID int64) (*ActionRunner, *Response, error)
- func (c *Client) AdminGetUserQuota(user string) (models.QuotaInfo, *Response, error)
- func (c *Client) AdminListActionRunJobs(opt ListActionJobsOption) ([]*ActionRunJob, *Response, error)
- func (c *Client) AdminListAllEmails(opt AdminListAllEmailsOptions) ([]*Email, *Response, error)
- func (c *Client) AdminListHooks(opt ListHooksOptions) ([]*Hook, *Response, error)
- func (c *Client) AdminListOrgs(opt AdminListOrgsOptions) ([]*Organization, *Response, error)
- func (c *Client) AdminListQuotaGroups() ([]*models.QuotaGroup, *Response, error)
- func (c *Client) AdminListQuotaRules() ([]*models.QuotaRuleInfo, *Response, error)
- func (c *Client) AdminListRunners(opt AdminListRunnersOptions) ([]*ActionRunner, *Response, error)
- func (c *Client) AdminListUnadopted(opt AdminListUnadoptedOptions) ([]string, *Response, error)
- func (c *Client) AdminListUserAccessTokens(user string, opt AdminListUserAccessTokensOptions) ([]*AccessToken, *Response, error)
- func (c *Client) AdminListUserEmails(user string) ([]*Email, *Response, error)
- func (c *Client) AdminListUsers(opt AdminListUsersOptions) ([]*User, *Response, error)
- func (c *Client) AdminListUsersInQuotaGroup(quotaGroup string) ([]*User, *Response, error)
- func (c *Client) AdminRegisterRunner(opt RegisterRunnerOption) (*RegisterRunnerResponse, *Response, error)
- func (c *Client) AdminRemoveRuleFromQuotaGroup(quotaGroup, quotaRule string) (*Response, error)
- func (c *Client) AdminRemoveUserFromQuotaGroup(quotaGroup, username string) (*Response, error)
- func (c *Client) AdminRenameUser(user string, opt RenameUserOption) (*Response, error)
- func (c *Client) AdminSearchEmails(opt AdminSearchEmailsOptions) ([]*Email, *Response, error)
- func (c *Client) AdminSetUserQuotaGroups(user string, opt SetUserQuotaGroupsOption) (*Response, error)
- func (c *Client) BlockUser(username string) (*Response, error)
- func (c *Client) CancelScheduledAutoMerge(owner, repo string, index int64) (*Response, error)
- func (c *Client) ChangeFiles(owner, repo string, opt ChangeFilesOptions) (*FilesResponse, *Response, error)
- func (c *Client) CheckIssueSubscription(owner, repo string, index int64) (*WatchInfo, *Response, error)
- func (c *Client) CheckMyQuota(ctx context.Context, subject QuotaSubject) (bool, Response, error)
- func (c *Client) CheckNotifications() (int64, *Response, error)
- func (c *Client) CheckOrgMembership(org, user string) (bool, *Response, error)
- func (c *Client) CheckOrgQuota(ctx context.Context, org string, subject QuotaSubject) (bool, Response, error)
- func (c *Client) CheckPublicOrgMembership(org, user string) (bool, *Response, error)
- func (c *Client) CheckRepoFlag(owner, repo, flag string) (bool, *Response, error)
- func (c *Client) CheckRepoTeam(user, repo, team string) (*Team, *Response, error)
- func (c *Client) CheckRepoWatch(owner, repo string) (bool, *Response, error)
- func (c *Client) CheckServerVersionConstraint(constraint string) error
- func (c *Client) ClearIssueLabels(owner, repo string, index int64) (*Response, error)
- func (c *Client) CollaboratorPermission(user, repo, collaborator string) (*CollaboratorPermissionResult, *Response, error)
- func (c *Client) CompareCommits(user, repo, prev, current string) (*Compare, *Response, error)
- func (c *Client) ConvertToNormalRepo(user, repo string) (*Repository, *Response, error)
- func (c *Client) CreateAccessToken(user string, opt CreateAccessTokenOption) (*AccessToken, *Response, error)
- func (c *Client) CreateBranch(owner, repo string, opt CreateBranchOption) (*Branch, *Response, error)
- func (c *Client) CreateBranchProtection(owner, repo string, opt CreateBranchProtectionOption) (*BranchProtection, *Response, error)
- func (c *Client) CreateDeployKey(user, repo string, opt CreateKeyOption) (*DeployKey, *Response, error)
- func (c *Client) CreateFile(owner, repo, filepath string, opt CreateFileOptions) (*FileResponse, *Response, error)
- func (c *Client) CreateFork(user, repo string, form CreateForkOption) (*Repository, *Response, error)
- func (c *Client) CreateGPGKey(opt CreateGPGKeyOption) (*GPGKey, *Response, error)
- func (c *Client) CreateIssue(owner, repo string, opt CreateIssueOption) (*Issue, *Response, error)
- func (c *Client) CreateIssueAttachment(owner, repo string, index int64, file io.Reader, filename string) (*Attachment, *Response, error)
- func (c *Client) CreateIssueBlocking(owner, repo string, index int64, meta IssueMeta) (*Issue, *Response, error)
- func (c *Client) CreateIssueComment(owner, repo string, index int64, opt CreateIssueCommentOption) (*Comment, *Response, error)
- func (c *Client) CreateIssueCommentAttachment(owner, repo string, commentID int64, file io.Reader, filename string) (*Attachment, *Response, error)
- func (c *Client) CreateIssueDependency(owner, repo string, index int64, meta IssueMeta) (*Issue, *Response, error)
- func (c *Client) CreateLabel(owner, repo string, opt CreateLabelOption) (*Label, *Response, error)
- func (c *Client) CreateMilestone(owner, repo string, opt CreateMilestoneOption) (*Milestone, *Response, error)
- func (c *Client) CreateMyHook(opt CreateHookOption) (*Hook, *Response, error)
- func (c *Client) CreateOauth2(opt CreateOauth2Option) (*Oauth2, *Response, error)
- func (c *Client) CreateOrg(opt CreateOrgOption) (*Organization, *Response, error)
- func (c *Client) CreateOrgActionSecret(org string, opt CreateSecretOption) (*Response, error)
- func (c *Client) CreateOrgActionVariable(org string, opt CreateVariableOption) (*Response, error)
- func (c *Client) CreateOrgHook(org string, opt CreateHookOption) (*Hook, *Response, error)
- func (c *Client) CreateOrgLabel(org string, opt CreateLabelOption) (*Label, *Response, error)
- func (c *Client) CreateOrgRepo(org string, opt CreateRepoOption) (*Repository, *Response, error)
- func (c *Client) CreatePublicKey(opt CreateKeyOption) (*PublicKey, *Response, error)
- func (c *Client) CreatePullRequest(owner, repo string, opt CreatePullRequestOption) (*PullRequest, *Response, error)
- func (c *Client) CreatePullReview(owner, repo string, index int64, opt CreatePullReviewOptions) (*PullReview, *Response, error)
- func (c *Client) CreatePullReviewComment(owner, repo string, index, id int64, opt CreatePullReviewCommentOptions) (*PullReviewComment, *Response, error)
- func (c *Client) CreateRelease(owner, repo string, opt CreateReleaseOption) (*Release, *Response, error)
- func (c *Client) CreateReleaseAttachment(user, repo string, release int64, file io.Reader, filename string) (*Attachment, *Response, error)
- func (c *Client) CreateRepo(opt CreateRepoOption) (*Repository, *Response, error)
- func (c *Client) CreateRepoActionSecret(user, repo string, opt CreateSecretOption) (*Response, error)
- func (c *Client) CreateRepoActionVariable(owner, repo string, opt CreateVariableOption) (*Response, error)
- func (c *Client) CreateRepoFromTemplate(templateOwner, templateRepo string, opt CreateRepoFromTemplateOption) (*Repository, *Response, error)
- func (c *Client) CreateRepoHook(user, repo string, opt CreateHookOption) (*Hook, *Response, error)
- func (c *Client) CreateReviewRequests(owner, repo string, index int64, opt PullReviewRequestOptions) (*Response, error)
- func (c *Client) CreateStatus(owner, repo, sha string, opts CreateStatusOption) (*Status, *Response, error)
- func (c *Client) CreateTag(user, repo string, opt CreateTagOption) (*Tag, *Response, error)
- func (c *Client) CreateTagProtection(owner, repo string, opt CreateTagProtectionOption) (*TagProtection, *Response, error)
- func (c *Client) CreateTeam(org string, opt CreateTeamOption) (*Team, *Response, error)
- func (c *Client) CreateUserActionSecret(opt CreateSecretOption) (*Response, error)
- func (c *Client) CreateUserActionVariable(opt CreateVariableOption) (*Response, error)
- func (c *Client) CreateWikiPage(owner, repo string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)
- func (c *Client) DeleteAccessToken(user string, value any) (*Response, error)deprecated
- func (c *Client) DeleteAccessTokenByID(ctx context.Context, user string, id int64) (Response, error)
- func (c *Client) DeleteAccessTokenByName(ctx context.Context, user, name string) (Response, error)
- func (c *Client) DeleteAllRepoFlags(owner, repo string) (*Response, error)
- func (c *Client) DeleteBranchProtection(owner, repo, name string) (*Response, error)
- func (c *Client) DeleteCollaborator(user, repo, collaborator string) (*Response, error)
- func (c *Client) DeleteDeployKey(owner, repo string, keyID int64) (*Response, error)
- func (c *Client) DeleteEmail(opt DeleteEmailOption) (*Response, error)
- func (c *Client) DeleteFile(owner, repo, filepath string, opt DeleteFileOptions) (*Response, error)
- func (c *Client) DeleteGPGKey(keyID int64) (*Response, error)
- func (c *Client) DeleteIssue(user, repo string, id int64) (*Response, error)
- func (c *Client) DeleteIssueAttachment(owner, repo string, index, attachmentID int64) (*Response, error)
- func (c *Client) DeleteIssueComment(owner, repo string, commentID int64) (*Response, error)
- func (c *Client) DeleteIssueCommentAttachment(owner, repo string, commentID, attachmentID int64) (*Response, error)
- func (c *Client) DeleteIssueCommentReaction(owner, repo string, commentID int64, reaction string) (*Response, error)
- func (c *Client) DeleteIssueLabel(owner, repo string, index, label int64) (*Response, error)
- func (c *Client) DeleteIssueReaction(owner, repo string, index int64, reaction string) (*Response, error)
- func (c *Client) DeleteIssueStopwatch(owner, repo string, index int64) (*Response, error)
- func (c *Client) DeleteIssueSubscription(owner, repo string, index int64, user string) (*Response, error)
- func (c *Client) DeleteLabel(owner, repo string, id int64) (*Response, error)
- func (c *Client) DeleteMilestone(owner, repo string, id int64) (*Response, error)
- func (c *Client) DeleteMilestoneByName(owner, repo, name string) (*Response, error)
- func (c *Client) DeleteMyHook(id int64) (*Response, error)
- func (c *Client) DeleteOauth2(oauth2id int64) (*Response, error)
- func (c *Client) DeleteOrg(orgname string) (*Response, error)
- func (c *Client) DeleteOrgActionSecret(org, secretName string) (*Response, error)
- func (c *Client) DeleteOrgActionVariable(org, variableName string) (*Response, error)
- func (c *Client) DeleteOrgAvatar(ctx context.Context, org string) (Response, error)
- func (c *Client) DeleteOrgHook(org string, id int64) (*Response, error)
- func (c *Client) DeleteOrgLabel(org string, id int64) (*Response, error)
- func (c *Client) DeleteOrgMembership(org, user string) (*Response, error)
- func (c *Client) DeleteOrgRunner(org string, runnerID int64) (*Response, error)
- func (c *Client) DeletePackage(owner, packageType, name, version string) (*Response, error)
- func (c *Client) DeletePublicKey(keyID int64) (*Response, error)
- func (c *Client) DeletePullReview(owner, repo string, index, id int64) (*Response, error)
- func (c *Client) DeletePullReviewComment(owner, repo string, index, id, comment int64) (*Response, error)
- func (c *Client) DeletePushMirror(user, repo, remoteName string) (*Response, error)
- func (c *Client) DeleteRelease(user, repo string, id int64) (*Response, error)
- func (c *Client) DeleteReleaseAttachment(user, repo string, release, id int64) (*Response, error)
- func (c *Client) DeleteReleaseByTag(user, repo, tag string) (*Response, error)
- func (c *Client) DeleteRepo(owner, repo string) (*Response, error)
- func (c *Client) DeleteRepoActionSecret(owner, repo, secretName string) (*Response, error)
- func (c *Client) DeleteRepoActionVariable(owner, repo, variableName string) (*Response, error)
- func (c *Client) DeleteRepoAvatar(owner, repo string) (*Response, error)
- func (c *Client) DeleteRepoBranch(user, repo, branch string) (bool, *Response, error)
- func (c *Client) DeleteRepoFlag(owner, repo, flag string) (*Response, error)
- func (c *Client) DeleteRepoGitHook(user, repo, id string) (*Response, error)
- func (c *Client) DeleteRepoHook(user, repo string, id int64) (*Response, error)
- func (c *Client) DeleteRepoTopic(user, repo, topic string) (*Response, error)
- func (c *Client) DeleteReviewRequests(owner, repo string, index int64, opt PullReviewRequestOptions) (*Response, error)
- func (c *Client) DeleteTag(user, repo, tag string) (*Response, error)
- func (c *Client) DeleteTagProtection(owner, repo string, id int64) (*Response, error)
- func (c *Client) DeleteTeam(id int64) (*Response, error)
- func (c *Client) DeleteTime(owner, repo string, index, timeID int64) (*Response, error)
- func (c *Client) DeleteUserActionSecret(secretName string) (*Response, error)
- func (c *Client) DeleteUserActionVariable(variableName string) (*Response, error)
- func (c *Client) DeleteUserAvatar() (*Response, error)
- func (c *Client) DeleteUserRunner(runnerID int64) (*Response, error)
- func (c *Client) DeleteWikiPage(owner, repo, pageName string) (*Response, error)
- func (c *Client) DiffPatchFile(owner, repo string, opt DiffPatchFileOptions) (*FileResponse, *Response, error)
- func (c *Client) DismissPullReview(owner, repo string, index, id int64, opt DismissPullReviewOptions) (*Response, error)
- func (c *Client) DispatchRepoWorkflow(owner, repo, workflow string, opt DispatchWorkflowOption) (*DispatchWorkflowResponse, *Response, error)
- func (c *Client) EditBranchProtection(owner, repo, name string, opt EditBranchProtectionOption) (*BranchProtection, *Response, error)
- func (c *Client) EditIssue(owner, repo string, index int64, opt EditIssueOption) (*Issue, *Response, error)
- func (c *Client) EditIssueAttachment(owner, repo string, index, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error)
- func (c *Client) EditIssueComment(owner, repo string, commentID int64, opt EditIssueCommentOption) (*Comment, *Response, error)
- func (c *Client) EditIssueCommentAttachment(owner, repo string, commentID, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error)
- func (c *Client) EditIssueDeadline(owner, repo string, index int64, opt EditDeadlineOption) (*IssueDeadline, *Response, error)
- func (c *Client) EditLabel(owner, repo string, id int64, opt EditLabelOption) (*Label, *Response, error)
- func (c *Client) EditMilestone(owner, repo string, id int64, opt EditMilestoneOption) (*Milestone, *Response, error)
- func (c *Client) EditMilestoneByName(owner, repo, name string, opt EditMilestoneOption) (*Milestone, *Response, error)
- func (c *Client) EditMyHook(id int64, opt EditHookOption) (*Response, error)
- func (c *Client) EditOrg(orgname string, opt EditOrgOption) (*Response, error)
- func (c *Client) EditOrgHook(org string, id int64, opt EditHookOption) (*Response, error)
- func (c *Client) EditOrgLabel(org string, id int64, opt EditLabelOption) (*Label, *Response, error)
- func (c *Client) EditPullRequest(owner, repo string, index int64, opt EditPullRequestOption) (*PullRequest, *Response, error)
- func (c *Client) EditRelease(owner, repo string, id int64, form EditReleaseOption) (*Release, *Response, error)
- func (c *Client) EditReleaseAttachment(user, repo string, release, attachment int64, form EditAttachmentOptions) (*Attachment, *Response, error)
- func (c *Client) EditRepo(owner, reponame string, opt EditRepoOption) (*Repository, *Response, error)
- func (c *Client) EditRepoGitHook(user, repo, id string, opt EditGitHookOption) (*Response, error)
- func (c *Client) EditRepoHook(user, repo string, id int64, opt EditHookOption) (*Response, error)
- func (c *Client) EditTagProtection(owner, repo string, id int64, opt EditTagProtectionOption) (*TagProtection, *Response, error)
- func (c *Client) EditTeam(id int64, opt EditTeamOption) (*Response, error)
- func (c *Client) EditWikiPage(owner, repo, pageName string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)
- func (c *Client) Follow(target string) (*Response, error)
- func (c *Client) GetActionsRun() (*ActionRun, *Response, error)
- func (c *Client) GetActivityPubActor() (*ActivityPubObject, *Response, error)
- func (c *Client) GetActivityPubActorOutbox() (*ActivityPubObject, *Response, error)
- func (c *Client) GetActivityPubPerson(userID int64) (*ActivityPubObject, *Response, error)
- func (c *Client) GetActivityPubPersonActivity(userID, activityID int64) (*ActivityPubObject, *Response, error)
- func (c *Client) GetActivityPubPersonActivityNote(userID, activityID int64) (*ActivityPubObject, *Response, error)
- func (c *Client) GetActivityPubPersonOutbox(userID int64) (*ActivityPubObject, *Response, error)
- func (c *Client) GetActivityPubRepository(repoID int64) (*ActivityPubObject, *Response, error)
- func (c *Client) GetActivityPubRepositoryOutbox(repoID int64) (*ActivityPubObject, *Response, error)
- func (c *Client) GetAnnotatedTag(user, repo, sha string) (*AnnotatedTag, *Response, error)
- func (c *Client) GetArchive(owner, repo, ref string, ext ArchiveType) ([]byte, *Response, error)
- func (c *Client) GetArchiveReader(owner, repo, ref string, ext ArchiveType) (io.ReadCloser, *Response, error)
- func (c *Client) GetAssignees(user, repo string) ([]*User, *Response, error)
- func (c *Client) GetBlob(user, repo, sha string) (*GitBlobResponse, *Response, error)
- func (c *Client) GetBlobs(user, repo string, shas []string) ([]*GitBlobResponse, *Response, error)
- func (c *Client) GetBranchProtection(owner, repo, name string) (*BranchProtection, *Response, error)
- func (c *Client) GetCombinedStatus(owner, repo, ref string) (*CombinedStatus, *Response, error)
- func (c *Client) GetCommitDiff(user, repo, commitID string) ([]byte, *Response, error)
- func (c *Client) GetCommitPatch(user, repo, commitID string) ([]byte, *Response, error)
- func (c *Client) GetCommitPullRequest(user, repo, commitID string) (*PullRequest, *Response, error)
- func (c *Client) GetContents(owner, repo, ref, filepath string) (*ContentsResponse, *Response, error)
- func (c *Client) GetContentsList(owner, repo, ref string) ([]*ContentsResponse, *Response, error)
- func (c *Client) GetDeployKey(user, repo string, keyID int64) (*DeployKey, *Response, error)
- func (c *Client) GetEditorConfig(owner, repo, filepath, ref string) (map[string]string, *Response, error)
- func (c *Client) GetFile(owner, repo, ref, filepath string, resolveLFS ...bool) ([]byte, *Response, error)
- func (c *Client) GetFileReader(owner, repo, ref, filepath string, resolveLFS ...bool) (io.ReadCloser, *Response, error)
- func (c *Client) GetGPGKey(keyID int64) (*GPGKey, *Response, error)
- func (c *Client) GetGPGKeyVerificationToken() (string, *Response, error)
- func (c *Client) GetGitignoreTemplate(ctx context.Context, name string) (GitignoreTemplateInfo, Response, error)
- func (c *Client) GetGlobalAPISettings() (*GlobalAPISettings, *Response, error)
- func (c *Client) GetGlobalAttachmentSettings() (*GlobalAttachmentSettings, *Response, error)
- func (c *Client) GetGlobalRepoSettings() (*GlobalRepoSettings, *Response, error)
- func (c *Client) GetGlobalUISettings() (*GlobalUISettings, *Response, error)
- func (c *Client) GetIssue(owner, repo string, index int64) (*Issue, *Response, error)
- func (c *Client) GetIssueAttachment(owner, repo string, index, attachmentID int64) (*Attachment, *Response, error)
- func (c *Client) GetIssueComment(owner, repo string, id int64) (*Comment, *Response, error)
- func (c *Client) GetIssueCommentAttachment(owner, repo string, commentID, attachmentID int64) (*Attachment, *Response, error)
- func (c *Client) GetIssueCommentReactions(owner, repo string, commentID int64) ([]*Reaction, *Response, error)
- func (c *Client) GetIssueConfig(owner, repo string) (*IssueConfig, *Response, error)
- func (c *Client) GetIssueLabels(owner, repo string, index int64, opts ListLabelsOptions) ([]*Label, *Response, error)
- func (c *Client) GetIssueReactions(owner, repo string, index int64) ([]*Reaction, *Response, error)
- func (c *Client) GetIssueSubscribers(owner, repo string, index int64) ([]*User, *Response, error)
- func (c *Client) GetIssueTemplates(owner, repo string) ([]*IssueTemplate, *Response, error)
- func (c *Client) GetLabelTemplate(ctx context.Context, name string) ([]LabelTemplate, Response, error)
- func (c *Client) GetLatestRelease(owner, repo string) (*Release, *Response, error)
- func (c *Client) GetLicenseTemplate(ctx context.Context, name string) (LicenseTemplateInfo, Response, error)
- func (c *Client) GetMilestone(owner, repo string, id int64) (*Milestone, *Response, error)
- func (c *Client) GetMilestoneByName(owner, repo, name string) (*Milestone, *Response, error)
- func (c *Client) GetMyHook(id int64) (*Hook, *Response, error)
- func (c *Client) GetMyQuota(ctx context.Context) (models.QuotaInfo, Response, error)
- func (c *Client) GetMyStarredRepos() ([]*Repository, *Response, error)
- func (c *Client) GetMyStopwatches() ([]*StopWatch, *Response, error)
- func (c *Client) GetMyTrackedTimes() ([]*TrackedTime, *Response, error)
- func (c *Client) GetMyUserInfo() (*User, *Response, error)
- func (c *Client) GetMyWatchedRepos() ([]*Repository, *Response, error)
- func (c *Client) GetNodeInfo(ctx context.Context) (NodeInfo, Response, error)
- func (c *Client) GetNote(owner, repo, sha string) (*Note, *Response, error)
- func (c *Client) GetNotification(id int64) (*NotificationThread, *Response, error)
- func (c *Client) GetOauth2(oauth2id int64) (*Oauth2, *Response, error)
- func (c *Client) GetOrg(orgname string) (*Organization, *Response, error)
- func (c *Client) GetOrgActionRunnerRegistrationToken(org string) (*RunnerRegistrationToken, *Response, error)
- func (c *Client) GetOrgActionVariable(org, variableName string) (*ActionVariable, *Response, error)
- func (c *Client) GetOrgHook(org string, id int64) (*Hook, *Response, error)
- func (c *Client) GetOrgLabel(org string, id int64) (*Label, *Response, error)
- func (c *Client) GetOrgPermissions(org, user string) (*OrgPermissions, *Response, error)
- func (c *Client) GetOrgQuota(ctx context.Context, org string) (models.QuotaInfo, Response, error)
- func (c *Client) GetOrgRunner(org string, runnerID int64) (*ActionRunner, *Response, error)
- func (c *Client) GetPackage(owner, packageType, name, version string) (*Package, *Response, error)
- func (c *Client) GetPublicKey(keyID int64) (*PublicKey, *Response, error)
- func (c *Client) GetPullRequest(owner, repo string, index int64) (*PullRequest, *Response, error)
- func (c *Client) GetPullRequestByBaseAndHead(owner, repo, base, head string) (*PullRequest, *Response, error)
- func (c *Client) GetPullRequestDiff(owner, repo string, index int64, opts PullRequestDiffOptions) ([]byte, *Response, error)
- func (c *Client) GetPullRequestPatch(owner, repo string, index int64) ([]byte, *Response, error)
- func (c *Client) GetPullReview(owner, repo string, index, id int64) (*PullReview, *Response, error)
- func (c *Client) GetPullReviewComment(owner, repo string, index, id, comment int64) (*PullReviewComment, *Response, error)
- func (c *Client) GetPushMirrorByRemoteName(user, repo, remoteName string) (*PushMirrorResponse, *Response, error)
- func (c *Client) GetRelease(owner, repo string, id int64) (*Release, *Response, error)
- func (c *Client) GetReleaseAttachment(user, repo string, release, id int64) (*Attachment, *Response, error)
- func (c *Client) GetReleaseByTag(owner, repo, tag string) (*Release, *Response, error)
- func (c *Client) GetRepo(owner, reponame string) (*Repository, *Response, error)
- func (c *Client) GetRepoActionRun(owner, repo string, runID int64) (*ActionRun, *Response, error)
- func (c *Client) GetRepoActionRunnerRegistrationToken(owner, repo string) (*RunnerRegistrationToken, *Response, error)
- func (c *Client) GetRepoActionVariable(owner, repo, variableName string) (*ActionVariable, *Response, error)
- func (c *Client) GetRepoAllGitRefs(user, repo string) ([]*Reference, *Response, error)
- func (c *Client) GetRepoBranch(user, repo, branch string) (*Branch, *Response, error)
- func (c *Client) GetRepoByID(id int64) (*Repository, *Response, error)
- func (c *Client) GetRepoGitHook(user, repo, id string) (*GitHook, *Response, error)
- func (c *Client) GetRepoHook(user, repo string, id int64) (*Hook, *Response, error)
- func (c *Client) GetRepoLabel(owner, repo string, id int64) (*Label, *Response, error)
- func (c *Client) GetRepoLanguages(owner, repo string) (map[string]int64, *Response, error)
- func (c *Client) GetRepoRef(user, repo, ref string) (*Reference, *Response, error)
- func (c *Client) GetRepoRefs(user, repo, ref string) ([]*Reference, *Response, error)
- func (c *Client) GetRepoSigningKey(owner, repo string) (string, *Response, error)
- func (c *Client) GetRepoTeams(user, repo string) ([]*Team, *Response, error)
- func (c *Client) GetReviewers(user, repo string) ([]*User, *Response, error)
- func (c *Client) GetSSHSigningKey(ctx context.Context) (string, Response, error)
- func (c *Client) GetSigningKey(ctx context.Context) (string, Response, error)
- func (c *Client) GetSingleCommit(user, repo, commitID string) (*Commit, *Response, error)
- func (c *Client) GetStarredRepos(user string) ([]*Repository, *Response, error)
- func (c *Client) GetSyncForkBranchInfo(owner, repo, branch string) (*SyncForkInfo, *Response, error)
- func (c *Client) GetSyncForkDefaultInfo(owner, repo string) (*SyncForkInfo, *Response, error)
- func (c *Client) GetTag(user, repo, tag string) (*Tag, *Response, error)
- func (c *Client) GetTagProtection(owner, repo string, id int64) (*TagProtection, *Response, error)
- func (c *Client) GetTeam(id int64) (*Team, *Response, error)
- func (c *Client) GetTeamMember(id int64, user string) (*User, *Response, error)
- func (c *Client) GetTeamRepo(id int64, org, repo string) (*Repository, *Response, error)
- func (c *Client) GetTrees(user, repo, ref string, opt GetTreesOptions) (*GitTreeResponse, *Response, error)
- func (c *Client) GetUserActionRunnerRegistrationToken() (*RunnerRegistrationToken, *Response, error)
- func (c *Client) GetUserActionVariable(variableName string) (*ActionVariable, *Response, error)
- func (c *Client) GetUserByID(id int64) (*User, *Response, error)
- func (c *Client) GetUserHeatmapData(username string) ([]*UserHeatmapData, *Response, error)
- func (c *Client) GetUserInfo(user string) (*User, *Response, error)
- func (c *Client) GetUserRunner(runnerID int64) (*ActionRunner, *Response, error)
- func (c *Client) GetUserRunners(opt ListActionRunnersOptions) ([]*ActionRunner, *Response, error)
- func (c *Client) GetUserSettings() (*UserSettings, *Response, error)
- func (c *Client) GetWatchedRepos(user string) ([]*Repository, *Response, error)
- func (c *Client) GetWikiPage(owner, repo, pageName string) (*WikiPage, *Response, error)
- func (c *Client) IsCollaborator(user, repo, collaborator string) (bool, *Response, error)
- func (c *Client) IsFollowing(target string) (bool, *Response)
- func (c *Client) IsPullRequestMerged(owner, repo string, index int64) (bool, *Response, error)
- func (c *Client) IsRepoStarring(user, repo string) (bool, *Response, error)
- func (c *Client) IsUserFollowing(user, target string) (bool, *Response)
- func (c *Client) IssueSubscribe(owner, repo string, index int64) (*Response, error)
- func (c *Client) IssueUnSubscribe(owner, repo string, index int64) (*Response, error)
- func (c *Client) LinkPackage(owner, packageType, name, repoName string) (*Response, error)
- func (c *Client) ListAccessTokens(user string, opts ListAccessTokensOptions) ([]*AccessToken, *Response, error)
- func (c *Client) ListBlockedUsers(opt ListBlockedUsersOptions) ([]*BlockedUser, *Response, error)
- func (c *Client) ListBranchProtections(owner, repo string, opt ListBranchProtectionsOptions) ([]*BranchProtection, *Response, error)
- func (c *Client) ListCollaborators(user, repo string, opt ListCollaboratorsOptions) ([]*User, *Response, error)
- func (c *Client) ListCommitStatuses(owner, repo, sha string, opt ListCommitStatusesOptions) ([]*Status, *Response, error)
- func (c *Client) ListContents(owner, repo, ref, filepath string) ([]*ContentsResponse, *Response, error)
- func (c *Client) ListCronTasks(opt ListCronTaskOptions) ([]*CronTask, *Response, error)
- func (c *Client) ListDeployKeys(user, repo string, opt ListDeployKeysOptions) ([]*DeployKey, *Response, error)
- func (c *Client) ListEmails(opt ListEmailsOptions) ([]*Email, *Response, error)
- func (c *Client) ListFollowers(user string, opt ListFollowersOptions) ([]*User, *Response, error)
- func (c *Client) ListFollowing(user string, opt ListFollowingOptions) ([]*User, *Response, error)
- func (c *Client) ListForks(user, repo string, opt ListForksOptions) ([]*Repository, *Response, error)
- func (c *Client) ListGPGKeys(user string, opt ListGPGKeysOptions) ([]*GPGKey, *Response, error)
- func (c *Client) ListGitignoreTemplates(ctx context.Context) ([]string, Response, error)
- func (c *Client) ListIssueAttachments(owner, repo string, index int64) ([]*Attachment, *Response, error)
- func (c *Client) ListIssueBlocks(owner, repo string, index int64, opt ListOptions) ([]*Issue, *Response, error)
- func (c *Client) ListIssueCommentAttachments(owner, repo string, commentID int64) ([]*Attachment, *Response, error)
- func (c *Client) ListIssueComments(owner, repo string, index int64, opt ListIssueCommentOptions) ([]*Comment, *Response, error)
- func (c *Client) ListIssueDependencies(owner, repo string, index int64, opt ListOptions) ([]*Issue, *Response, error)
- func (c *Client) ListIssueTimeline(owner, repo string, index int64, opt ListIssueTimelineOptions) ([]*TimelineComment, *Response, error)
- func (c *Client) ListIssueTrackedTimes(owner, repo string, index int64, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
- func (c *Client) ListIssues(opt ListIssueOption) ([]*Issue, *Response, error)
- func (c *Client) ListLabelTemplates(ctx context.Context) ([]string, Response, error)
- func (c *Client) ListLicenseTemplates(ctx context.Context) ([]LicenseTemplateListEntry, Response, error)
- func (c *Client) ListMyFollowers(opt ListFollowersOptions) ([]*User, *Response, error)
- func (c *Client) ListMyFollowing(opt ListFollowingOptions) ([]*User, *Response, error)
- func (c *Client) ListMyGPGKeys(opt *ListGPGKeysOptions) ([]*GPGKey, *Response, error)
- func (c *Client) ListMyHooks(opt ListHooksOptions) ([]*Hook, *Response, error)
- func (c *Client) ListMyOrgs(opt ListOrgsOptions) ([]*Organization, *Response, error)
- func (c *Client) ListMyPublicKeys(opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)
- func (c *Client) ListMyQuotaArtifacts(ctx context.Context, opt ListMyQuotaArtifactsOptions) ([]models.QuotaUsedArtifact, Response, error)
- func (c *Client) ListMyQuotaAttachments(ctx context.Context, opt ListMyQuotaAttachmentsOptions) ([]models.QuotaUsedAttachment, Response, error)
- func (c *Client) ListMyQuotaPackages(ctx context.Context, opt ListMyQuotaPackagesOptions) ([]models.QuotaUsedPackage, Response, error)
- func (c *Client) ListMyRepos(opt ListReposOptions) ([]*Repository, *Response, error)
- func (c *Client) ListMyTeams(opt *ListTeamsOptions) ([]*Team, *Response, error)
- func (c *Client) ListNotifications(opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
- func (c *Client) ListOauth2(opt ListOauth2Option) ([]*Oauth2, *Response, error)
- func (c *Client) ListOrgActionJobs(org string, opt ListActionJobsOption) ([]*ActionRunJob, *Response, error)
- func (c *Client) ListOrgActionSecret(org string, opt ListOrgActionSecretOption) ([]*Secret, *Response, error)
- func (c *Client) ListOrgActionVariables(org string, opt ListOptions) ([]*ActionVariable, *Response, error)
- func (c *Client) ListOrgActivityFeeds(ctx context.Context, org string, opt ListActivityFeedsOptions) ([]*Activity, Response, error)
- func (c *Client) ListOrgBlockedUsers(ctx context.Context, org string, opt ListOrgBlockedUsersOptions) ([]*BlockedUser, Response, error)
- func (c *Client) ListOrgHooks(org string, opt ListHooksOptions) ([]*Hook, *Response, error)
- func (c *Client) ListOrgLabels(org string, opt ListLabelsOptions) ([]*Label, *Response, error)
- func (c *Client) ListOrgMembership(org string, opt ListOrgMembershipOption) ([]*User, *Response, error)
- func (c *Client) ListOrgQuotaArtifacts(ctx context.Context, org string, opt ListOrgQuotaArtifactsOptions) ([]models.QuotaUsedArtifact, Response, error)
- func (c *Client) ListOrgQuotaAttachments(ctx context.Context, org string, opt ListOrgQuotaAttachmentsOptions) ([]models.QuotaUsedAttachment, Response, error)
- func (c *Client) ListOrgQuotaPackages(ctx context.Context, org string, opt ListOrgQuotaPackagesOptions) ([]models.QuotaUsedPackage, Response, error)
- func (c *Client) ListOrgRepos(org string, opt ListOrgReposOptions) ([]*Repository, *Response, error)
- func (c *Client) ListOrgRunners(org string, opt ListOrgRunnersOption) ([]*ActionRunner, *Response, error)
- func (c *Client) ListOrgTeams(org string, opt ListTeamsOptions) ([]*Team, *Response, error)
- func (c *Client) ListOrgs(opt ListOrgsOptions) ([]*Organization, *Response, error)
- func (c *Client) ListPackageFiles(owner, packageType, name, version string) ([]*PackageFile, *Response, error)
- func (c *Client) ListPackages(owner string, opt ListPackagesOptions) ([]*Package, *Response, error)
- func (c *Client) ListPinnedIssues(owner, repo string) ([]*Issue, *Response, error)
- func (c *Client) ListPinnedPullRequests(owner, repo string) ([]*PullRequest, *Response, error)
- func (c *Client) ListPublicKeys(user string, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)
- func (c *Client) ListPublicOrgMembership(org string, opt ListOrgMembershipOption) ([]*User, *Response, error)
- func (c *Client) ListPullRequestCommits(owner, repo string, index int64, opt ListPullRequestCommitsOptions) ([]*Commit, *Response, error)
- func (c *Client) ListPullRequestFiles(owner, repo string, index int64, opt ListPullRequestFilesOptions) ([]*ChangedFile, *Response, error)
- func (c *Client) ListPullReviewComments(owner, repo string, index, id int64) ([]*PullReviewComment, *Response, error)
- func (c *Client) ListPullReviews(owner, repo string, index int64, opt ListPullReviewsOptions) ([]*PullReview, *Response, error)
- func (c *Client) ListPushMirrors(user, repo string, opt ListPushMirrorsOptions) ([]*PushMirrorResponse, *Response, error)
- func (c *Client) ListReleaseAttachments(user, repo string, release int64) ([]*Attachment, *Response, error)
- func (c *Client) ListReleases(owner, repo string, opt ListReleasesOptions) ([]*Release, *Response, error)
- func (c *Client) ListRepoActionJobs(owner, repo string, opt ListActionJobsOption) ([]*ActionRunJob, *Response, error)
- func (c *Client) ListRepoActionRuns(owner, repo string, opt ListActionRunsOption) (*ListActionRunsResponse, *Response, error)
- func (c *Client) ListRepoActionSecret(user, repo string, opt ListRepoActionSecretOption) ([]*Secret, *Response, error)
- func (c *Client) ListRepoActionTasks(owner, repo string, opt ListActionTasksOption) (*ListActionTasksResponse, *Response, error)
- func (c *Client) ListRepoActionVariables(owner, repo string, opt ListOptions) ([]*ActionVariable, *Response, error)
- func (c *Client) ListRepoActivityFeeds(owner, repo string, opt ListRepoActivityFeedsOptions) ([]*Activity, *Response, error)
- func (c *Client) ListRepoBranches(user, repo string, opt ListRepoBranchesOptions) ([]*Branch, *Response, error)
- func (c *Client) ListRepoCommits(user, repo string, opt ListCommitOptions) ([]*Commit, *Response, error)
- func (c *Client) ListRepoFlags(owner, repo string) ([]string, *Response, error)
- func (c *Client) ListRepoGitHooks(user, repo string, opt ListRepoGitHooksOptions) ([]*GitHook, *Response, error)
- func (c *Client) ListRepoHooks(user, repo string, opt ListHooksOptions) ([]*Hook, *Response, error)
- func (c *Client) ListRepoIssueComments(owner, repo string, opt ListRepoIssueCommentOptions) ([]*Comment, *Response, error)
- func (c *Client) ListRepoIssues(owner, repo string, opt ListIssueOption) ([]*Issue, *Response, error)
- func (c *Client) ListRepoLabels(owner, repo string, opt ListLabelsOptions) ([]*Label, *Response, error)
- func (c *Client) ListRepoMilestones(owner, repo string, opt ListMilestoneOption) ([]*Milestone, *Response, error)
- func (c *Client) ListRepoNotifications(owner, repo string, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
- func (c *Client) ListRepoPullRequests(owner, repo string, opt ListPullRequestsOptions) ([]*PullRequest, *Response, error)
- func (c *Client) ListRepoStargazers(user, repo string, opt ListStargazersOptions) ([]*User, *Response, error)
- func (c *Client) ListRepoSubscribers(owner, repo string, opt ListRepoSubscribersOptions) ([]*User, *Response, error)
- func (c *Client) ListRepoTags(user, repo string, opt ListRepoTagsOptions) ([]*Tag, *Response, error)
- func (c *Client) ListRepoTopics(user, repo string, opt ListRepoTopicsOptions) ([]string, *Response, error)
- func (c *Client) ListRepoTrackedTimes(owner, repo string, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
- func (c *Client) ListStatuses(owner, repo, ref string, opt ListStatusesOption) ([]*Status, *Response, error)
- func (c *Client) ListTagProtections(owner, repo string, opt ListTagProtectionsOptions) ([]*TagProtection, *Response, error)
- func (c *Client) ListTeamActivityFeeds(ctx context.Context, id int64, opt ListActivityFeedsOptions) ([]*Activity, Response, error)
- func (c *Client) ListTeamMembers(id int64, opt ListTeamMembersOptions) ([]*User, *Response, error)
- func (c *Client) ListTeamRepositories(id int64, opt ListTeamRepositoriesOptions) ([]*Repository, *Response, error)
- func (c *Client) ListUserActionJobs(opt ListActionJobsOption) ([]*ActionRunJob, *Response, error)
- func (c *Client) ListUserActionVariables(opt ListOptions) ([]*ActionVariable, *Response, error)
- func (c *Client) ListUserActivityFeeds(username string, opt ListActivityFeedsOptions) ([]*Activity, *Response, error)
- func (c *Client) ListUserOrgs(user string, opt ListOrgsOptions) ([]*Organization, *Response, error)
- func (c *Client) ListUserRepos(user string, opt ListReposOptions) ([]*Repository, *Response, error)
- func (c *Client) ListWikiPageRevisions(owner, repo, pageName string, opt ListWikiPageRevisionsOptions) (*WikiCommitList, *Response, error)
- func (c *Client) ListWikiPages(owner, repo string, opt ListWikiPagesOptions) ([]*WikiPageMetaData, *Response, error)
- func (c *Client) MergePullRequest(owner, repo string, index int64, opt MergePullRequestOption) (bool, *Response, error)
- func (c *Client) MigrateRepo(opt MigrateRepoOption) (*Repository, *Response, error)
- func (c *Client) MirrorSync(owner, repo string) (*Response, error)
- func (c *Client) MoveIssuePin(owner, repo string, index, position int64) (*Response, error)
- func (c *Client) NewPinAllowed(owner, repo string) (*NewIssuePinsAllowed, *Response, error)
- func (c *Client) OrgBlockUser(ctx context.Context, org, username string) (Response, error)
- func (c *Client) OrgUnblockUser(ctx context.Context, org, username string) (Response, error)
- func (c *Client) PinIssue(owner, repo string, index int64) (*Response, error)
- func (c *Client) PostIssueCommentReaction(owner, repo string, commentID int64, reaction string) (*Reaction, *Response, error)
- func (c *Client) PostIssueReaction(owner, repo string, index int64, reaction string) (*Reaction, *Response, error)
- func (c *Client) PushMirrorSync(user, repo string) (*Response, error)
- func (c *Client) PushMirrors(user, repo string, opt CreatePushMirrorOption) (*PushMirrorResponse, *Response, error)
- func (c *Client) ReadNotification(id int64, status ...NotifyStatus) (*NotificationThread, *Response, error)
- func (c *Client) ReadNotifications(opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
- func (c *Client) ReadRepoNotifications(owner, repo string, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
- func (c *Client) RegisterOrgRunner(org string, opt RegisterRunnerOption) (*RegisterRunnerResponse, *Response, error)
- func (c *Client) RegisterUserRunner(opt RegisterRunnerOption) (*RegisterRunnerResponse, *Response, error)
- func (c *Client) RejectRepoTransfer(owner, reponame string) (*Repository, *Response, error)
- func (c *Client) RemoveIssueBlocking(owner, repo string, index int64, meta IssueMeta) (*Issue, *Response, error)
- func (c *Client) RemoveIssueDependency(owner, repo string, index int64, meta IssueMeta) (*Issue, *Response, error)
- func (c *Client) RemoveNote(owner, repo, sha string) (*Response, error)
- func (c *Client) RemoveRepoTeam(user, repo, team string) (*Response, error)
- func (c *Client) RemoveTeamMember(id int64, user string) (*Response, error)
- func (c *Client) RemoveTeamRepository(id int64, org, repo string) (*Response, error)
- func (c *Client) RenameOrg(orgname string, opt RenameOrgOption) (*Response, error)
- func (c *Client) RenderMarkdown(ctx context.Context, opt MarkdownOption) (string, Response, error)
- func (c *Client) RenderMarkdownRaw(ctx context.Context, text string) (string, Response, error)
- func (c *Client) RenderMarkup(ctx context.Context, opt MarkupOption) (string, Response, error)
- func (c *Client) ReplaceAllRepoFlags(owner, repo string, opt ReplaceFlagsOption) (*Response, error)
- func (c *Client) ReplaceIssueLabels(owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)
- func (c *Client) ResetIssueTime(owner, repo string, index int64) (*Response, error)
- func (c *Client) RunCronTasks(task string) (*Response, error)
- func (c *Client) SearchOrgTeams(org string, opt *SearchTeamsOptions) ([]*Team, *Response, error)
- func (c *Client) SearchRepos(opt SearchRepoOptions) ([]*Repository, *Response, error)
- func (c *Client) SearchTopics(opt SearchTopicsOptions) ([]*TopicResponse, *Response, error)
- func (c *Client) SearchUsers(opt SearchUsersOption) ([]*User, *Response, error)
- func (c *Client) SendActivityPubActorInbox(activity ActivityPubObject) (*Response, error)
- func (c *Client) SendActivityPubPersonInbox(userID int64, activity ActivityPubObject) (*Response, error)
- func (c *Client) SendActivityPubRepositoryInbox(repoID int64, activity ActivityPubObject) (*Response, error)
- func (c *Client) ServerVersion() (string, *Response, error)
- func (c *Client) SetActivityPubSigner(signer *ActivityPubSigner)
- func (c *Client) SetBasicAuth(username, password string)
- func (c *Client) SetContext(ctx context.Context)
- func (c *Client) SetHTTPClient(client *http.Client)
- func (c *Client) SetNote(owner, repo, sha string, opt NoteOptions) (*Note, *Response, error)
- func (c *Client) SetOTP(otp string)
- func (c *Client) SetPublicOrgMembership(org, user string, visible bool) (*Response, error)
- func (c *Client) SetRepoTopics(user, repo string, list []string) (*Response, error)
- func (c *Client) SetSudo(sudo string)
- func (c *Client) SetUserAgent(userAgent string)
- func (c *Client) SignRequest(r *http.Request) error
- func (c *Client) StarRepo(user, repo string) (*Response, error)
- func (c *Client) StartIssueStopWatch(owner, repo string, index int64) (*Response, error)
- func (c *Client) StopIssueStopWatch(owner, repo string, index int64) (*Response, error)
- func (c *Client) SubmitPullReview(owner, repo string, index, id int64, opt SubmitPullReviewOptions) (*PullReview, *Response, error)
- func (c *Client) SyncForkBranch(owner, repo, branch string) (*Response, error)
- func (c *Client) SyncForkDefault(owner, repo string) (*Response, error)
- func (c *Client) TestRepoHook(user, repo string, id int64, ref string) (*Response, error)
- func (c *Client) TransferRepo(owner, reponame string, opt TransferRepoOption) (*Repository, *Response, error)
- func (c *Client) UnDismissPullReview(owner, repo string, index, id int64) (*Response, error)
- func (c *Client) UnStarRepo(user, repo string) (*Response, error)
- func (c *Client) UnWatchRepo(owner, repo string) (*Response, error)
- func (c *Client) UnblockUser(username string) (*Response, error)
- func (c *Client) Unfollow(target string) (*Response, error)
- func (c *Client) UnlinkPackage(owner, packageType, name string) (*Response, error)
- func (c *Client) UnpinIssue(owner, repo string, index int64) (*Response, error)
- func (c *Client) UpdateFile(owner, repo, filepath string, opt UpdateFileOptions) (*FileResponse, *Response, error)
- func (c *Client) UpdateOauth2(oauth2id int64, opt CreateOauth2Option) (*Oauth2, *Response, error)
- func (c *Client) UpdateOrgActionVariable(org, variableName string, opt CreateVariableOption) (*Response, error)
- func (c *Client) UpdateOrgAvatar(ctx context.Context, org string, opt UpdateOrgAvatarOption) (Response, error)
- func (c *Client) UpdatePullRequest(owner, repo string, index int64, opt UpdatePullRequestOptions) (*Response, error)
- func (c *Client) UpdateRepoActionVariable(owner, repo, variableName string, opt CreateVariableOption) (*Response, error)
- func (c *Client) UpdateRepoAvatar(owner, repo string, opt UpdateRepoAvatarOption) (*Response, error)
- func (c *Client) UpdateRepoBranch(owner, repo, branch string, opt UpdateBranchRepoOption) (*Response, error)
- func (c *Client) UpdateUserActionVariable(variableName string, opt CreateVariableOption) (*Response, error)
- func (c *Client) UpdateUserAvatar(opt UpdateUserAvatarOption) (*Response, error)
- func (c *Client) UpdateUserSettings(opt UserSettingsOptions) (*UserSettings, *Response, error)
- func (c *Client) ValidateIssueConfig(owner, repo string) (*IssueConfigValidation, *Response, error)
- func (c *Client) VerifyGPGKey(opt VerifyGPGKeyOption) (*GPGKey, *Response, error)
- func (c *Client) WatchRepo(owner, repo string) (*Response, error)
- type ClientOption
- func SetBasicAuth(username, password string) ClientOption
- func SetContext(ctx context.Context) ClientOption
- func SetDebugMode() ClientOption
- func SetForgejoVersion(v string) ClientOption
- func SetHTTPClient(httpClient *http.Client) ClientOption
- func SetOTP(otp string) ClientOption
- func SetSudo(sudo string) ClientOption
- func SetToken(token string) ClientOption
- func SetUserAgent(userAgent string) ClientOption
- func UseActivityPubSignature(keyID string, privateKeyPEM []byte) ClientOption
- func UseSSHCert(principal, sshKey, passphrase string) ClientOption
- func UseSSHPubkey(fingerprint, sshKey, passphrase string) ClientOption
- type CollaboratorPermissionResult
- type CombinedStatus
- type Comment
- type Commit
- type CommitAffectedFiles
- type CommitDateOptions
- type CommitMeta
- type CommitStats
- type CommitUser
- type Compare
- type ContentsResponse
- type CreateAccessTokenOption
- type CreateBranchOption
- type CreateBranchProtectionOption
- type CreateEmailOption
- type CreateFileOptions
- type CreateForkOption
- type CreateGPGKeyOption
- type CreateHookOption
- type CreateIssueCommentOption
- type CreateIssueOption
- type CreateKeyOption
- type CreateLabelOption
- type CreateMilestoneOption
- type CreateOauth2Option
- type CreateOrgOption
- type CreatePullRequestOption
- type CreatePullReviewComment
- type CreatePullReviewCommentOptions
- type CreatePullReviewOptions
- type CreatePushMirrorOption
- type CreateQuotaGroupOption
- type CreateQuotaRuleOption
- type CreateReleaseOption
- type CreateRepoFromTemplateOption
- type CreateRepoOption
- type CreateSecretOption
- type CreateStatusOption
- type CreateTagOption
- type CreateTagProtectionOption
- type CreateTeamOption
- type CreateUserOption
- type CreateVariableOption
- type CreateWikiPageOptions
- type CronTask
- type DeleteEmailOption
- type DeleteFileOptions
- type DeployKey
- type DiffPatchFileOptions
- type DismissPullReviewOptions
- type DispatchWorkflowOption
- type DispatchWorkflowResponse
- type EditAttachmentOptions
- type EditBranchProtectionOption
- type EditDeadlineOption
- type EditGitHookOption
- type EditHookOption
- type EditIssueCommentOption
- type EditIssueOption
- type EditLabelOption
- type EditMilestoneOption
- type EditOrgOption
- type EditPullRequestOption
- type EditQuotaRuleOption
- type EditReleaseOption
- type EditRepoOption
- type EditTagProtectionOption
- type EditTeamOption
- type EditUserOption
- type Email
- type ErrUnknownVersion
- type ExternalTracker
- type ExternalWiki
- type FileCommitResponse
- type FileDeleteResponse
- type FileLinksResponse
- type FileOptions
- type FileResponse
- type FilesResponse
- type GPGKey
- type GPGKeyEmail
- type GetTreesOptions
- type GitBlobResponse
- type GitEntry
- type GitHook
- type GitObject
- type GitServiceType
- type GitTreeResponse
- type GitignoreTemplateInfo
- type GlobalAPISettings
- type GlobalAttachmentSettings
- type GlobalRepoSettings
- type GlobalUISettings
- type HTTPSign
- type HTTPSignConfig
- type Hook
- type HookType
- type Identity
- type InternalTracker
- type Issue
- type IssueConfig
- type IssueConfigContactLink
- type IssueConfigValidation
- type IssueDeadline
- type IssueFormElement
- type IssueFormElementAttributes
- type IssueFormElementType
- type IssueFormElementValidations
- type IssueLabelsOption
- type IssueMeta
- type IssueTemplate
- type IssueType
- type Label
- type LabelTemplate
- type LicenseTemplateInfo
- type LicenseTemplateListEntry
- type ListAccessTokensOptions
- type ListActionJobsOption
- type ListActionRunnersOptions
- type ListActionRunsOption
- type ListActionRunsResponse
- type ListActionTasksOption
- type ListActionTasksResponse
- type ListActivityFeedsOptions
- type ListBlockedUsersOptions
- type ListBranchProtectionsOptions
- type ListCollaboratorsOptions
- type ListCommitOptions
- type ListCommitStatusesOptions
- type ListCronTaskOptions
- type ListDeployKeysOptions
- type ListEmailsOptions
- type ListFollowersOptions
- type ListFollowingOptions
- type ListForksOptions
- type ListGPGKeysOptions
- type ListHooksOptions
- type ListIssueCommentOptions
- type ListIssueOption
- type ListIssueTimelineOptions
- type ListLabelsOptions
- type ListMilestoneOption
- type ListMyQuotaArtifactsOptions
- type ListMyQuotaAttachmentsOptions
- type ListMyQuotaPackagesOptions
- type ListNotificationOptions
- type ListOauth2Option
- type ListOptions
- type ListOrgActionSecretOption
- type ListOrgBlockedUsersOptions
- type ListOrgMembershipOption
- type ListOrgQuotaArtifactsOptions
- type ListOrgQuotaAttachmentsOptions
- type ListOrgQuotaPackagesOptions
- type ListOrgReposOptions
- type ListOrgRunnersOption
- type ListOrgsOptions
- type ListPackagesOptions
- type ListPublicKeysOptions
- type ListPullRequestCommitsOptions
- type ListPullRequestFilesOptions
- type ListPullRequestsOptions
- type ListPullReviewsOptions
- type ListPushMirrorsOptions
- type ListReleasesOptions
- type ListRepoActionSecretOption
- type ListRepoActivityFeedsOptions
- type ListRepoBranchesOptions
- type ListRepoGitHooksOptions
- type ListRepoIssueCommentOptions
- type ListRepoSubscribersOptions
- type ListRepoTagsOptions
- type ListRepoTopicsOptions
- type ListReposOptions
- type ListStargazersOptions
- type ListStatusesOption
- type ListTagProtectionsOptions
- type ListTeamMembersOptions
- type ListTeamRepositoriesOptions
- type ListTeamsOptions
- type ListTrackedTimesOptions
- type ListWikiPageRevisionsOptions
- type ListWikiPagesOptions
- type MarkNotificationOptions
- type MarkdownOption
- type MarkupOption
- type MergePullRequestOption
- type MergeStyle
- type MigrateRepoOption
- type Milestone
- type NewIssuePinsAllowed
- type NodeInfo
- type NodeInfoServices
- type NodeInfoSoftware
- type NodeInfoUsage
- type NodeInfoUsageUsers
- type Note
- type NoteOptions
- type NotificationSubject
- type NotificationThread
- type NotifyStatus
- type NotifySubjectState
- type NotifySubjectType
- type Oauth2
- type OrgPermissions
- type Organization
- type PRBranchInfo
- type Package
- type PackageFile
- type PackageType
- type PayloadCommit
- type PayloadCommitVerification
- type PayloadUser
- type Permission
- type PublicKey
- type PullRequest
- type PullRequestDiffOptions
- type PullRequestMeta
- type PullReview
- type PullReviewComment
- type PullReviewRequestOptions
- type PushMirrorResponse
- type QuotaSubject
- type Reaction
- type Reference
- type RegisterRunnerOption
- type RegisterRunnerResponse
- type Release
- type RenameOrgOption
- type RenameUserOption
- type ReplaceFlagsOption
- type RepoCommit
- type RepoType
- type RepoUnitType
- type Repository
- type RepositoryMeta
- type Response
- type ReviewStateType
- type RunnerRegistrationToken
- type SearchRepoOptions
- type SearchTeamsOptions
- type SearchTopicsOptions
- type SearchUsersOption
- type Secret
- type SetUserQuotaGroupsOption
- type StateType
- type Status
- type StatusState
- type StopWatch
- type SubmitPullReviewOptions
- type SyncForkInfo
- type Tag
- type TagProtection
- type Team
- type TeamSearchResults
- type TimelineComment
- type TopicResponse
- type TrackedTime
- type TransferRepoOption
- type TrustModel
- type UpdateBranchRepoOption
- type UpdateFileOptions
- type UpdateOrgAvatarOption
- type UpdatePullRequestOptions
- type UpdateRepoAvatarOption
- type UpdateUserAvatarOption
- type User
- type UserHeatmapData
- type UserSettings
- type UserSettingsOptions
- type VerifyGPGKeyOption
- type VisibleType
- type WatchInfo
- type WikiCommit
- type WikiCommitList
- type WikiPage
- type WikiPageMetaData
Constants ¶
const ActivityPubContentType = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`
ActivityPubContentType is the media type a federated ActivityPub payload is sent and accepted with.
Variables ¶
This section is empty.
Functions ¶
func OptionalInt64 ¶
OptionalInt64 convert a int64 to a int64 reference
func OptionalString ¶
OptionalString convert a string to a string reference
func VerifyWebhookSignature ¶
VerifyWebhookSignature verifies that a payload matches the X-Forgejo-Signature based on a secret
func VerifyWebhookSignatureMiddleware ¶
VerifyWebhookSignatureMiddleware is a http.Handler for verifying X-Forgejo-Signature on incoming webhooks
Types ¶
type APRemoteFollowOption ¶
type APRemoteFollowOption struct {
// Target is the URI of the remote actor to follow, e.g.
// "https://remote.example/api/v1/activitypub/user-id/1". The server
// parses it as a URL to find the instance to federate with
// (modules/forgefed, NewActorID), so a "user@host" handle is not one.
Target string `json:"target"`
}
APRemoteFollowOption options for following a remote ActivityPub actor
type AccessMode ¶
type AccessMode string
AccessMode represent the grade of access you have to something
const ( // AccessModeNone no access AccessModeNone AccessMode = "none" // AccessModeRead read access AccessModeRead AccessMode = "read" // AccessModeWrite write access AccessModeWrite AccessMode = "write" // AccessModeAdmin admin access AccessModeAdmin AccessMode = "admin" // AccessModeOwner owner AccessModeOwner AccessMode = "owner" )
type AccessToken ¶
type AccessToken struct {
ID int64 `json:"id"`
Name string `json:"name"`
Token string `json:"sha1"`
TokenLastEight string `json:"token_last_eight"`
Scopes []AccessTokenScope `json:"scopes"`
}
AccessToken represents an API access token.
type AccessTokenScope ¶
type AccessTokenScope string
AccessTokenScope represents the scope for an access token.
const ( // specials AccessTokenScopeAll AccessTokenScope = "all" AccessTokenScopePublicOnly AccessTokenScope = "public-only" AccessTokenScopeSudo AccessTokenScope = "sudo" // normal scopes AccessTokenScopeActivitypubRead AccessTokenScope = "read:activitypub" AccessTokenScopeActivitypubWrite AccessTokenScope = "write:activitypub" AccessTokenScopeAdminRead AccessTokenScope = "read:admin" AccessTokenScopeAdminWrite AccessTokenScope = "write:admin" AccessTokenScopeIssueRead AccessTokenScope = "read:issue" AccessTokenScopeIssueWrite AccessTokenScope = "write:issue" AccessTokenScopeMiscRead AccessTokenScope = "read:misc" AccessTokenScopeMiscWrite AccessTokenScope = "write:misc" AccessTokenScopeNotificationRead AccessTokenScope = "read:notification" AccessTokenScopeNotificationWrite AccessTokenScope = "write:notification" AccessTokenScopeOrganizationRead AccessTokenScope = "read:organization" AccessTokenScopeOrganizationWrite AccessTokenScope = "write:organization" AccessTokenScopePackageRead AccessTokenScope = "read:package" AccessTokenScopePackageWrite AccessTokenScope = "write:package" AccessTokenScopeRepositoryRead AccessTokenScope = "read:repository" AccessTokenScopeRepositoryWrite AccessTokenScope = "write:repository" AccessTokenScopeUserRead AccessTokenScope = "read:user" AccessTokenScopeUserWrite AccessTokenScope = "write:user" )
type ActionRun ¶
type ActionRun struct {
ID int64 `json:"id"`
RunNumber int64 `json:"index_in_repo"`
WorkflowID string `json:"workflow_id"`
Title string `json:"title"`
Status string `json:"status"`
Event string `json:"event"`
CommitSHA string `json:"commit_sha"`
PrettyRef string `json:"prettyref"`
HTMLURL string `json:"html_url"`
TriggerUser *User `json:"trigger_user"`
Repository *Repository `json:"repository"`
Created time.Time `json:"created"`
Started time.Time `json:"started"`
Stopped time.Time `json:"stopped"`
Updated time.Time `json:"updated"`
NeedApproval bool `json:"need_approval"`
ApprovedBy int64 `json:"approved_by"`
IsForkPullRequest bool `json:"is_fork_pull_request"`
IsRefDeleted bool `json:"is_ref_deleted"`
}
ActionRun represents a workflow run
type ActionRunJob ¶
type ActionRunJob struct {
ID int64 `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
TaskID int64 `json:"task_id"`
OwnerID int64 `json:"owner_id"`
RepoID int64 `json:"repo_id"`
RunsOn []string `json:"runs_on"`
Needs []string `json:"needs"`
}
ActionRunJob represents a job within a workflow run
type ActionRunner ¶
type ActionRunner struct {
ID int64 `json:"id"`
UUID string `json:"uuid"`
Name string `json:"name"`
Version string `json:"version"`
OwnerID int64 `json:"owner_id"`
RepoID int64 `json:"repo_id"`
Description string `json:"description"`
// Status is one of "offline", "idle" or "active".
Status string `json:"status"`
Ephemeral bool `json:"ephemeral"`
Labels []string `json:"labels"`
}
ActionRunner represents a Forgejo Actions runner
type ActionTask ¶
type ActionTask struct {
ID int64 `json:"id"`
Name string `json:"name"`
WorkflowID string `json:"workflow_id"`
Status string `json:"status"`
Event string `json:"event"`
DisplayTitle string `json:"display_title"`
HeadBranch string `json:"head_branch"`
HeadSHA string `json:"head_sha"`
RunNumber int64 `json:"run_number"`
URL string `json:"url"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
RunStartedAt time.Time `json:"run_started_at"`
}
ActionTask represents a task within a workflow run
type ActionVariable ¶
type ActionVariable struct {
Name string `json:"name"`
Data string `json:"data"`
OwnerID int64 `json:"owner_id"`
RepoID int64 `json:"repo_id"`
}
ActionVariable represents an action variable
type Activity ¶
type Activity struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
OpType ActivityOpType `json:"op_type"`
ActUser *User `json:"act_user"`
ActUserID int64 `json:"act_user_id"`
Repo *Repository `json:"repo"`
RepoID int64 `json:"repo_id"`
Comment *Comment `json:"comment"`
CommentID int64 `json:"comment_id"`
RefName string `json:"ref_name"`
IsPrivate bool `json:"is_private"`
Content string `json:"content"`
Created time.Time `json:"created"`
}
Activity represents a single activity feed entry
type ActivityOpType ¶
type ActivityOpType string
ActivityOpType is the type of action recorded in an activity feed entry
const ( ActivityOpCreateRepo ActivityOpType = "create_repo" ActivityOpRenameRepo ActivityOpType = "rename_repo" ActivityOpStarRepo ActivityOpType = "star_repo" ActivityOpWatchRepo ActivityOpType = "watch_repo" ActivityOpCommitRepo ActivityOpType = "commit_repo" ActivityOpCreateIssue ActivityOpType = "create_issue" ActivityOpCreatePullRequest ActivityOpType = "create_pull_request" ActivityOpTransferRepo ActivityOpType = "transfer_repo" ActivityOpPushTag ActivityOpType = "push_tag" ActivityOpCommentIssue ActivityOpType = "comment_issue" ActivityOpMergePullRequest ActivityOpType = "merge_pull_request" ActivityOpCloseIssue ActivityOpType = "close_issue" ActivityOpReopenIssue ActivityOpType = "reopen_issue" ActivityOpClosePullRequest ActivityOpType = "close_pull_request" ActivityOpReopenPullRequest ActivityOpType = "reopen_pull_request" ActivityOpDeleteTag ActivityOpType = "delete_tag" ActivityOpDeleteBranch ActivityOpType = "delete_branch" ActivityOpMirrorSyncPush ActivityOpType = "mirror_sync_push" ActivityOpMirrorSyncCreate ActivityOpType = "mirror_sync_create" ActivityOpMirrorSyncDelete ActivityOpType = "mirror_sync_delete" ActivityOpApprovePullRequest ActivityOpType = "approve_pull_request" ActivityOpRejectPullRequest ActivityOpType = "reject_pull_request" ActivityOpCommentPull ActivityOpType = "comment_pull" ActivityOpPublishRelease ActivityOpType = "publish_release" ActivityOpPullReviewDismissed ActivityOpType = "pull_review_dismissed" ActivityOpPullRequestReadyForReview ActivityOpType = "pull_request_ready_for_review" ActivityOpAutoMergePullRequest ActivityOpType = "auto_merge_pull_request" )
type ActivityPubObject ¶
type ActivityPubObject map[string]interface{}
ActivityPubObject is a decoded ActivityStreams 2.0 JSON-LD document, such as an Actor (Application, Person or Repository), an Activity, or an OrderedCollection (an outbox). Forgejo's swagger only documents a fixed "@context" field for these payloads -- the actual shape (id, type, preferredUsername, inbox, outbox, publicKey, orderedItems, ...) is open-ended ActivityStreams JSON-LD defined by the federation modules (forgejo.org/modules/forgefed), not by the REST API's own schema -- so the SDK exposes the decoded document as a generic map rather than guessing at undocumented fields.
type ActivityPubSigner ¶
type ActivityPubSigner struct {
// contains filtered or unexported fields
}
ActivityPubSigner holds the RSA key a client signs its /activitypub/ requests with, and the key ID that tells the server where to find the matching public key.
This is the authentication the actor sub-routes (/activitypub/user-id/... and /activitypub/repository-id/...) expect. They are not token-protected API endpoints: they answer a *remote federated server*, and Forgejo authenticates that peer with an HTTP Signature over the Cavage draft scheme, not with the client's access token. A token- or password- authenticated request to them is rejected with "request signature verification failed".
keyID must be the URL of the "publicKey" of an ActivityStreams actor document the Forgejo server can fetch over HTTP, conventionally "<actor-id>#main-key". On receiving a signed request Forgejo GETs that URL and requires the document to be a Person or Application actor whose publicKey.id equals keyID and whose publicKey.publicKeyPem is the PEM of the key used here (PublicKeyPEM returns exactly that). Publishing that actor document is the caller's job -- it belongs to the federated instance the caller speaks for, not to this HTTP client.
Note that Forgejo stores a peer's key the first time it resolves keyID and keeps serving it from the database afterwards: changing the key behind a key ID it has already seen makes every later signature fail. Give a new key a new key ID.
func NewActivityPubSigner ¶
func NewActivityPubSigner(keyID string, privateKeyPEM []byte) (*ActivityPubSigner, error)
NewActivityPubSigner returns a signer for the given key ID and RSA private key. The key is PEM encoded, in either PKCS#1 ("RSA PRIVATE KEY") or PKCS#8 ("PRIVATE KEY") form.
func (*ActivityPubSigner) KeyID ¶
func (s *ActivityPubSigner) KeyID() string
KeyID returns the key ID the signer signs with.
func (*ActivityPubSigner) PublicKeyPEM ¶
func (s *ActivityPubSigner) PublicKeyPEM() (string, error)
PublicKeyPEM returns the PKIX PEM encoding of the signer's public key: the exact string that has to appear as publicKey.publicKeyPem in the actor document published at KeyID, for the server to accept the signature.
type AddCollaboratorOption ¶
type AddCollaboratorOption struct {
Permission *AccessMode `json:"permission"`
}
AddCollaboratorOption options when adding a user as a collaborator of a repository
func (*AddCollaboratorOption) Validate ¶
func (opt *AddCollaboratorOption) Validate() error
Validate the AddCollaboratorOption struct
type AddTimeOption ¶
type AddTimeOption struct {
// time in seconds
Time int64 `json:"time"`
// optional
Created time.Time `json:"created"`
// optional
User string `json:"user_name"`
}
AddTimeOption options for adding time to an issue
func (AddTimeOption) Validate ¶
func (opt AddTimeOption) Validate() error
Validate the AddTimeOption struct
type AdminListAllEmailsOptions ¶
type AdminListAllEmailsOptions struct {
ListOptions
}
AdminListAllEmailsOptions options for listing all users' email addresses
type AdminListOrgsOptions ¶
type AdminListOrgsOptions struct {
ListOptions
}
AdminListOrgsOptions options for listing admin's organizations
type AdminListRunnersOptions ¶
type AdminListRunnersOptions struct {
ListOptions
// Visible, when true, includes all runners visible to the instance
// (global, and org/user/repo scoped). When false, only runners directly
// owned by the instance are returned.
Visible bool
}
AdminListRunnersOptions options for listing admin runners
type AdminListUnadoptedOptions ¶
type AdminListUnadoptedOptions struct {
ListOptions
// Pattern of repositories to search for
Pattern string
}
AdminListUnadoptedOptions options for listing unadopted repositories
type AdminListUserAccessTokensOptions ¶
type AdminListUserAccessTokensOptions struct {
ListOptions
}
AdminListUserAccessTokensOptions options for listing a user's access tokens as an admin
type AdminListUsersOptions ¶
type AdminListUsersOptions struct {
ListOptions
}
AdminListUsersOptions options for listing admin users
type AdminSearchEmailsOptions ¶
type AdminSearchEmailsOptions struct {
ListOptions
// Keyword to search for
Keyword string
}
AdminSearchEmailsOptions options for searching users' email addresses
type AnnotatedTag ¶
type AnnotatedTag struct {
Tag string `json:"tag"`
SHA string `json:"sha"`
URL string `json:"url"`
Message string `json:"message"`
Tagger *CommitUser `json:"tagger"`
Object *AnnotatedTagObject `json:"object"`
Verification *PayloadCommitVerification `json:"verification"`
}
AnnotatedTag represents an annotated tag
type AnnotatedTagObject ¶
type AnnotatedTagObject struct {
Type string `json:"type"`
URL string `json:"url"`
SHA string `json:"sha"`
}
AnnotatedTagObject contains meta information of the tag object
type ArchiveType ¶
type ArchiveType string
ArchiveType represent supported archive formats by forgejo
const ( // ZipArchive represent zip format ZipArchive ArchiveType = ".zip" // TarGZArchive represent tar.gz format TarGZArchive ArchiveType = ".tar.gz" )
type Attachment ¶
type Attachment struct {
ID int64 `json:"id"`
Name string `json:"name"`
Size int64 `json:"size"`
DownloadCount int64 `json:"download_count"`
Created time.Time `json:"created_at"`
UUID string `json:"uuid"`
DownloadURL string `json:"browser_download_url"`
}
Attachment a generic attachment
type BlockedUser ¶
BlockedUser represents a user blocked by the authenticated user.
type Branch ¶
type Branch struct {
Name string `json:"name"`
Commit *PayloadCommit `json:"commit"`
Protected bool `json:"protected"`
RequiredApprovals int64 `json:"required_approvals"`
EnableStatusCheck bool `json:"enable_status_check"`
StatusCheckContexts []string `json:"status_check_contexts"`
UserCanPush bool `json:"user_can_push"`
UserCanMerge bool `json:"user_can_merge"`
EffectiveBranchProtectionName string `json:"effective_branch_protection_name"`
}
Branch represents a repository branch
type BranchProtection ¶
type BranchProtection struct {
BranchName string `json:"branch_name"`
RuleName string `json:"rule_name"`
EnablePush bool `json:"enable_push"`
EnablePushWhitelist bool `json:"enable_push_whitelist"`
PushWhitelistUsernames []string `json:"push_whitelist_usernames"`
PushWhitelistTeams []string `json:"push_whitelist_teams"`
PushWhitelistDeployKeys bool `json:"push_whitelist_deploy_keys"`
EnableMergeWhitelist bool `json:"enable_merge_whitelist"`
MergeWhitelistUsernames []string `json:"merge_whitelist_usernames"`
MergeWhitelistTeams []string `json:"merge_whitelist_teams"`
EnableStatusCheck bool `json:"enable_status_check"`
StatusCheckContexts []string `json:"status_check_contexts"`
RequiredApprovals int64 `json:"required_approvals"`
EnableApprovalsWhitelist bool `json:"enable_approvals_whitelist"`
ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"`
ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"`
BlockOnRejectedReviews bool `json:"block_on_rejected_reviews"`
BlockOnOfficialReviewRequests bool `json:"block_on_official_review_requests"`
BlockOnOutdatedBranch bool `json:"block_on_outdated_branch"`
DismissStaleApprovals bool `json:"dismiss_stale_approvals"`
RequireSignedCommits bool `json:"require_signed_commits"`
ProtectedFilePatterns string `json:"protected_file_patterns"`
UnprotectedFilePatterns string `json:"unprotected_file_patterns"`
ApplyToAdmins bool `json:"apply_to_admins"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
}
BranchProtection represents a branch protection for a repository
type ChangeFileOperation ¶
type ChangeFileOperation struct {
// indicates what to do with the file, either "create", "update" or "delete"
Operation string `json:"operation"`
// path to the existing or new file
Path string `json:"path"`
// new or updated file content, must be base64 encoded
Content string `json:"content"`
// sha is the SHA for the file that already exists, required for update or delete
SHA string `json:"sha"`
// old path of the file to move
FromPath string `json:"from_path"`
}
ChangeFileOperation for creating, updating or deleting a file
type ChangeFilesOptions ¶
type ChangeFilesOptions struct {
FileOptions
// list of file operations
Files []*ChangeFileOperation `json:"files"`
}
ChangeFilesOptions options for creating, updating or deleting multiple 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)
type ChangedFile ¶
type ChangedFile struct {
Filename string `json:"filename"`
PreviousFilename string `json:"previous_filename"`
Status string `json:"status"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
Changes int `json:"changes"`
HTMLURL string `json:"html_url"`
ContentsURL string `json:"contents_url"`
RawURL string `json:"raw_url"`
}
ChangedFile is a changed file in a diff
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a thread-safe Forgejo API client.
func NewClient ¶
func NewClient(url string, options ...ClientOption) (*Client, error)
NewClient initializes and returns a API client. Usage of all forgejo.Client methods is concurrency-safe.
func NewClientWithHTTP
deprecated
func (*Client) AcceptRepoTransfer ¶
func (c *Client) AcceptRepoTransfer(owner, reponame string) (*Repository, *Response, error)
AcceptRepoTransfer accepts a repo transfer.
func (*Client) ActivityPubFollow ¶
func (c *Client) ActivityPubFollow(opt APRemoteFollowOption) (*Response, error)
ActivityPubFollow makes the current user follow a remote ActivityPub actor. Unlike Follow/Unfollow above, which operate on a user local to this instance, this federates a follow request to a remote instance.
Target is the actor's URI. The server resolves it for real before it answers: it reads the remote instance's nodeinfo documents, fetches the actor document, creates a local federated user for it, and only then queues the Follow activity for delivery (services/federation, FollowRemoteActor). An actor it cannot reach is answered with 406, not with a success.
func (*Client) AddCollaborator ¶
func (c *Client) AddCollaborator(user, repo, collaborator string, opt AddCollaboratorOption) (*Response, error)
AddCollaborator add some user as a collaborator of a repository
func (*Client) AddEmail ¶
func (c *Client) AddEmail(opt CreateEmailOption) ([]*Email, *Response, error)
AddEmail add one email to current user with options
func (*Client) AddIssueLabels ¶
func (c *Client) AddIssueLabels(owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)
AddIssueLabels add one or more labels to one issue
func (*Client) AddIssueSubscription ¶
func (c *Client) AddIssueSubscription(owner, repo string, index int64, user string) (*Response, error)
AddIssueSubscription Subscribe user to issue
func (*Client) AddRepoFlag ¶
AddRepoFlag adds a flag to a repository
func (*Client) AddRepoTeam ¶
AddRepoTeam add a team to a repository
func (*Client) AddRepoTopic ¶
AddRepoTopic adds a topic to a repo's topics list
func (*Client) AddTeamMember ¶
AddTeamMember adds a member to a team
func (*Client) AddTeamRepository ¶
AddTeamRepository adds a repository to a team
func (*Client) AddTime ¶
func (c *Client) AddTime(owner, repo string, index int64, opt AddTimeOption) (*TrackedTime, *Response, error)
AddTime adds time to issue with the given index
func (*Client) AdminAddRuleToQuotaGroup ¶
AdminAddRuleToQuotaGroup adds an existing quota rule to a quota group.
func (*Client) AdminAddUserToQuotaGroup ¶
AdminAddUserToQuotaGroup adds a user to a quota group.
func (*Client) AdminAdoptRepository ¶
AdminAdoptRepository adopts unadopted files as a repository owned by the given owner.
func (*Client) AdminCreateHook ¶
func (c *Client) AdminCreateHook(opt CreateHookOption) (*Hook, *Response, error)
AdminCreateHook creates a global (system) webhook.
func (*Client) AdminCreateOrg ¶
func (c *Client) AdminCreateOrg(user string, opt CreateOrgOption) (*Organization, *Response, error)
AdminCreateOrg create an organization
func (*Client) AdminCreateQuotaGroup ¶
func (c *Client) AdminCreateQuotaGroup(opt CreateQuotaGroupOption) (*models.QuotaGroup, *Response, error)
AdminCreateQuotaGroup creates a new quota group.
func (*Client) AdminCreateQuotaRule ¶
func (c *Client) AdminCreateQuotaRule(opt CreateQuotaRuleOption) (*models.QuotaRuleInfo, *Response, error)
AdminCreateQuotaRule creates a new quota rule.
func (*Client) AdminCreateRepo ¶
func (c *Client) AdminCreateRepo(user string, opt CreateRepoOption) (*Repository, *Response, error)
AdminCreateRepo create a repo
func (*Client) AdminCreateUser ¶
func (c *Client) AdminCreateUser(opt CreateUserOption) (*User, *Response, error)
AdminCreateUser create a user
func (*Client) AdminCreateUserAccessToken ¶
func (c *Client) AdminCreateUserAccessToken(user string, opt CreateAccessTokenOption) (*AccessToken, *Response, error)
AdminCreateUserAccessToken creates an access token for the specified user, without needing that user's password.
func (*Client) AdminCreateUserPublicKey ¶
func (c *Client) AdminCreateUserPublicKey(user string, opt CreateKeyOption) (*PublicKey, *Response, error)
AdminCreateUserPublicKey adds a public key for the user
func (*Client) AdminDeleteHook ¶
AdminDeleteHook deletes a global (system) webhook by its ID.
func (*Client) AdminDeleteQuotaGroup ¶
AdminDeleteQuotaGroup deletes the given quota group.
func (*Client) AdminDeleteQuotaRule ¶
AdminDeleteQuotaRule deletes the given quota rule.
func (*Client) AdminDeleteRunner ¶
AdminDeleteRunner deletes a particular runner, no matter whether it is a global runner or scoped to an organization, user, or repository.
func (*Client) AdminDeleteUnadoptedRepository ¶
AdminDeleteUnadoptedRepository deletes unadopted files that would otherwise have been adopted as owner/repo.
func (*Client) AdminDeleteUser ¶
AdminDeleteUser delete one user according name
func (*Client) AdminDeleteUserAccessToken ¶
AdminDeleteUserAccessToken deletes an access token for the specified user, identified by ID and if not available by name.
func (*Client) AdminDeleteUserEmails ¶
func (c *Client) AdminDeleteUserEmails(user string, opt DeleteEmailOption) (*Response, error)
AdminDeleteUserEmails deletes email addresses from a user's account.
func (*Client) AdminDeleteUserPublicKey ¶
AdminDeleteUserPublicKey deletes a user's public key
func (*Client) AdminEditHook ¶
AdminEditHook edits a global (system) webhook by its ID.
func (*Client) AdminEditQuotaRule ¶
func (c *Client) AdminEditQuotaRule(quotaRule string, opt EditQuotaRuleOption) (*models.QuotaRuleInfo, *Response, error)
AdminEditQuotaRule changes an existing quota rule.
func (*Client) AdminEditUser ¶
func (c *Client) AdminEditUser(user string, opt EditUserOption) (*Response, error)
AdminEditUser modify user informations
func (*Client) AdminGetHook ¶
AdminGetHook gets a global (system) webhook by its ID.
func (*Client) AdminGetQuotaGroup ¶
AdminGetQuotaGroup gets information about the given quota group.
func (*Client) AdminGetQuotaRule ¶
AdminGetQuotaRule gets information about the given quota rule.
func (*Client) AdminGetRunner ¶
func (c *Client) AdminGetRunner(runnerID int64) (*ActionRunner, *Response, error)
AdminGetRunner gets a particular runner, no matter whether it is a global runner or scoped to an organization, user, or repository.
func (*Client) AdminGetUserQuota ¶
AdminGetUserQuota returns the given user's quota info.
func (*Client) AdminListActionRunJobs ¶
func (c *Client) AdminListActionRunJobs(opt ListActionJobsOption) ([]*ActionRunJob, *Response, error)
AdminListActionRunJobs gets action run jobs across the whole instance, optionally filtered by a comma separated list of labels.
func (*Client) AdminListAllEmails ¶
func (c *Client) AdminListAllEmails(opt AdminListAllEmailsOptions) ([]*Email, *Response, error)
AdminListAllEmails lists all users' email addresses.
func (*Client) AdminListHooks ¶
func (c *Client) AdminListHooks(opt ListHooksOptions) ([]*Hook, *Response, error)
AdminListHooks lists all the global (system) webhooks.
func (*Client) AdminListOrgs ¶
func (c *Client) AdminListOrgs(opt AdminListOrgsOptions) ([]*Organization, *Response, error)
AdminListOrgs lists all orgs
func (*Client) AdminListQuotaGroups ¶
func (c *Client) AdminListQuotaGroups() ([]*models.QuotaGroup, *Response, error)
AdminListQuotaGroups lists the available quota groups.
func (*Client) AdminListQuotaRules ¶
func (c *Client) AdminListQuotaRules() ([]*models.QuotaRuleInfo, *Response, error)
AdminListQuotaRules lists the available quota rules.
func (*Client) AdminListRunners ¶
func (c *Client) AdminListRunners(opt AdminListRunnersOptions) ([]*ActionRunner, *Response, error)
AdminListRunners lists all runners, no matter whether they are global runners or scoped to an organization, user, or repository.
func (*Client) AdminListUnadopted ¶
func (c *Client) AdminListUnadopted(opt AdminListUnadoptedOptions) ([]string, *Response, error)
AdminListUnadopted lists unadopted repositories, i.e. directories in the repository root that are not tracked as repositories in the database.
func (*Client) AdminListUserAccessTokens ¶
func (c *Client) AdminListUserAccessTokens(user string, opt AdminListUserAccessTokensOptions) ([]*AccessToken, *Response, error)
AdminListUserAccessTokens lists the specified user's access tokens.
func (*Client) AdminListUserEmails ¶
AdminListUserEmails lists all email addresses for a user.
func (*Client) AdminListUsers ¶
func (c *Client) AdminListUsers(opt AdminListUsersOptions) ([]*User, *Response, error)
AdminListUsers lists all users
func (*Client) AdminListUsersInQuotaGroup ¶
AdminListUsersInQuotaGroup lists the users in a quota group.
func (*Client) AdminRegisterRunner ¶
func (c *Client) AdminRegisterRunner(opt RegisterRunnerOption) (*RegisterRunnerResponse, *Response, error)
AdminRegisterRunner registers a new global runner.
func (*Client) AdminRemoveRuleFromQuotaGroup ¶
AdminRemoveRuleFromQuotaGroup removes a quota rule from a quota group.
func (*Client) AdminRemoveUserFromQuotaGroup ¶
AdminRemoveUserFromQuotaGroup removes a user from a quota group.
func (*Client) AdminRenameUser ¶
func (c *Client) AdminRenameUser(user string, opt RenameUserOption) (*Response, error)
AdminRenameUser renames a user.
func (*Client) AdminSearchEmails ¶
func (c *Client) AdminSearchEmails(opt AdminSearchEmailsOptions) ([]*Email, *Response, error)
AdminSearchEmails searches users' email addresses.
func (*Client) AdminSetUserQuotaGroups ¶
func (c *Client) AdminSetUserQuotaGroups(user string, opt SetUserQuotaGroupsOption) (*Response, error)
AdminSetUserQuotaGroups sets the user's quota groups to the given list, replacing any existing group membership.
func (*Client) BlockUser ¶
BlockUser blocks the given user from interacting with the authenticated user.
func (*Client) CancelScheduledAutoMerge ¶
CancelScheduledAutoMerge cancels the scheduled auto merge for the given pull request
func (*Client) ChangeFiles ¶
func (c *Client) ChangeFiles(owner, repo string, opt ChangeFilesOptions) (*FilesResponse, *Response, error)
ChangeFiles creates, updates or deletes multiple files in a repository in a single commit
func (*Client) CheckIssueSubscription ¶
func (c *Client) CheckIssueSubscription(owner, repo string, index int64) (*WatchInfo, *Response, error)
CheckIssueSubscription check if current user is subscribed to an issue
func (*Client) CheckMyQuota ¶
CheckMyQuota checks if the authenticated user is over quota.
func (*Client) CheckNotifications ¶
CheckNotifications list users's notification threads
func (*Client) CheckOrgMembership ¶
CheckOrgMembership Check if a user is a member of an organization
func (*Client) CheckOrgQuota ¶
func (c *Client) CheckOrgQuota(ctx context.Context, org string, subject QuotaSubject) (bool, Response, error)
CheckOrgQuota checks if the organization is over quota for the given subject.
func (*Client) CheckPublicOrgMembership ¶
CheckPublicOrgMembership Check if a user is a member of an organization
func (*Client) CheckRepoFlag ¶
CheckRepoFlag checks whether a repository has a given flag
func (*Client) CheckRepoTeam ¶
CheckRepoTeam check if team is assigned to repo by name and return it. If not assigned, it will return nil.
func (*Client) CheckRepoWatch ¶
CheckRepoWatch check if the current user is watching a repo
func (*Client) CheckServerVersionConstraint ¶
CheckServerVersionConstraint validates that the login's server satisfies a given version constraint such as ">= 1.11.0+dev"
func (*Client) ClearIssueLabels ¶
ClearIssueLabels delete all the labels of one issue.
func (*Client) CollaboratorPermission ¶
func (c *Client) CollaboratorPermission(user, repo, collaborator string) (*CollaboratorPermissionResult, *Response, error)
CollaboratorPermission gets collaborator permission of a repository
func (*Client) CompareCommits ¶
CompareCommits compares two commits in a repository.
func (*Client) ConvertToNormalRepo ¶
func (c *Client) ConvertToNormalRepo(user, repo string) (*Repository, *Response, error)
ConvertToNormalRepo converts a mirror repository to a normal (non-mirror) repository
func (*Client) CreateAccessToken ¶
func (c *Client) CreateAccessToken(user string, opt CreateAccessTokenOption) (*AccessToken, *Response, error)
CreateAccessToken create one access token with options
func (*Client) CreateBranch ¶
func (c *Client) CreateBranch(owner, repo string, opt CreateBranchOption) (*Branch, *Response, error)
CreateBranch creates a branch for a user's repository
func (*Client) CreateBranchProtection ¶
func (c *Client) CreateBranchProtection(owner, repo string, opt CreateBranchProtectionOption) (*BranchProtection, *Response, error)
CreateBranchProtection creates a branch protection for a repo
func (*Client) CreateDeployKey ¶
func (c *Client) CreateDeployKey(user, repo string, opt CreateKeyOption) (*DeployKey, *Response, error)
CreateDeployKey options when create one deploy key
func (*Client) CreateFile ¶
func (c *Client) CreateFile(owner, repo, filepath string, opt CreateFileOptions) (*FileResponse, *Response, error)
CreateFile create a file in a repository
func (*Client) CreateFork ¶
func (c *Client) CreateFork(user, repo string, form CreateForkOption) (*Repository, *Response, error)
CreateFork create a fork of a repository
func (*Client) CreateGPGKey ¶
func (c *Client) CreateGPGKey(opt CreateGPGKeyOption) (*GPGKey, *Response, error)
CreateGPGKey create GPG key with options
func (*Client) CreateIssue ¶
CreateIssue create a new issue for a given repository
func (*Client) CreateIssueAttachment ¶
func (c *Client) CreateIssueAttachment(owner, repo string, index int64, file io.Reader, filename string) (*Attachment, *Response, error)
CreateIssueAttachment creates an attachment for the given issue with the given file and filename. The filename is also used as the attachment's name unless overridden with EditIssueAttachment afterwards.
func (*Client) CreateIssueBlocking ¶
func (c *Client) CreateIssueBlocking(owner, repo string, index int64, meta IssueMeta) (*Issue, *Response, error)
CreateIssueBlocking blocks the issue given in meta by the issue given in index
func (*Client) CreateIssueComment ¶
func (c *Client) CreateIssueComment(owner, repo string, index int64, opt CreateIssueCommentOption) (*Comment, *Response, error)
CreateIssueComment create comment on an issue.
func (*Client) CreateIssueCommentAttachment ¶
func (c *Client) CreateIssueCommentAttachment(owner, repo string, commentID int64, file io.Reader, filename string) (*Attachment, *Response, error)
CreateIssueCommentAttachment creates an attachment for the given comment with the given file and filename. The filename is also used as the attachment's name unless overridden with EditIssueCommentAttachment afterwards.
func (*Client) CreateIssueDependency ¶
func (c *Client) CreateIssueDependency(owner, repo string, index int64, meta IssueMeta) (*Issue, *Response, error)
CreateIssueDependency makes the issue given in index depend on the issue given in meta
func (*Client) CreateLabel ¶
CreateLabel create one label of repository
func (*Client) CreateMilestone ¶
func (c *Client) CreateMilestone(owner, repo string, opt CreateMilestoneOption) (*Milestone, *Response, error)
CreateMilestone create one milestone with options
func (*Client) CreateMyHook ¶
func (c *Client) CreateMyHook(opt CreateHookOption) (*Hook, *Response, error)
CreateMyHook create one hook for the authenticated user, with options
func (*Client) CreateOauth2 ¶
func (c *Client) CreateOauth2(opt CreateOauth2Option) (*Oauth2, *Response, error)
CreateOauth2 create an Oauth2 Application and returns a completed Oauth2 object.
func (*Client) CreateOrg ¶
func (c *Client) CreateOrg(opt CreateOrgOption) (*Organization, *Response, error)
CreateOrg creates an organization
func (*Client) CreateOrgActionSecret ¶
func (c *Client) CreateOrgActionSecret(org string, opt CreateSecretOption) (*Response, error)
CreateOrgActionSecret creates a secret for the specified organization in the Gitea Actions. It takes the organization name and the secret options as parameters. The function returns the HTTP response and an error, if any.
func (*Client) CreateOrgActionVariable ¶
func (c *Client) CreateOrgActionVariable(org string, opt CreateVariableOption) (*Response, error)
CreateOrgActionVariable creates an action variable for an organization
func (*Client) CreateOrgHook ¶
CreateOrgHook create one hook for an organization, with options
func (*Client) CreateOrgLabel ¶
CreateOrgLabel create one label for an organization
func (*Client) CreateOrgRepo ¶
func (c *Client) CreateOrgRepo(org string, opt CreateRepoOption) (*Repository, *Response, error)
CreateOrgRepo creates an organization repository for authenticated user.
func (*Client) CreatePublicKey ¶
func (c *Client) CreatePublicKey(opt CreateKeyOption) (*PublicKey, *Response, error)
CreatePublicKey create public key with options
func (*Client) CreatePullRequest ¶
func (c *Client) CreatePullRequest(owner, repo string, opt CreatePullRequestOption) (*PullRequest, *Response, error)
CreatePullRequest create pull request with options
func (*Client) CreatePullReview ¶
func (c *Client) CreatePullReview(owner, repo string, index int64, opt CreatePullReviewOptions) (*PullReview, *Response, error)
CreatePullReview create a review to an pull request
func (*Client) CreatePullReviewComment ¶
func (c *Client) CreatePullReviewComment(owner, repo string, index, id int64, opt CreatePullReviewCommentOptions) (*PullReviewComment, *Response, error)
CreatePullReviewComment adds a new comment to an existing pull request review
func (*Client) CreateRelease ¶
func (c *Client) CreateRelease(owner, repo string, opt CreateReleaseOption) (*Release, *Response, error)
CreateRelease create a release
func (*Client) CreateReleaseAttachment ¶
func (c *Client) CreateReleaseAttachment(user, repo string, release int64, file io.Reader, filename string) (*Attachment, *Response, error)
CreateReleaseAttachment creates an attachment for the given release
func (*Client) CreateRepo ¶
func (c *Client) CreateRepo(opt CreateRepoOption) (*Repository, *Response, error)
CreateRepo creates a repository for authenticated user.
func (*Client) CreateRepoActionSecret ¶
func (c *Client) CreateRepoActionSecret(user, repo string, opt CreateSecretOption) (*Response, error)
CreateRepoActionSecret creates a secret for the specified repository in the Gitea Actions. It takes the organization name and the secret options as parameters. The function returns the HTTP response and an error, if any.
func (*Client) CreateRepoActionVariable ¶
func (c *Client) CreateRepoActionVariable(owner, repo string, opt CreateVariableOption) (*Response, error)
CreateRepoActionVariable creates an action variable for a repository
func (*Client) CreateRepoFromTemplate ¶
func (c *Client) CreateRepoFromTemplate(templateOwner, templateRepo string, opt CreateRepoFromTemplateOption) (*Repository, *Response, error)
CreateRepoFromTemplate create a repository using a template
func (*Client) CreateRepoHook ¶
CreateRepoHook create one hook for a repository, with options
func (*Client) CreateReviewRequests ¶
func (c *Client) CreateReviewRequests(owner, repo string, index int64, opt PullReviewRequestOptions) (*Response, error)
CreateReviewRequests create review requests to an pull request
func (*Client) CreateStatus ¶
func (c *Client) CreateStatus(owner, repo, sha string, opts CreateStatusOption) (*Status, *Response, error)
CreateStatus creates a new Status for a given Commit
func (*Client) CreateTagProtection ¶
func (c *Client) CreateTagProtection(owner, repo string, opt CreateTagProtectionOption) (*TagProtection, *Response, error)
CreateTagProtection creates a tag protection for a repo
func (*Client) CreateTeam ¶
CreateTeam creates a team for an organization
func (*Client) CreateUserActionSecret ¶
func (c *Client) CreateUserActionSecret(opt CreateSecretOption) (*Response, error)
CreateUserActionSecret creates a secret for the authenticated user
func (*Client) CreateUserActionVariable ¶
func (c *Client) CreateUserActionVariable(opt CreateVariableOption) (*Response, error)
CreateUserActionVariable creates an action variable for the authenticated user
func (*Client) CreateWikiPage ¶
func (c *Client) CreateWikiPage(owner, repo string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)
CreateWikiPage creates a wiki page for a repository
func (*Client) DeleteAccessToken
deprecated
func (*Client) DeleteAccessTokenByID ¶
func (c *Client) DeleteAccessTokenByID(ctx context.Context, user string, id int64) (Response, error)
DeleteAccessTokenByID deletes a token identified by its ID.
func (*Client) DeleteAccessTokenByName ¶
DeleteAccessTokenByName deletes a token identified by its name.
func (*Client) DeleteAllRepoFlags ¶
DeleteAllRepoFlags removes all flags from a repository
func (*Client) DeleteBranchProtection ¶
DeleteBranchProtection deletes a branch protection for a repo
func (*Client) DeleteCollaborator ¶
DeleteCollaborator remove a collaborator from a repository
func (*Client) DeleteDeployKey ¶
DeleteDeployKey delete deploy key with key id
func (*Client) DeleteEmail ¶
func (c *Client) DeleteEmail(opt DeleteEmailOption) (*Response, error)
DeleteEmail delete one email of current users'
func (*Client) DeleteFile ¶
func (c *Client) DeleteFile(owner, repo, filepath string, opt DeleteFileOptions) (*Response, error)
DeleteFile delete a file from repository
func (*Client) DeleteGPGKey ¶
DeleteGPGKey delete GPG key with key id
func (*Client) DeleteIssue ¶
DeleteIssue delete a issue from a repository
func (*Client) DeleteIssueAttachment ¶
func (c *Client) DeleteIssueAttachment(owner, repo string, index, attachmentID int64) (*Response, error)
DeleteIssueAttachment deletes the given issue attachment including the uploaded file
func (*Client) DeleteIssueComment ¶
DeleteIssueComment deletes an issue comment.
func (*Client) DeleteIssueCommentAttachment ¶
func (c *Client) DeleteIssueCommentAttachment(owner, repo string, commentID, attachmentID int64) (*Response, error)
DeleteIssueCommentAttachment deletes the given comment attachment including the uploaded file
func (*Client) DeleteIssueCommentReaction ¶
func (c *Client) DeleteIssueCommentReaction(owner, repo string, commentID int64, reaction string) (*Response, error)
DeleteIssueCommentReaction remove a reaction from a comment of an issue
func (*Client) DeleteIssueLabel ¶
DeleteIssueLabel delete one label of one issue by issue id and label id TODO: maybe we need delete by label name and issue id
func (*Client) DeleteIssueReaction ¶
func (c *Client) DeleteIssueReaction(owner, repo string, index int64, reaction string) (*Response, error)
DeleteIssueReaction remove a reaction from an issue
func (*Client) DeleteIssueStopwatch ¶
DeleteIssueStopwatch delete / cancel a specific stopwatch
func (*Client) DeleteIssueSubscription ¶
func (c *Client) DeleteIssueSubscription(owner, repo string, index int64, user string) (*Response, error)
DeleteIssueSubscription unsubscribe user from issue
func (*Client) DeleteLabel ¶
DeleteLabel delete one label of repository by id
func (*Client) DeleteMilestone ¶
DeleteMilestone delete one milestone by id
func (*Client) DeleteMilestoneByName ¶
DeleteMilestoneByName delete one milestone by name
func (*Client) DeleteMyHook ¶
DeleteMyHook delete one hook from the authenticated user, with hook id
func (*Client) DeleteOauth2 ¶
DeleteOauth2 delete an Oauth2 application by ID
func (*Client) DeleteOrgActionSecret ¶
DeleteOrgActionSecret deletes a secret in an organization
func (*Client) DeleteOrgActionVariable ¶
DeleteOrgActionVariable deletes an action variable from an organization
func (*Client) DeleteOrgAvatar ¶
DeleteOrgAvatar deletes an organization's avatar. It will be replaced by a default one.
func (*Client) DeleteOrgHook ¶
DeleteOrgHook delete one hook from an organization, with hook id
func (*Client) DeleteOrgLabel ¶
DeleteOrgLabel delete one label of an organization by id
func (*Client) DeleteOrgMembership ¶
DeleteOrgMembership remove a member from an organization
func (*Client) DeleteOrgRunner ¶
DeleteOrgRunner deletes a particular runner that belongs to the organization
func (*Client) DeletePackage ¶
DeletePackage deletes a specific package version
func (*Client) DeletePublicKey ¶
DeletePublicKey delete public key with key id
func (*Client) DeletePullReview ¶
DeletePullReview delete a specific review from a pull request
func (*Client) DeletePullReviewComment ¶
func (c *Client) DeletePullReviewComment(owner, repo string, index, id, comment int64) (*Response, error)
DeletePullReviewComment deletes a specific comment of a pull request review
func (*Client) DeletePushMirror ¶
DeletePushMirror removes a push mirror from a repository by its remote name
func (*Client) DeleteRelease ¶
DeleteRelease delete a release from a repository, keeping its tag
func (*Client) DeleteReleaseAttachment ¶
DeleteReleaseAttachment deletes the given attachment including the uploaded file
func (*Client) DeleteReleaseByTag ¶
DeleteReleaseByTag deletes a release frm a repository by tag
func (*Client) DeleteRepo ¶
DeleteRepo deletes a repository of user or organization.
func (*Client) DeleteRepoActionSecret ¶
DeleteRepoActionSecret deletes a secret in a repository
func (*Client) DeleteRepoActionVariable ¶
DeleteRepoActionVariable deletes an action variable from a repository
func (*Client) DeleteRepoAvatar ¶
DeleteRepoAvatar deletes a repository's avatar
func (*Client) DeleteRepoBranch ¶
DeleteRepoBranch delete a branch in a repository
func (*Client) DeleteRepoFlag ¶
DeleteRepoFlag removes a flag from a repository
func (*Client) DeleteRepoGitHook ¶
DeleteRepoGitHook delete one Git hook from a repository
func (*Client) DeleteRepoHook ¶
DeleteRepoHook delete one hook from a repository, with hook id
func (*Client) DeleteRepoTopic ¶
DeleteRepoTopic deletes a topic from repo's topics list
func (*Client) DeleteReviewRequests ¶
func (c *Client) DeleteReviewRequests(owner, repo string, index int64, opt PullReviewRequestOptions) (*Response, error)
DeleteReviewRequests delete review requests to an pull request
func (*Client) DeleteTagProtection ¶
DeleteTagProtection deletes a tag protection for a repo
func (*Client) DeleteTeam ¶
DeleteTeam deletes a team of an organization
func (*Client) DeleteTime ¶
DeleteTime delete a specific tracked time by id of a single issue for a given repository
func (*Client) DeleteUserActionSecret ¶
DeleteUserActionSecret deletes a secret for the authenticated user
func (*Client) DeleteUserActionVariable ¶
DeleteUserActionVariable deletes an action variable for the authenticated user
func (*Client) DeleteUserAvatar ¶
DeleteUserAvatar deletes the avatar of the currently authenticated user. It will be replaced by a default one.
func (*Client) DeleteUserRunner ¶
DeleteUserRunner deletes a particular user-level Actions runner.
func (*Client) DeleteWikiPage ¶
DeleteWikiPage deletes a wiki page. pageName may be empty to delete the "Home" page
func (*Client) DiffPatchFile ¶
func (c *Client) DiffPatchFile(owner, repo string, opt DiffPatchFileOptions) (*FileResponse, *Response, error)
DiffPatchFile apply a diff patch to a file in a repository
func (*Client) DismissPullReview ¶
func (c *Client) DismissPullReview(owner, repo string, index, id int64, opt DismissPullReviewOptions) (*Response, error)
DismissPullReview dismiss a review for a pull request
func (*Client) DispatchRepoWorkflow ¶
func (c *Client) DispatchRepoWorkflow(owner, repo, workflow string, opt DispatchWorkflowOption) (*DispatchWorkflowResponse, *Response, error)
DispatchRepoWorkflow triggers a workflow dispatch event
func (*Client) EditBranchProtection ¶
func (c *Client) EditBranchProtection(owner, repo, name string, opt EditBranchProtectionOption) (*BranchProtection, *Response, error)
EditBranchProtection edits a branch protection for a repo
func (*Client) EditIssue ¶
func (c *Client) EditIssue(owner, repo string, index int64, opt EditIssueOption) (*Issue, *Response, error)
EditIssue modify an existing issue for a given repository
func (*Client) EditIssueAttachment ¶
func (c *Client) EditIssueAttachment(owner, repo string, index, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error)
EditIssueAttachment updates the given issue attachment with the given options
func (*Client) EditIssueComment ¶
func (c *Client) EditIssueComment(owner, repo string, commentID int64, opt EditIssueCommentOption) (*Comment, *Response, error)
EditIssueComment edits an issue comment.
func (*Client) EditIssueCommentAttachment ¶
func (c *Client) EditIssueCommentAttachment(owner, repo string, commentID, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error)
EditIssueCommentAttachment updates the given comment attachment with the given options
func (*Client) EditIssueDeadline ¶
func (c *Client) EditIssueDeadline(owner, repo string, index int64, opt EditDeadlineOption) (*IssueDeadline, *Response, error)
EditIssueDeadline sets or removes the deadline of an issue. Passing a nil Deadline in opt removes it; only the date portion of a non-nil Deadline is taken into account, the time of day is ignored.
func (*Client) EditLabel ¶
func (c *Client) EditLabel(owner, repo string, id int64, opt EditLabelOption) (*Label, *Response, error)
EditLabel modify one label with options
func (*Client) EditMilestone ¶
func (c *Client) EditMilestone(owner, repo string, id int64, opt EditMilestoneOption) (*Milestone, *Response, error)
EditMilestone modify milestone with options
func (*Client) EditMilestoneByName ¶
func (c *Client) EditMilestoneByName(owner, repo, name string, opt EditMilestoneOption) (*Milestone, *Response, error)
EditMilestoneByName modify milestone with options
func (*Client) EditMyHook ¶
func (c *Client) EditMyHook(id int64, opt EditHookOption) (*Response, error)
EditMyHook modify one hook of the authenticated user, with hook id and options
func (*Client) EditOrg ¶
func (c *Client) EditOrg(orgname string, opt EditOrgOption) (*Response, error)
EditOrg modify one organization via options
func (*Client) EditOrgHook ¶
EditOrgHook modify one hook of an organization, with hook id and options
func (*Client) EditOrgLabel ¶
EditOrgLabel modify one label of an organization with options
func (*Client) EditPullRequest ¶
func (c *Client) EditPullRequest(owner, repo string, index int64, opt EditPullRequestOption) (*PullRequest, *Response, error)
EditPullRequest modify pull request with PR id and options
func (*Client) EditRelease ¶
func (c *Client) EditRelease(owner, repo string, id int64, form EditReleaseOption) (*Release, *Response, error)
EditRelease edit a release
func (*Client) EditReleaseAttachment ¶
func (c *Client) EditReleaseAttachment(user, repo string, release, attachment int64, form EditAttachmentOptions) (*Attachment, *Response, error)
EditReleaseAttachment updates the given attachment with the given options
func (*Client) EditRepo ¶
func (c *Client) EditRepo(owner, reponame string, opt EditRepoOption) (*Repository, *Response, error)
EditRepo edit the properties of a repository
func (*Client) EditRepoGitHook ¶
func (c *Client) EditRepoGitHook(user, repo, id string, opt EditGitHookOption) (*Response, error)
EditRepoGitHook modify one Git hook of a repository
func (*Client) EditRepoHook ¶
EditRepoHook modify one hook of a repository, with hook id and options
func (*Client) EditTagProtection ¶
func (c *Client) EditTagProtection(owner, repo string, id int64, opt EditTagProtectionOption) (*TagProtection, *Response, error)
EditTagProtection edits a tag protection for a repo
func (*Client) EditTeam ¶
func (c *Client) EditTeam(id int64, opt EditTeamOption) (*Response, error)
EditTeam edits a team of an organization
func (*Client) EditWikiPage ¶
func (c *Client) EditWikiPage(owner, repo, pageName string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)
EditWikiPage edits an existing wiki page. pageName may be empty to fetch the "Home" page
func (*Client) GetActionsRun ¶
GetActionsRun returns the workflow run associated with the token used to authenticate the request. Unlike the rest of the Client's methods, this one must be authenticated with the automatic actions token (`forgejo.token` / `ACTIONS_RUNTIME_TOKEN` in a running job, set via SetToken like any other token) rather than a personal access token; the token is tied to the job and only valid while it is still running.
func (*Client) GetActivityPubActor ¶
func (c *Client) GetActivityPubActor() (*ActivityPubObject, *Response, error)
GetActivityPubActor returns the instance's Actor (Application) document.
This is the one federation route Forgejo serves unsigned on every version, so that a peer can bootstrap. Every other route in this file speaks to the caller as a remote federated server and needs an HTTP Signature: see UseActivityPubSignature.
func (*Client) GetActivityPubActorOutbox ¶
func (c *Client) GetActivityPubActorOutbox() (*ActivityPubObject, *Response, error)
GetActivityPubActorOutbox returns the instance actor's outbox, an ActivityStreams OrderedCollection. The instance actor's outbox is always empty.
func (*Client) GetActivityPubPerson ¶
func (c *Client) GetActivityPubPerson(userID int64) (*ActivityPubObject, *Response, error)
GetActivityPubPerson returns the Person actor for the user with the given ID.
func (*Client) GetActivityPubPersonActivity ¶
func (c *Client) GetActivityPubPersonActivity(userID, activityID int64) (*ActivityPubObject, *Response, error)
GetActivityPubPersonActivity returns a specific activity recorded for the user.
func (*Client) GetActivityPubPersonActivityNote ¶
func (c *Client) GetActivityPubPersonActivityNote(userID, activityID int64) (*ActivityPubObject, *Response, error)
GetActivityPubPersonActivityNote returns the Note object of a specific activity recorded for the user.
func (*Client) GetActivityPubPersonOutbox ¶
func (c *Client) GetActivityPubPersonOutbox(userID int64) (*ActivityPubObject, *Response, error)
GetActivityPubPersonOutbox lists the user's recorded activity (their outbox).
func (*Client) GetActivityPubRepository ¶
func (c *Client) GetActivityPubRepository(repoID int64) (*ActivityPubObject, *Response, error)
GetActivityPubRepository returns the Repository actor for the repo with the given ID.
func (*Client) GetActivityPubRepositoryOutbox ¶
func (c *Client) GetActivityPubRepositoryOutbox(repoID int64) (*ActivityPubObject, *Response, error)
GetActivityPubRepositoryOutbox returns a repository's outbox, an ActivityStreams OrderedCollection.
func (*Client) GetAnnotatedTag ¶
func (c *Client) GetAnnotatedTag(user, repo, sha string) (*AnnotatedTag, *Response, error)
GetAnnotatedTag get the tag object of an annotated tag (not lightweight tags) of a repository
func (*Client) GetArchive ¶
GetArchive get an archive of a repository by git reference e.g.: ref -> master, 70b7c74b33, v1.2.1, ...
func (*Client) GetArchiveReader ¶
func (c *Client) GetArchiveReader(owner, repo, ref string, ext ArchiveType) (io.ReadCloser, *Response, error)
GetArchiveReader gets a `git archive` for a particular tree-ish git reference such as a branch name (`master`), a commit hash (`70b7c74b33`), a tag (`v1.2.1`). The archive is returned as a byte stream in a ReadCloser. It is the responsibility of the client to close the reader.
func (*Client) GetAssignees ¶
GetAssignees return all users that have write access and can be assigned to issues
func (*Client) GetBlob ¶
func (c *Client) GetBlob(user, repo, sha string) (*GitBlobResponse, *Response, error)
GetBlob get the blob of a repository file
func (*Client) GetBranchProtection ¶
func (c *Client) GetBranchProtection(owner, repo, name string) (*BranchProtection, *Response, error)
GetBranchProtection gets a branch protection
func (*Client) GetCombinedStatus ¶
func (c *Client) GetCombinedStatus(owner, repo, ref string) (*CombinedStatus, *Response, error)
GetCombinedStatus returns the CombinedStatus for a given Commit
func (*Client) GetCommitDiff ¶
GetCommitDiff returns the commit's raw diff.
func (*Client) GetCommitPatch ¶
GetCommitPatch returns the commit's raw patch.
func (*Client) GetCommitPullRequest ¶
func (c *Client) GetCommitPullRequest(user, repo, commitID string) (*PullRequest, *Response, error)
GetCommitPullRequest returns the pull request a commit was merged through.
func (*Client) GetContents ¶
func (c *Client) GetContents(owner, repo, ref, filepath string) (*ContentsResponse, *Response, error)
GetContents get the metadata and contents of a file in a repository ref is optional
func (*Client) GetContentsList ¶
func (c *Client) GetContentsList(owner, repo, ref string) ([]*ContentsResponse, *Response, error)
GetContentsList gets the metadata of all the entries of the root dir ref is optional
func (*Client) GetDeployKey ¶
GetDeployKey get one deploy key with key id
func (*Client) GetEditorConfig ¶
func (c *Client) GetEditorConfig(owner, repo, filepath, ref string) (map[string]string, *Response, error)
GetEditorConfig gets the EditorConfig definitions for a file path in a repository. ref is optional
func (*Client) GetFile ¶
func (c *Client) GetFile(owner, repo, ref, filepath string, resolveLFS ...bool) ([]byte, *Response, error)
GetFile downloads a file of repository, ref can be branch/tag/commit. it optional can resolve lfs pointers and server the file instead e.g.: ref -> master, filepath -> README.md (no leading slash)
func (*Client) GetFileReader ¶
func (c *Client) GetFileReader(owner, repo, ref, filepath string, resolveLFS ...bool) (io.ReadCloser, *Response, error)
GetFileReader return reader for download a file of repository, ref can be branch/tag/commit. it optional can resolve lfs pointers and server the file instead e.g.: ref -> master, filepath -> README.md (no leading slash)
func (*Client) GetGPGKeyVerificationToken ¶
GetGPGKeyVerificationToken gets a token that the user must sign with a GPG key to prove ownership of it, for use with VerifyGPGKey.
func (*Client) GetGitignoreTemplate ¶
func (c *Client) GetGitignoreTemplate(ctx context.Context, name string) (GitignoreTemplateInfo, Response, error)
GetGitignoreTemplate returns the name and content of a single gitignore template.
func (*Client) GetGlobalAPISettings ¶
func (c *Client) GetGlobalAPISettings() (*GlobalAPISettings, *Response, error)
GetGlobalAPISettings get global api settings witch are exposed by it
func (*Client) GetGlobalAttachmentSettings ¶
func (c *Client) GetGlobalAttachmentSettings() (*GlobalAttachmentSettings, *Response, error)
GetGlobalAttachmentSettings get global repository settings witch are exposed by API
func (*Client) GetGlobalRepoSettings ¶
func (c *Client) GetGlobalRepoSettings() (*GlobalRepoSettings, *Response, error)
GetGlobalRepoSettings get global repository settings witch are exposed by API
func (*Client) GetGlobalUISettings ¶
func (c *Client) GetGlobalUISettings() (*GlobalUISettings, *Response, error)
GetGlobalUISettings get global ui settings witch are exposed by API
func (*Client) GetIssueAttachment ¶
func (c *Client) GetIssueAttachment(owner, repo string, index, attachmentID int64) (*Attachment, *Response, error)
GetIssueAttachment returns the requested issue attachment
func (*Client) GetIssueComment ¶
GetIssueComment get a comment for a given repo by id.
func (*Client) GetIssueCommentAttachment ¶
func (c *Client) GetIssueCommentAttachment(owner, repo string, commentID, attachmentID int64) (*Attachment, *Response, error)
GetIssueCommentAttachment returns the requested comment attachment
func (*Client) GetIssueCommentReactions ¶
func (c *Client) GetIssueCommentReactions(owner, repo string, commentID int64) ([]*Reaction, *Response, error)
GetIssueCommentReactions get a list of reactions from a comment of an issue
func (*Client) GetIssueConfig ¶
func (c *Client) GetIssueConfig(owner, repo string) (*IssueConfig, *Response, error)
GetIssueConfig returns the issue config for a repository
func (*Client) GetIssueLabels ¶
func (c *Client) GetIssueLabels(owner, repo string, index int64, opts ListLabelsOptions) ([]*Label, *Response, error)
GetIssueLabels get labels of one issue via issue id
func (*Client) GetIssueReactions ¶
GetIssueReactions get a list reactions of an issue
func (*Client) GetIssueSubscribers ¶
GetIssueSubscribers get list of users who subscribed on an issue
func (*Client) GetIssueTemplates ¶
func (c *Client) GetIssueTemplates(owner, repo string) ([]*IssueTemplate, *Response, error)
GetIssueTemplates lists all issue templates of the repository
func (*Client) GetLabelTemplate ¶
func (c *Client) GetLabelTemplate(ctx context.Context, name string) ([]LabelTemplate, Response, error)
GetLabelTemplate returns all the labels defined by a single label template.
func (*Client) GetLatestRelease ¶
GetLatestRelease get the latest release of a repository
func (*Client) GetLicenseTemplate ¶
func (c *Client) GetLicenseTemplate(ctx context.Context, name string) (LicenseTemplateInfo, Response, error)
GetLicenseTemplate returns the full text and metadata of a single license template.
func (*Client) GetMilestone ¶
GetMilestone get one milestone by repo name and milestone id
func (*Client) GetMilestoneByName ¶
GetMilestoneByName get one milestone by repo and milestone name
func (*Client) GetMyQuota ¶
GetMyQuota returns quota information for the authenticated user
func (*Client) GetMyStarredRepos ¶
func (c *Client) GetMyStarredRepos() ([]*Repository, *Response, error)
GetMyStarredRepos returns the repos that the authenticated user has starred
func (*Client) GetMyStopwatches ¶
GetMyStopwatches list all stopwatches
func (*Client) GetMyTrackedTimes ¶
func (c *Client) GetMyTrackedTimes() ([]*TrackedTime, *Response, error)
GetMyTrackedTimes list tracked times of the current user
func (*Client) GetMyUserInfo ¶
GetMyUserInfo get user info of current user
func (*Client) GetMyWatchedRepos ¶
func (c *Client) GetMyWatchedRepos() ([]*Repository, *Response, error)
GetMyWatchedRepos list repositories watched by the authenticated user
func (*Client) GetNodeInfo ¶
GetNodeInfo returns the nodeinfo of the Forgejo application.
func (*Client) GetNotification ¶
func (c *Client) GetNotification(id int64) (*NotificationThread, *Response, error)
GetNotification get notification thread by ID
func (*Client) GetOrg ¶
func (c *Client) GetOrg(orgname string) (*Organization, *Response, error)
GetOrg get one organization by name
func (*Client) GetOrgActionRunnerRegistrationToken ¶
func (c *Client) GetOrgActionRunnerRegistrationToken(org string) (*RunnerRegistrationToken, *Response, error)
GetOrgActionRunnerRegistrationToken gets a runner registration token for an organization
func (*Client) GetOrgActionVariable ¶
func (c *Client) GetOrgActionVariable(org, variableName string) (*ActionVariable, *Response, error)
GetOrgActionVariable gets a specific organization action variable
func (*Client) GetOrgHook ¶
GetOrgHook get a hook of an organization
func (*Client) GetOrgLabel ¶
GetOrgLabel get one label of an organization by id
func (*Client) GetOrgPermissions ¶
func (c *Client) GetOrgPermissions(org, user string) (*OrgPermissions, *Response, error)
GetOrgPermissions returns user permissions for specific organization.
func (*Client) GetOrgQuota ¶
GetOrgQuota returns quota information for an organization
func (*Client) GetOrgRunner ¶
GetOrgRunner gets a particular runner that belongs to the organization
func (*Client) GetPackage ¶
GetPackage gets the details of a specific package version
func (*Client) GetPublicKey ¶
GetPublicKey get current user's public key by key id
func (*Client) GetPullRequest ¶
GetPullRequest get information of one PR
func (*Client) GetPullRequestByBaseAndHead ¶
func (c *Client) GetPullRequestByBaseAndHead(owner, repo, base, head string) (*PullRequest, *Response, error)
GetPullRequestByBaseAndHead finds a pull request by base and head
func (*Client) GetPullRequestDiff ¶
func (c *Client) GetPullRequestDiff(owner, repo string, index int64, opts PullRequestDiffOptions) ([]byte, *Response, error)
GetPullRequestDiff gets the diff of a PR. For Forgejo >= 1.16, you must set includeBinary to get an applicable diff
func (*Client) GetPullRequestPatch ¶
GetPullRequestPatch gets the git patchset of a PR
func (*Client) GetPullReview ¶
GetPullReview gets a specific review of a pull request
func (*Client) GetPullReviewComment ¶
func (c *Client) GetPullReviewComment(owner, repo string, index, id, comment int64) (*PullReviewComment, *Response, error)
GetPullReviewComment gets a specific comment of a pull request review
func (*Client) GetPushMirrorByRemoteName ¶
func (c *Client) GetPushMirrorByRemoteName(user, repo, remoteName string) (*PushMirrorResponse, *Response, error)
GetPushMirrorByRemoteName gets a push mirror of a repository by its remote name
func (*Client) GetRelease ¶
GetRelease get a release of a repository by id
func (*Client) GetReleaseAttachment ¶
func (c *Client) GetReleaseAttachment(user, repo string, release, id int64) (*Attachment, *Response, error)
GetReleaseAttachment returns the requested attachment
func (*Client) GetReleaseByTag ¶
GetReleaseByTag get a release of a repository by tag
func (*Client) GetRepo ¶
func (c *Client) GetRepo(owner, reponame string) (*Repository, *Response, error)
GetRepo returns information of a repository of given owner.
func (*Client) GetRepoActionRun ¶
GetRepoActionRun gets a specific action run
func (*Client) GetRepoActionRunnerRegistrationToken ¶
func (c *Client) GetRepoActionRunnerRegistrationToken(owner, repo string) (*RunnerRegistrationToken, *Response, error)
GetRepoActionRunnerRegistrationToken gets a runner registration token for a repository
func (*Client) GetRepoActionVariable ¶
func (c *Client) GetRepoActionVariable(owner, repo, variableName string) (*ActionVariable, *Response, error)
GetRepoActionVariable gets a specific action variable
func (*Client) GetRepoAllGitRefs ¶
GetRepoAllGitRefs get list of all of a repository's refs
func (*Client) GetRepoBranch ¶
GetRepoBranch get one branch's information of one repository
func (*Client) GetRepoByID ¶
func (c *Client) GetRepoByID(id int64) (*Repository, *Response, error)
GetRepoByID returns information of a repository by a giver repository ID.
func (*Client) GetRepoGitHook ¶
GetRepoGitHook get a Git hook of a repository
func (*Client) GetRepoHook ¶
GetRepoHook get a hook of a repository
func (*Client) GetRepoLabel ¶
GetRepoLabel get one label of repository by repo it
func (*Client) GetRepoLanguages ¶
GetRepoLanguages return language stats of a repo
func (*Client) GetRepoRef ¶
GetRepoRef get one ref's information of one repository
func (*Client) GetRepoRefs ¶
GetRepoRefs get list of ref's information of one repository
func (*Client) GetRepoSigningKey ¶
GetRepoSigningKey returns the ASCII-armored public part of the key used by the server to sign commits and tags for the given repository, if any.
func (*Client) GetRepoTeams ¶
GetRepoTeams return teams from a repository
func (*Client) GetReviewers ¶
GetReviewers return all users that can be requested to review in this repo
func (*Client) GetSSHSigningKey ¶
GetSSHSigningKey returns the server's default SSH signing key, in OpenSSH authorized-key format.
func (*Client) GetSigningKey ¶
GetSigningKey returns the server's default GPG signing key, armored.
func (*Client) GetSingleCommit ¶
GetSingleCommit returns a single commit
func (*Client) GetStarredRepos ¶
func (c *Client) GetStarredRepos(user string) ([]*Repository, *Response, error)
GetStarredRepos returns the repos that the given user has starred
func (*Client) GetSyncForkBranchInfo ¶
func (c *Client) GetSyncForkBranchInfo(owner, repo, branch string) (*SyncForkInfo, *Response, error)
GetSyncForkBranchInfo gets information about syncing a fork branch with its base branch
func (*Client) GetSyncForkDefaultInfo ¶
func (c *Client) GetSyncForkDefaultInfo(owner, repo string) (*SyncForkInfo, *Response, error)
GetSyncForkDefaultInfo gets information about syncing a fork's default branch with its base branch
func (*Client) GetTagProtection ¶
GetTagProtection gets a tag protection
func (*Client) GetTeamMember ¶
GetTeamMember gets a member of a team
func (*Client) GetTeamRepo ¶
GetTeamRepo gets a particular repository of a team
func (*Client) GetTrees ¶
func (c *Client) GetTrees(user, repo, ref string, opt GetTreesOptions) (*GitTreeResponse, *Response, error)
GetTrees downloads a file of repository, ref can be branch/tag/commit. e.g.: ref -> main, tree -> macaron.go(no leading slash)
func (*Client) GetUserActionRunnerRegistrationToken ¶
func (c *Client) GetUserActionRunnerRegistrationToken() (*RunnerRegistrationToken, *Response, error)
GetUserActionRunnerRegistrationToken gets a runner registration token for the authenticated user
func (*Client) GetUserActionVariable ¶
func (c *Client) GetUserActionVariable(variableName string) (*ActionVariable, *Response, error)
GetUserActionVariable gets a specific user action variable
func (*Client) GetUserByID ¶
GetUserByID returns user by a given user ID
func (*Client) GetUserHeatmapData ¶
func (c *Client) GetUserHeatmapData(username string) ([]*UserHeatmapData, *Response, error)
GetUserHeatmapData gets a user's heatmap data.
func (*Client) GetUserInfo ¶
GetUserInfo get user info by user's name
func (*Client) GetUserRunner ¶
func (c *Client) GetUserRunner(runnerID int64) (*ActionRunner, *Response, error)
GetUserRunner gets a particular runner that belongs to the authenticated user.
func (*Client) GetUserRunners ¶
func (c *Client) GetUserRunners(opt ListActionRunnersOptions) ([]*ActionRunner, *Response, error)
GetUserRunners lists the authenticated user's Actions runners. Set opt.Visible to also include runners visible to the user beyond the ones they directly own.
func (*Client) GetUserSettings ¶
func (c *Client) GetUserSettings() (*UserSettings, *Response, error)
GetUserSettings returns user settings
func (*Client) GetWatchedRepos ¶
func (c *Client) GetWatchedRepos(user string) ([]*Repository, *Response, error)
GetWatchedRepos list all the watched repos of user
func (*Client) GetWikiPage ¶
GetWikiPage gets a wiki page. pageName may be empty to fetch the "Home" page
func (*Client) IsCollaborator ¶
IsCollaborator check if a user is a collaborator of a repository
func (*Client) IsFollowing ¶
IsFollowing if current user followed the target
func (*Client) IsPullRequestMerged ¶
IsPullRequestMerged test if one PR is merged to one repository
func (*Client) IsRepoStarring ¶
IsRepoStarring returns whether the authenticated user has starred the repo or not
func (*Client) IsUserFollowing ¶
IsUserFollowing if the user followed the target
func (*Client) IssueSubscribe ¶
IssueSubscribe subscribe current user to an issue
func (*Client) IssueUnSubscribe ¶
IssueUnSubscribe unsubscribe current user from an issue
func (*Client) LinkPackage ¶
LinkPackage links a package to a repository
func (*Client) ListAccessTokens ¶
func (c *Client) ListAccessTokens(user string, opts ListAccessTokensOptions) ([]*AccessToken, *Response, error)
ListAccessTokens lists all the access tokens of user
func (*Client) ListBlockedUsers ¶
func (c *Client) ListBlockedUsers(opt ListBlockedUsersOptions) ([]*BlockedUser, *Response, error)
ListBlockedUsers lists the users blocked by the currently authenticated user.
func (*Client) ListBranchProtections ¶
func (c *Client) ListBranchProtections(owner, repo string, opt ListBranchProtectionsOptions) ([]*BranchProtection, *Response, error)
ListBranchProtections list branch protections for a repo
func (*Client) ListCollaborators ¶
func (c *Client) ListCollaborators(user, repo string, opt ListCollaboratorsOptions) ([]*User, *Response, error)
ListCollaborators list a repository's collaborators
func (*Client) ListCommitStatuses ¶
func (c *Client) ListCommitStatuses(owner, repo, sha string, opt ListCommitStatusesOptions) ([]*Status, *Response, error)
ListCommitStatuses returns all statuses for a given commit sha, using the legacy /statuses/{sha} route
func (*Client) ListContents ¶
func (c *Client) ListContents(owner, repo, ref, filepath string) ([]*ContentsResponse, *Response, error)
ListContents gets a list of entries in a dir ref is optional
func (*Client) ListCronTasks ¶
func (c *Client) ListCronTasks(opt ListCronTaskOptions) ([]*CronTask, *Response, error)
ListCronTasks list available cron tasks
func (*Client) ListDeployKeys ¶
func (c *Client) ListDeployKeys(user, repo string, opt ListDeployKeysOptions) ([]*DeployKey, *Response, error)
ListDeployKeys list all the deploy keys of one repository
func (*Client) ListEmails ¶
func (c *Client) ListEmails(opt ListEmailsOptions) ([]*Email, *Response, error)
ListEmails all the email addresses of user
func (*Client) ListFollowers ¶
ListFollowers list all the followers of one user
func (*Client) ListFollowing ¶
ListFollowing list all the users the user followed
func (*Client) ListForks ¶
func (c *Client) ListForks(user, repo string, opt ListForksOptions) ([]*Repository, *Response, error)
ListForks list a repository's forks
func (*Client) ListGPGKeys ¶
ListGPGKeys list all the GPG keys of the user
func (*Client) ListGitignoreTemplates ¶
ListGitignoreTemplates returns the names of all gitignore templates known to the server.
func (*Client) ListIssueAttachments ¶
func (c *Client) ListIssueAttachments(owner, repo string, index int64) ([]*Attachment, *Response, error)
ListIssueAttachments list an issue's attachments
func (*Client) ListIssueBlocks ¶
func (c *Client) ListIssueBlocks(owner, repo string, index int64, opt ListOptions) ([]*Issue, *Response, error)
ListIssueBlocks lists the issues that are blocked by the given issue
func (*Client) ListIssueCommentAttachments ¶
func (c *Client) ListIssueCommentAttachments(owner, repo string, commentID int64) ([]*Attachment, *Response, error)
ListIssueCommentAttachments list a comment's attachments
func (*Client) ListIssueComments ¶
func (c *Client) ListIssueComments(owner, repo string, index int64, opt ListIssueCommentOptions) ([]*Comment, *Response, error)
ListIssueComments list comments on an issue.
func (*Client) ListIssueDependencies ¶
func (c *Client) ListIssueDependencies(owner, repo string, index int64, opt ListOptions) ([]*Issue, *Response, error)
ListIssueDependencies lists all issues that block the given issue
func (*Client) ListIssueTimeline ¶
func (c *Client) ListIssueTimeline(owner, repo string, index int64, opt ListIssueTimelineOptions) ([]*TimelineComment, *Response, error)
ListIssueTimeline lists all comments and events on an issue
func (*Client) ListIssueTrackedTimes ¶
func (c *Client) ListIssueTrackedTimes(owner, repo string, index int64, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
ListIssueTrackedTimes list tracked times of a single issue for a given repository
func (*Client) ListIssues ¶
func (c *Client) ListIssues(opt ListIssueOption) ([]*Issue, *Response, error)
ListIssues returns all issues assigned the authenticated user
func (*Client) ListLabelTemplates ¶
ListLabelTemplates returns the names of all label templates known to the server.
func (*Client) ListLicenseTemplates ¶
func (c *Client) ListLicenseTemplates(ctx context.Context) ([]LicenseTemplateListEntry, Response, error)
ListLicenseTemplates returns every license template known to the server.
func (*Client) ListMyFollowers ¶
func (c *Client) ListMyFollowers(opt ListFollowersOptions) ([]*User, *Response, error)
ListMyFollowers list all the followers of current user
func (*Client) ListMyFollowing ¶
func (c *Client) ListMyFollowing(opt ListFollowingOptions) ([]*User, *Response, error)
ListMyFollowing list all the users current user followed
func (*Client) ListMyGPGKeys ¶
func (c *Client) ListMyGPGKeys(opt *ListGPGKeysOptions) ([]*GPGKey, *Response, error)
ListMyGPGKeys list all the GPG keys of current user
func (*Client) ListMyHooks ¶
func (c *Client) ListMyHooks(opt ListHooksOptions) ([]*Hook, *Response, error)
ListMyHooks list all the hooks of the authenticated user
func (*Client) ListMyOrgs ¶
func (c *Client) ListMyOrgs(opt ListOrgsOptions) ([]*Organization, *Response, error)
ListMyOrgs list all of current user's organizations
func (*Client) ListMyPublicKeys ¶
func (c *Client) ListMyPublicKeys(opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)
ListMyPublicKeys list all the public keys of current user
func (*Client) ListMyQuotaArtifacts ¶
func (c *Client) ListMyQuotaArtifacts(ctx context.Context, opt ListMyQuotaArtifactsOptions) ([]models.QuotaUsedArtifact, Response, error)
ListMyQuotaArtifacts lists artifacts counting towards the authenticated user's quota
func (*Client) ListMyQuotaAttachments ¶
func (c *Client) ListMyQuotaAttachments(ctx context.Context, opt ListMyQuotaAttachmentsOptions) ([]models.QuotaUsedAttachment, Response, error)
ListMyQuotaAttachments lists attachments counting towards the authenticated user's quota
func (*Client) ListMyQuotaPackages ¶
func (c *Client) ListMyQuotaPackages(ctx context.Context, opt ListMyQuotaPackagesOptions) ([]models.QuotaUsedPackage, Response, error)
ListMyQuotaPackages lists packages counting towards the authenticated user's quota
func (*Client) ListMyRepos ¶
func (c *Client) ListMyRepos(opt ListReposOptions) ([]*Repository, *Response, error)
ListMyRepos lists all repositories for the authenticated user that has access to.
func (*Client) ListMyTeams ¶
func (c *Client) ListMyTeams(opt *ListTeamsOptions) ([]*Team, *Response, error)
ListMyTeams lists all the teams of the current user
func (*Client) ListNotifications ¶
func (c *Client) ListNotifications(opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
ListNotifications list users's notification threads
func (*Client) ListOauth2 ¶
func (c *Client) ListOauth2(opt ListOauth2Option) ([]*Oauth2, *Response, error)
ListOauth2 all of your Oauth2 Applications.
func (*Client) ListOrgActionJobs ¶
func (c *Client) ListOrgActionJobs(org string, opt ListActionJobsOption) ([]*ActionRunJob, *Response, error)
ListOrgActionJobs searches for organization action jobs
func (*Client) ListOrgActionSecret ¶
func (c *Client) ListOrgActionSecret(org string, opt ListOrgActionSecretOption) ([]*Secret, *Response, error)
ListOrgActionSecret list an organization's secrets
func (*Client) ListOrgActionVariables ¶
func (c *Client) ListOrgActionVariables(org string, opt ListOptions) ([]*ActionVariable, *Response, error)
ListOrgActionVariables lists an organization's action variables
func (*Client) ListOrgActivityFeeds ¶
func (c *Client) ListOrgActivityFeeds(ctx context.Context, org string, opt ListActivityFeedsOptions) ([]*Activity, Response, error)
ListOrgActivityFeeds lists an organization's activity feeds
func (*Client) ListOrgBlockedUsers ¶
func (c *Client) ListOrgBlockedUsers(ctx context.Context, org string, opt ListOrgBlockedUsersOptions) ([]*BlockedUser, Response, error)
ListOrgBlockedUsers lists the organization's blocked users
func (*Client) ListOrgHooks ¶
ListOrgHooks list all the hooks of one organization
func (*Client) ListOrgLabels ¶
ListOrgLabels list an organization's labels
func (*Client) ListOrgMembership ¶
func (c *Client) ListOrgMembership(org string, opt ListOrgMembershipOption) ([]*User, *Response, error)
ListOrgMembership list an organization's members
func (*Client) ListOrgQuotaArtifacts ¶
func (c *Client) ListOrgQuotaArtifacts(ctx context.Context, org string, opt ListOrgQuotaArtifactsOptions) ([]models.QuotaUsedArtifact, Response, error)
ListOrgQuotaArtifacts lists artifacts counting towards an organization's quota
func (*Client) ListOrgQuotaAttachments ¶
func (c *Client) ListOrgQuotaAttachments(ctx context.Context, org string, opt ListOrgQuotaAttachmentsOptions) ([]models.QuotaUsedAttachment, Response, error)
ListOrgQuotaAttachments lists attachments counting towards an organization's quota
func (*Client) ListOrgQuotaPackages ¶
func (c *Client) ListOrgQuotaPackages(ctx context.Context, org string, opt ListOrgQuotaPackagesOptions) ([]models.QuotaUsedPackage, Response, error)
ListOrgQuotaPackages lists packages counting towards an organization's quota
func (*Client) ListOrgRepos ¶
func (c *Client) ListOrgRepos(org string, opt ListOrgReposOptions) ([]*Repository, *Response, error)
ListOrgRepos list all repositories of one organization by organization's name
func (*Client) ListOrgRunners ¶
func (c *Client) ListOrgRunners(org string, opt ListOrgRunnersOption) ([]*ActionRunner, *Response, error)
ListOrgRunners gets the organization's runners
func (*Client) ListOrgTeams ¶
ListOrgTeams lists all teams of an organization
func (*Client) ListOrgs ¶
func (c *Client) ListOrgs(opt ListOrgsOptions) ([]*Organization, *Response, error)
ListOrgs list all organizations
func (*Client) ListPackageFiles ¶
func (c *Client) ListPackageFiles(owner, packageType, name, version string) ([]*PackageFile, *Response, error)
ListPackageFiles lists the files within a package
func (*Client) ListPackages ¶
ListPackages lists all the packages owned by a given owner (user, organisation)
func (*Client) ListPinnedIssues ¶
ListPinnedIssues lists a repo's pinned issues
func (*Client) ListPinnedPullRequests ¶
func (c *Client) ListPinnedPullRequests(owner, repo string) ([]*PullRequest, *Response, error)
ListPinnedPullRequests lists a repo's pinned pull requests
func (*Client) ListPublicKeys ¶
func (c *Client) ListPublicKeys(user string, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)
ListPublicKeys list all the public keys of the user
func (*Client) ListPublicOrgMembership ¶
func (c *Client) ListPublicOrgMembership(org string, opt ListOrgMembershipOption) ([]*User, *Response, error)
ListPublicOrgMembership list an organization's members
func (*Client) ListPullRequestCommits ¶
func (c *Client) ListPullRequestCommits(owner, repo string, index int64, opt ListPullRequestCommitsOptions) ([]*Commit, *Response, error)
ListPullRequestCommits list commits for a pull request
func (*Client) ListPullRequestFiles ¶
func (c *Client) ListPullRequestFiles(owner, repo string, index int64, opt ListPullRequestFilesOptions) ([]*ChangedFile, *Response, error)
ListPullRequestFiles list changed files for a pull request
func (*Client) ListPullReviewComments ¶
func (c *Client) ListPullReviewComments(owner, repo string, index, id int64) ([]*PullReviewComment, *Response, error)
ListPullReviewComments lists all comments of a pull request review
func (*Client) ListPullReviews ¶
func (c *Client) ListPullReviews(owner, repo string, index int64, opt ListPullReviewsOptions) ([]*PullReview, *Response, error)
ListPullReviews lists all reviews of a pull request
func (*Client) ListPushMirrors ¶
func (c *Client) ListPushMirrors(user, repo string, opt ListPushMirrorsOptions) ([]*PushMirrorResponse, *Response, error)
ListPushMirrors gets all push mirrors of a repository
func (*Client) ListReleaseAttachments ¶
func (c *Client) ListReleaseAttachments(user, repo string, release int64) ([]*Attachment, *Response, error)
ListReleaseAttachments list release's attachments
func (*Client) ListReleases ¶
func (c *Client) ListReleases(owner, repo string, opt ListReleasesOptions) ([]*Release, *Response, error)
ListReleases list releases of a repository
func (*Client) ListRepoActionJobs ¶
func (c *Client) ListRepoActionJobs(owner, repo string, opt ListActionJobsOption) ([]*ActionRunJob, *Response, error)
ListRepoActionJobs searches for repository action jobs
func (*Client) ListRepoActionRuns ¶
func (c *Client) ListRepoActionRuns(owner, repo string, opt ListActionRunsOption) (*ListActionRunsResponse, *Response, error)
ListRepoActionRuns lists a repository's action runs
func (*Client) ListRepoActionSecret ¶
func (c *Client) ListRepoActionSecret(user, repo string, opt ListRepoActionSecretOption) ([]*Secret, *Response, error)
ListRepoActionSecret list a repository's secrets
func (*Client) ListRepoActionTasks ¶
func (c *Client) ListRepoActionTasks(owner, repo string, opt ListActionTasksOption) (*ListActionTasksResponse, *Response, error)
ListRepoActionTasks lists a repository's action tasks
func (*Client) ListRepoActionVariables ¶
func (c *Client) ListRepoActionVariables(owner, repo string, opt ListOptions) ([]*ActionVariable, *Response, error)
ListRepoActionVariables lists a repository's action variables
func (*Client) ListRepoActivityFeeds ¶
func (c *Client) ListRepoActivityFeeds(owner, repo string, opt ListRepoActivityFeedsOptions) ([]*Activity, *Response, error)
ListRepoActivityFeeds lists a repository's activity feeds
func (*Client) ListRepoBranches ¶
func (c *Client) ListRepoBranches(user, repo string, opt ListRepoBranchesOptions) ([]*Branch, *Response, error)
ListRepoBranches list all the branches of one repository
func (*Client) ListRepoCommits ¶
func (c *Client) ListRepoCommits(user, repo string, opt ListCommitOptions) ([]*Commit, *Response, error)
ListRepoCommits return list of commits from a repo
func (*Client) ListRepoFlags ¶
ListRepoFlags lists the flags of a repository
func (*Client) ListRepoGitHooks ¶
func (c *Client) ListRepoGitHooks(user, repo string, opt ListRepoGitHooksOptions) ([]*GitHook, *Response, error)
ListRepoGitHooks list all the Git hooks of one repository
func (*Client) ListRepoHooks ¶
ListRepoHooks list all the hooks of one repository
func (*Client) ListRepoIssueComments ¶
func (c *Client) ListRepoIssueComments(owner, repo string, opt ListRepoIssueCommentOptions) ([]*Comment, *Response, error)
ListRepoIssueComments list comments for a given repo.
func (*Client) ListRepoIssues ¶
func (c *Client) ListRepoIssues(owner, repo string, opt ListIssueOption) ([]*Issue, *Response, error)
ListRepoIssues returns all issues for a given repository
func (*Client) ListRepoLabels ¶
func (c *Client) ListRepoLabels(owner, repo string, opt ListLabelsOptions) ([]*Label, *Response, error)
ListRepoLabels list labels of one repository
func (*Client) ListRepoMilestones ¶
func (c *Client) ListRepoMilestones(owner, repo string, opt ListMilestoneOption) ([]*Milestone, *Response, error)
ListRepoMilestones list all the milestones of one repository
func (*Client) ListRepoNotifications ¶
func (c *Client) ListRepoNotifications(owner, repo string, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
ListRepoNotifications list users's notification threads on a specific repo
func (*Client) ListRepoPullRequests ¶
func (c *Client) ListRepoPullRequests(owner, repo string, opt ListPullRequestsOptions) ([]*PullRequest, *Response, error)
ListRepoPullRequests list PRs of one repository
func (*Client) ListRepoStargazers ¶
func (c *Client) ListRepoStargazers(user, repo string, opt ListStargazersOptions) ([]*User, *Response, error)
ListRepoStargazers list a repository's stargazers
func (*Client) ListRepoSubscribers ¶
func (c *Client) ListRepoSubscribers(owner, repo string, opt ListRepoSubscribersOptions) ([]*User, *Response, error)
ListRepoSubscribers list a repo's subscribers (i.e. watchers)
func (*Client) ListRepoTags ¶
func (c *Client) ListRepoTags(user, repo string, opt ListRepoTagsOptions) ([]*Tag, *Response, error)
ListRepoTags list all the branches of one repository
func (*Client) ListRepoTopics ¶
func (c *Client) ListRepoTopics(user, repo string, opt ListRepoTopicsOptions) ([]string, *Response, error)
ListRepoTopics list all repository's topics
func (*Client) ListRepoTrackedTimes ¶
func (c *Client) ListRepoTrackedTimes(owner, repo string, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
ListRepoTrackedTimes list tracked times of a repository
func (*Client) ListStatuses ¶
func (c *Client) ListStatuses(owner, repo, ref string, opt ListStatusesOption) ([]*Status, *Response, error)
ListStatuses returns all statuses for a given Commit by ref
func (*Client) ListTagProtections ¶
func (c *Client) ListTagProtections(owner, repo string, opt ListTagProtectionsOptions) ([]*TagProtection, *Response, error)
ListTagProtections list tag protections for a repo
func (*Client) ListTeamActivityFeeds ¶
func (c *Client) ListTeamActivityFeeds(ctx context.Context, id int64, opt ListActivityFeedsOptions) ([]*Activity, Response, error)
ListTeamActivityFeeds lists a team's activity feeds
func (*Client) ListTeamMembers ¶
ListTeamMembers lists all members of a team
func (*Client) ListTeamRepositories ¶
func (c *Client) ListTeamRepositories(id int64, opt ListTeamRepositoriesOptions) ([]*Repository, *Response, error)
ListTeamRepositories lists all repositories of a team
func (*Client) ListUserActionJobs ¶
func (c *Client) ListUserActionJobs(opt ListActionJobsOption) ([]*ActionRunJob, *Response, error)
ListUserActionJobs searches for user action jobs
func (*Client) ListUserActionVariables ¶
func (c *Client) ListUserActionVariables(opt ListOptions) ([]*ActionVariable, *Response, error)
ListUserActionVariables lists action variables for the authenticated user
func (*Client) ListUserActivityFeeds ¶
func (c *Client) ListUserActivityFeeds(username string, opt ListActivityFeedsOptions) ([]*Activity, *Response, error)
ListUserActivityFeeds lists a user's activity feeds.
func (*Client) ListUserOrgs ¶
func (c *Client) ListUserOrgs(user string, opt ListOrgsOptions) ([]*Organization, *Response, error)
ListUserOrgs list all of some user's organizations
func (*Client) ListUserRepos ¶
func (c *Client) ListUserRepos(user string, opt ListReposOptions) ([]*Repository, *Response, error)
ListUserRepos list all repositories of one user by user's name
func (*Client) ListWikiPageRevisions ¶
func (c *Client) ListWikiPageRevisions(owner, repo, pageName string, opt ListWikiPageRevisionsOptions) (*WikiCommitList, *Response, error)
ListWikiPageRevisions gets the revisions of a wiki page. pageName may be empty for the "Home" page
func (*Client) ListWikiPages ¶
func (c *Client) ListWikiPages(owner, repo string, opt ListWikiPagesOptions) ([]*WikiPageMetaData, *Response, error)
ListWikiPages gets all wiki pages of a repository
func (*Client) MergePullRequest ¶
func (c *Client) MergePullRequest(owner, repo string, index int64, opt MergePullRequestOption) (bool, *Response, error)
MergePullRequest merge a PR to repository by PR id
func (*Client) MigrateRepo ¶
func (c *Client) MigrateRepo(opt MigrateRepoOption) (*Repository, *Response, error)
MigrateRepo migrates a repository from other Git hosting sources for the authenticated user.
To migrate a repository for a organization, the authenticated user must be a owner of the specified organization.
func (*Client) MirrorSync ¶
MirrorSync adds a mirrored repository to the mirror sync queue.
func (*Client) MoveIssuePin ¶
MoveIssuePin moves the pinned issue to the given position among the repository's pinned issues
func (*Client) NewPinAllowed ¶
func (c *Client) NewPinAllowed(owner, repo string) (*NewIssuePinsAllowed, *Response, error)
NewPinAllowed returns whether new issue and pull request pins are allowed for a repository
func (*Client) OrgBlockUser ¶
OrgBlockUser blocks a user from the organization
func (*Client) OrgUnblockUser ¶
OrgUnblockUser unblocks a user from the organization
func (*Client) PostIssueCommentReaction ¶
func (c *Client) PostIssueCommentReaction(owner, repo string, commentID int64, reaction string) (*Reaction, *Response, error)
PostIssueCommentReaction add a reaction to a comment of an issue
func (*Client) PostIssueReaction ¶
func (c *Client) PostIssueReaction(owner, repo string, index int64, reaction string) (*Reaction, *Response, error)
PostIssueReaction add a reaction to an issue
func (*Client) PushMirrorSync ¶
PushMirrorSync adds all push mirrors of a repository to the sync queue
func (*Client) PushMirrors ¶
func (c *Client) PushMirrors(user, repo string, opt CreatePushMirrorOption) (*PushMirrorResponse, *Response, error)
PushMirrors add a push mirror to the repository
func (*Client) ReadNotification ¶
func (c *Client) ReadNotification(id int64, status ...NotifyStatus) (*NotificationThread, *Response, error)
ReadNotification mark notification thread as read by ID It optionally takes a second argument if status has to be set other than 'read' The relevant notification will be returned as the first parameter when the Forgejo server is 1.16.0 or higher.
func (*Client) ReadNotifications ¶
func (c *Client) ReadNotifications(opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
ReadNotifications mark notification threads as read The relevant notifications will only be returned as the first parameter when the Forgejo server is 1.16.0 or higher.
func (*Client) ReadRepoNotifications ¶
func (c *Client) ReadRepoNotifications(owner, repo string, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
ReadRepoNotifications mark notification threads as read on a specific repo The relevant notifications will only be returned as the first parameter when the Forgejo server is 1.16.0 or higher.
func (*Client) RegisterOrgRunner ¶
func (c *Client) RegisterOrgRunner(org string, opt RegisterRunnerOption) (*RegisterRunnerResponse, *Response, error)
RegisterOrgRunner registers a new organization-level runner and returns its registration token
func (*Client) RegisterUserRunner ¶
func (c *Client) RegisterUserRunner(opt RegisterRunnerOption) (*RegisterRunnerResponse, *Response, error)
RegisterUserRunner registers a new user-level Actions runner and returns the token needed to configure the runner daemon.
func (*Client) RejectRepoTransfer ¶
func (c *Client) RejectRepoTransfer(owner, reponame string) (*Repository, *Response, error)
RejectRepoTransfer rejects a repo transfer.
func (*Client) RemoveIssueBlocking ¶
func (c *Client) RemoveIssueBlocking(owner, repo string, index int64, meta IssueMeta) (*Issue, *Response, error)
RemoveIssueBlocking unblocks the issue given in meta from the issue given in index
func (*Client) RemoveIssueDependency ¶
func (c *Client) RemoveIssueDependency(owner, repo string, index int64, meta IssueMeta) (*Issue, *Response, error)
RemoveIssueDependency removes the issue given in meta as a dependency of the issue given in index
func (*Client) RemoveNote ¶
RemoveNote removes a note corresponding to a single commit from a repository
func (*Client) RemoveRepoTeam ¶
RemoveRepoTeam delete a team from a repository
func (*Client) RemoveTeamMember ¶
RemoveTeamMember removes a member from a team
func (*Client) RemoveTeamRepository ¶
RemoveTeamRepository removes a repository from a team
func (*Client) RenameOrg ¶
func (c *Client) RenameOrg(orgname string, opt RenameOrgOption) (*Response, error)
RenameOrg renames an organization
func (*Client) RenderMarkdown ¶
RenderMarkdown renders a markdown document as HTML.
func (*Client) RenderMarkdownRaw ¶
RenderMarkdownRaw renders a raw markdown document (plain text, not wrapped in a MarkdownOption) as HTML.
func (*Client) RenderMarkup ¶
RenderMarkup renders a markup document (markdown, or another markup language recognized from FilePath) as HTML.
func (*Client) ReplaceAllRepoFlags ¶
func (c *Client) ReplaceAllRepoFlags(owner, repo string, opt ReplaceFlagsOption) (*Response, error)
ReplaceAllRepoFlags replaces all the flags of a repository
func (*Client) ReplaceIssueLabels ¶
func (c *Client) ReplaceIssueLabels(owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)
ReplaceIssueLabels replace old labels of issue with new labels
func (*Client) ResetIssueTime ¶
ResetIssueTime reset tracked time of a single issue for a given repository
func (*Client) RunCronTasks ¶
RunCronTasks run a cron task
func (*Client) SearchOrgTeams ¶
SearchOrgTeams search for teams in a org.
func (*Client) SearchRepos ¶
func (c *Client) SearchRepos(opt SearchRepoOptions) ([]*Repository, *Response, error)
SearchRepos searches for repositories matching the given filters
func (*Client) SearchTopics ¶
func (c *Client) SearchTopics(opt SearchTopicsOptions) ([]*TopicResponse, *Response, error)
SearchTopics searches for topics by keyword
func (*Client) SearchUsers ¶
func (c *Client) SearchUsers(opt SearchUsersOption) ([]*User, *Response, error)
SearchUsers finds users by query
func (*Client) SendActivityPubActorInbox ¶
func (c *Client) SendActivityPubActorInbox(activity ActivityPubObject) (*Response, error)
SendActivityPubActorInbox delivers an Activity to the instance actor's inbox.
func (*Client) SendActivityPubPersonInbox ¶
func (c *Client) SendActivityPubPersonInbox(userID int64, activity ActivityPubObject) (*Response, error)
SendActivityPubPersonInbox delivers an Activity to a user's inbox.
func (*Client) SendActivityPubRepositoryInbox ¶
func (c *Client) SendActivityPubRepositoryInbox(repoID int64, activity ActivityPubObject) (*Response, error)
SendActivityPubRepositoryInbox delivers an Activity to a repository's inbox.
func (*Client) ServerVersion ¶
ServerVersion returns the version of the server
func (*Client) SetActivityPubSigner ¶
func (c *Client) SetActivityPubSigner(signer *ActivityPubSigner)
SetActivityPubSigner sets (or, with nil, clears) the signer used for the client's ActivityPub requests.
func (*Client) SetBasicAuth ¶
SetBasicAuth sets username and password
func (*Client) SetContext ¶
SetContext set default context witch is used for http requests
func (*Client) SetHTTPClient ¶
SetHTTPClient replaces default http.Client with user given one.
func (*Client) SetPublicOrgMembership ¶
SetPublicOrgMembership publicize/conceal a user's membership
func (*Client) SetRepoTopics ¶
SetRepoTopics replaces the list of repo's topics
func (*Client) SetUserAgent ¶
SetUserAgent sets the user-agent to send with every request.
func (*Client) SignRequest ¶
SignRequest signs a HTTP request
func (*Client) StartIssueStopWatch ¶
StartIssueStopWatch starts a stopwatch for an existing issue for a given repository
func (*Client) StopIssueStopWatch ¶
StopIssueStopWatch stops an existing stopwatch for an issue in a given repository
func (*Client) SubmitPullReview ¶
func (c *Client) SubmitPullReview(owner, repo string, index, id int64, opt SubmitPullReviewOptions) (*PullReview, *Response, error)
SubmitPullReview submit a pending review to an pull request
func (*Client) SyncForkBranch ¶
SyncForkBranch syncs a fork branch with its base branch
func (*Client) SyncForkDefault ¶
SyncForkDefault syncs a fork's default branch with its base branch
func (*Client) TestRepoHook ¶
TestRepoHook tests a push webhook of a repository. ref is optional and defaults to the repository's default branch.
func (*Client) TransferRepo ¶
func (c *Client) TransferRepo(owner, reponame string, opt TransferRepoOption) (*Repository, *Response, error)
TransferRepo transfers the ownership of a repository
func (*Client) UnDismissPullReview ¶
UnDismissPullReview cancel to dismiss a review for a pull request
func (*Client) UnStarRepo ¶
UnStarRepo remove star to specified repo as the authenticated user
func (*Client) UnWatchRepo ¶
UnWatchRepo stop to watch a repository
func (*Client) UnblockUser ¶
UnblockUser removes a block placed on the given user by the authenticated user.
func (*Client) UnlinkPackage ¶
UnlinkPackage unlinks a package from a repository
func (*Client) UnpinIssue ¶
UnpinIssue unpins an issue
func (*Client) UpdateFile ¶
func (c *Client) UpdateFile(owner, repo, filepath string, opt UpdateFileOptions) (*FileResponse, *Response, error)
UpdateFile update a file in a repository
func (*Client) UpdateOauth2 ¶
UpdateOauth2 a specific Oauth2 Application by ID and return a completed Oauth2 object.
func (*Client) UpdateOrgActionVariable ¶
func (c *Client) UpdateOrgActionVariable(org, variableName string, opt CreateVariableOption) (*Response, error)
UpdateOrgActionVariable updates an action variable for an organization
func (*Client) UpdateOrgAvatar ¶
func (c *Client) UpdateOrgAvatar(ctx context.Context, org string, opt UpdateOrgAvatarOption) (Response, error)
UpdateOrgAvatar updates an organization's avatar
func (*Client) UpdatePullRequest ¶
func (c *Client) UpdatePullRequest(owner, repo string, index int64, opt UpdatePullRequestOptions) (*Response, error)
UpdatePullRequest merges the pull request's baseBranch into its headBranch
func (*Client) UpdateRepoActionVariable ¶
func (c *Client) UpdateRepoActionVariable(owner, repo, variableName string, opt CreateVariableOption) (*Response, error)
UpdateRepoActionVariable updates an action variable for a repository
func (*Client) UpdateRepoAvatar ¶
func (c *Client) UpdateRepoAvatar(owner, repo string, opt UpdateRepoAvatarOption) (*Response, error)
UpdateRepoAvatar updates a repository's avatar
func (*Client) UpdateRepoBranch ¶
func (c *Client) UpdateRepoBranch(owner, repo, branch string, opt UpdateBranchRepoOption) (*Response, error)
UpdateRepoBranch renames a branch of a repository
func (*Client) UpdateUserActionVariable ¶
func (c *Client) UpdateUserActionVariable(variableName string, opt CreateVariableOption) (*Response, error)
UpdateUserActionVariable updates an action variable for the authenticated user
func (*Client) UpdateUserAvatar ¶
func (c *Client) UpdateUserAvatar(opt UpdateUserAvatarOption) (*Response, error)
UpdateUserAvatar updates the avatar of the currently authenticated user.
func (*Client) UpdateUserSettings ¶
func (c *Client) UpdateUserSettings(opt UserSettingsOptions) (*UserSettings, *Response, error)
UpdateUserSettings returns user settings
func (*Client) ValidateIssueConfig ¶
func (c *Client) ValidateIssueConfig(owner, repo string) (*IssueConfigValidation, *Response, error)
ValidateIssueConfig returns the validation information for a repository's issue config
func (*Client) VerifyGPGKey ¶
func (c *Client) VerifyGPGKey(opt VerifyGPGKeyOption) (*GPGKey, *Response, error)
VerifyGPGKey verifies and adds a GPG key to the current user's account, using the token from GetGPGKeyVerificationToken signed by that key.
type ClientOption ¶
ClientOption are functions used to init a new client
func SetBasicAuth ¶
func SetBasicAuth(username, password string) ClientOption
SetBasicAuth is an option for NewClient to set username and password
func SetContext ¶
func SetContext(ctx context.Context) ClientOption
SetContext is an option for NewClient to set the default context
func SetDebugMode ¶
func SetDebugMode() ClientOption
SetDebugMode is an option for NewClient to enable debug mode
func SetForgejoVersion ¶
func SetForgejoVersion(v string) ClientOption
SetForgejoVersion configures the Client to assume the given version of the Forgejo server, instead of querying the server for it when initializing. Use "" to skip all canonical ways in the SDK to check for versions
func SetHTTPClient ¶
func SetHTTPClient(httpClient *http.Client) ClientOption
SetHTTPClient is an option for NewClient to set custom http client
func SetOTP ¶
func SetOTP(otp string) ClientOption
SetOTP is an option for NewClient to set OTP for 2FA
func SetSudo ¶
func SetSudo(sudo string) ClientOption
SetSudo is an option for NewClient to set sudo header
func SetToken ¶
func SetToken(token string) ClientOption
SetToken is an option for NewClient to set token
func SetUserAgent ¶
func SetUserAgent(userAgent string) ClientOption
SetUserAgent is an option for NewClient to set user-agent header
func UseActivityPubSignature ¶
func UseActivityPubSignature(keyID string, privateKeyPEM []byte) ClientOption
UseActivityPubSignature is an option for NewClient to sign the client's ActivityPub requests as a federated actor. See ActivityPubSigner for what keyID has to point at.
func UseSSHCert ¶
func UseSSHCert(principal, sshKey, passphrase string) ClientOption
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. If you have an encrypted sshKey you'll need to also set the passphrase.
func UseSSHPubkey ¶
func UseSSHPubkey(fingerprint, sshKey, passphrase string) ClientOption
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. If you have an encrypted sshKey you'll need to also set the passphrase.
type CollaboratorPermissionResult ¶
type CollaboratorPermissionResult struct {
Permission AccessMode `json:"permission"`
Role string `json:"role_name"`
User *User `json:"user"`
}
CollaboratorPermissionResult result type for CollaboratorPermission
type CombinedStatus ¶
type CombinedStatus struct {
State StatusState `json:"state"`
SHA string `json:"sha"`
TotalCount int `json:"total_count"`
Statuses []*Status `json:"statuses"`
Repository *Repository `json:"repository"`
CommitURL string `json:"commit_url"`
URL string `json:"url"`
}
CombinedStatus holds the combined state of several statuses for a single commit
type Comment ¶
type Comment struct {
ID int64 `json:"id"`
HTMLURL string `json:"html_url"`
PRURL string `json:"pull_request_url"`
IssueURL string `json:"issue_url"`
Poster *User `json:"user"`
OriginalAuthor string `json:"original_author"`
OriginalAuthorID int64 `json:"original_author_id"`
Body string `json:"body"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
}
Comment represents a comment on a commit or issue
type Commit ¶
type Commit struct {
*CommitMeta
HTMLURL string `json:"html_url"`
RepoCommit *RepoCommit `json:"commit"`
Author *User `json:"author"`
Committer *User `json:"committer"`
Parents []*CommitMeta `json:"parents"`
Files []*CommitAffectedFiles `json:"files"`
Stats *CommitStats `json:"stats"`
}
Commit contains information generated from a Git commit.
type CommitAffectedFiles ¶
type CommitAffectedFiles struct {
Filename string `json:"filename"`
}
CommitAffectedFiles store information about files affected by the commit
type CommitDateOptions ¶
type CommitDateOptions struct {
Author time.Time `json:"author"`
Committer time.Time `json:"committer"`
}
CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
type CommitMeta ¶
type CommitMeta struct {
URL string `json:"url"`
SHA string `json:"sha"`
Created time.Time `json:"created"`
}
CommitMeta contains meta information of a commit in terms of API.
type CommitStats ¶
type CommitStats struct {
Total int `json:"total"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
}
CommitStats contains stats from a Git commit
type CommitUser ¶
CommitUser contains information of a user in the context of a commit.
type Compare ¶
type Compare struct {
TotalCommits int `json:"total_commits"` // Total number of commits in the comparison.
Commits []*Commit `json:"commits"` // List of commits in the comparison.
}
Compare represents a comparison between two commits.
type ContentsResponse ¶
type ContentsResponse struct {
Name string `json:"name"`
Path string `json:"path"`
SHA string `json:"sha"`
// `type` will be `file`, `dir`, `symlink`, or `submodule`
Type string `json:"type"`
Size int64 `json:"size"`
// `encoding` is populated when `type` is `file`, otherwise null
Encoding *string `json:"encoding"`
// `content` is populated when `type` is `file`, otherwise null
Content *string `json:"content"`
// `target` is populated when `type` is `symlink`, otherwise null
Target *string `json:"target"`
URL *string `json:"url"`
HTMLURL *string `json:"html_url"`
GitURL *string `json:"git_url"`
DownloadURL *string `json:"download_url"`
// `submodule_git_url` is populated when `type` is `submodule`, otherwise null
SubmoduleGitURL *string `json:"submodule_git_url"`
Links *FileLinksResponse `json:"_links"`
}
ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
type CreateAccessTokenOption ¶
type CreateAccessTokenOption struct {
Name string `json:"name"`
Scopes []AccessTokenScope `json:"scopes"`
}
CreateAccessTokenOption options when create access token
type CreateBranchOption ¶
type CreateBranchOption struct {
// Name of the branch to create
BranchName string `json:"new_branch_name"`
// Name of the old branch to create from (optional)
OldBranchName string `json:"old_branch_name"`
}
CreateBranchOption options when creating a branch in a repository
func (CreateBranchOption) Validate ¶
func (opt CreateBranchOption) Validate() error
Validate the CreateBranchOption struct
type CreateBranchProtectionOption ¶
type CreateBranchProtectionOption struct {
BranchName string `json:"branch_name"`
RuleName string `json:"rule_name"`
EnablePush bool `json:"enable_push"`
EnablePushWhitelist bool `json:"enable_push_whitelist"`
PushWhitelistUsernames []string `json:"push_whitelist_usernames"`
PushWhitelistTeams []string `json:"push_whitelist_teams"`
PushWhitelistDeployKeys bool `json:"push_whitelist_deploy_keys"`
EnableMergeWhitelist bool `json:"enable_merge_whitelist"`
MergeWhitelistUsernames []string `json:"merge_whitelist_usernames"`
MergeWhitelistTeams []string `json:"merge_whitelist_teams"`
EnableStatusCheck bool `json:"enable_status_check"`
StatusCheckContexts []string `json:"status_check_contexts"`
RequiredApprovals int64 `json:"required_approvals"`
EnableApprovalsWhitelist bool `json:"enable_approvals_whitelist"`
ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"`
ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"`
BlockOnRejectedReviews bool `json:"block_on_rejected_reviews"`
BlockOnOfficialReviewRequests bool `json:"block_on_official_review_requests"`
BlockOnOutdatedBranch bool `json:"block_on_outdated_branch"`
DismissStaleApprovals bool `json:"dismiss_stale_approvals"`
RequireSignedCommits bool `json:"require_signed_commits"`
ProtectedFilePatterns string `json:"protected_file_patterns"`
UnprotectedFilePatterns string `json:"unprotected_file_patterns"`
ApplyToAdmins bool `json:"apply_to_admins"`
}
CreateBranchProtectionOption options for creating a branch protection
type CreateEmailOption ¶
type CreateEmailOption struct {
// email addresses to add
Emails []string `json:"emails"`
}
CreateEmailOption options when creating email addresses
type CreateFileOptions ¶
type CreateFileOptions struct {
FileOptions
// content must be base64 encoded
// required: true
Content string `json:"content"`
}
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)
type CreateForkOption ¶
type CreateForkOption struct {
// organization name, if forking into an organization
Organization *string `json:"organization"`
// name of the forked repository
Name *string `json:"name"`
}
CreateForkOption options for creating a fork
type CreateGPGKeyOption ¶
type CreateGPGKeyOption struct {
// An armored GPG key to add
//
ArmoredKey string `json:"armored_public_key"`
}
CreateGPGKeyOption options create user GPG key
type CreateHookOption ¶
type CreateHookOption struct {
Type HookType `json:"type"`
Config map[string]string `json:"config"`
Events []string `json:"events"`
BranchFilter string `json:"branch_filter"`
Active bool `json:"active"`
AuthorizationHeader string `json:"authorization_header"`
}
CreateHookOption options when create a hook
func (CreateHookOption) Validate ¶
func (opt CreateHookOption) Validate() error
Validate the CreateHookOption struct
type CreateIssueCommentOption ¶
type CreateIssueCommentOption struct {
Body string `json:"body"`
}
CreateIssueCommentOption options for creating a comment on an issue
func (CreateIssueCommentOption) Validate ¶
func (opt CreateIssueCommentOption) Validate() error
Validate the CreateIssueCommentOption struct
type CreateIssueOption ¶
type CreateIssueOption struct {
Title string `json:"title"`
Body string `json:"body"`
Ref string `json:"ref"`
Assignees []string `json:"assignees"`
Deadline *time.Time `json:"due_date"`
// milestone id
Milestone int64 `json:"milestone"`
// list of label ids
Labels []int64 `json:"labels"`
Closed bool `json:"closed"`
}
CreateIssueOption options to create one issue
func (CreateIssueOption) Validate ¶
func (opt CreateIssueOption) Validate() error
Validate the CreateIssueOption struct
type CreateKeyOption ¶
type CreateKeyOption struct {
// Title of the key to add
Title string `json:"title"`
// An armored SSH key to add
Key string `json:"key"`
// Describe if the key has only read access or read/write
ReadOnly bool `json:"read_only"`
}
CreateKeyOption options when creating a key
type CreateLabelOption ¶
type CreateLabelOption struct {
Name string `json:"name"`
Exclusive bool `json:"exclusive"`
// example: #00aabb
Color string `json:"color"`
Description string `json:"description"`
IsArchived bool `json:"is_archived"`
}
CreateLabelOption options for creating a label
func (CreateLabelOption) Validate ¶
func (opt CreateLabelOption) Validate() error
Validate the CreateLabelOption struct
type CreateMilestoneOption ¶
type CreateMilestoneOption struct {
Title string `json:"title"`
Description string `json:"description"`
State StateType `json:"state"`
Deadline *time.Time `json:"due_on"`
}
CreateMilestoneOption options for creating a milestone
func (CreateMilestoneOption) Validate ¶
func (opt CreateMilestoneOption) Validate() error
Validate the CreateMilestoneOption struct
type CreateOauth2Option ¶
type CreateOauth2Option struct {
Name string `json:"name"`
ConfidentialClient bool `json:"confidential_client"`
RedirectURIs []string `json:"redirect_uris"`
}
CreateOauth2Option required options for creating an Application
type CreateOrgOption ¶
type CreateOrgOption struct {
Name string `json:"username"`
FullName string `json:"full_name"`
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
Visibility VisibleType `json:"visibility"`
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
}
CreateOrgOption options for creating an organization
func (CreateOrgOption) Validate ¶
func (opt CreateOrgOption) Validate() error
Validate the CreateOrgOption struct
type CreatePullRequestOption ¶
type CreatePullRequestOption struct {
Head string `json:"head"`
Base string `json:"base"`
Title string `json:"title"`
Body string `json:"body"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
Deadline *time.Time `json:"due_date"`
}
CreatePullRequestOption options when creating a pull request
type CreatePullReviewComment ¶
type CreatePullReviewComment struct {
// the tree path
Path string `json:"path"`
Body string `json:"body"`
// if comment to old file line or 0
OldLineNum int64 `json:"old_position"`
// if comment to new file line or 0
NewLineNum int64 `json:"new_position"`
}
CreatePullReviewComment represent a review comment for creation api
func (CreatePullReviewComment) Validate ¶
func (opt CreatePullReviewComment) Validate() error
Validate the CreatePullReviewComment struct
type CreatePullReviewCommentOptions ¶
type CreatePullReviewCommentOptions struct {
// the tree path
Path string `json:"path"`
Body string `json:"body"`
// if comment to old file line or 0
OldLineNum int64 `json:"old_position"`
// if comment to new file line or 0
NewLineNum int64 `json:"new_position"`
}
CreatePullReviewCommentOptions are options to add a comment to an existing pull review
type CreatePullReviewOptions ¶
type CreatePullReviewOptions struct {
State ReviewStateType `json:"event"`
Body string `json:"body"`
CommitID string `json:"commit_id"`
Comments []CreatePullReviewComment `json:"comments"`
}
CreatePullReviewOptions are options to create a pull review
func (CreatePullReviewOptions) Validate ¶
func (opt CreatePullReviewOptions) Validate() error
Validate the CreatePullReviewOptions struct
type CreatePushMirrorOption ¶
type CreateQuotaGroupOption ¶
type CreateQuotaGroupOption struct {
Name string `json:"name"`
// Rules to add to the newly created group. If a rule with a given name
// does not exist yet, it will be created. See CreateQuotaRuleOption.
Rules []CreateQuotaRuleOption `json:"rules,omitempty"`
}
CreateQuotaGroupOption options for creating a quota group
type CreateQuotaRuleOption ¶
type CreateQuotaRuleOption struct {
Name string `json:"name"`
Limit int64 `json:"limit"`
Subjects []string `json:"subjects,omitempty"`
}
CreateQuotaRuleOption options for creating a quota rule
type CreateReleaseOption ¶
type CreateReleaseOption struct {
TagName string `json:"tag_name"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
IsDraft bool `json:"draft"`
IsPrerelease bool `json:"prerelease"`
}
CreateReleaseOption options when creating a release
func (CreateReleaseOption) Validate ¶
func (opt CreateReleaseOption) Validate() error
Validate the CreateReleaseOption struct
type CreateRepoFromTemplateOption ¶
type CreateRepoFromTemplateOption struct {
// Owner is the organization or person who will own the new repository
Owner string `json:"owner"`
// Name of the repository to create
Name string `json:"name"`
// Description of the repository to create
Description string `json:"description"`
// Private is whether the repository is private
Private bool `json:"private"`
// GitContent include git content of default branch in template repo
GitContent bool `json:"git_content"`
// Topics include topics of template repo
Topics bool `json:"topics"`
// GitHooks include git hooks of template repo
GitHooks bool `json:"git_hooks"`
// Webhooks include webhooks of template repo
Webhooks bool `json:"webhooks"`
// Avatar include avatar of the template repo
Avatar bool `json:"avatar"`
// Labels include labels of template repo
Labels bool `json:"labels"`
}
CreateRepoFromTemplateOption options when creating repository using a template
func (CreateRepoFromTemplateOption) Validate ¶
func (opt CreateRepoFromTemplateOption) Validate() error
Validate validates CreateRepoFromTemplateOption
type CreateRepoOption ¶
type CreateRepoOption struct {
// Name of the repository to create
Name string `json:"name"`
// Description of the repository to create
Description string `json:"description"`
// Whether the repository is private
Private bool `json:"private"`
// Issue Label set to use
IssueLabels string `json:"issue_labels"`
// Whether the repository should be auto-intialized?
AutoInit bool `json:"auto_init"`
// Whether the repository is template
Template bool `json:"template"`
// Gitignores to use
Gitignores string `json:"gitignores"`
// License to use
License string `json:"license"`
// Readme of the repository to create
Readme string `json:"readme"`
// DefaultBranch of the repository (used when initializes and in template)
DefaultBranch string `json:"default_branch"`
// TrustModel of the repository
TrustModel TrustModel `json:"trust_model"`
}
CreateRepoOption options when creating repository
func (CreateRepoOption) Validate ¶
func (opt CreateRepoOption) Validate(c *Client) error
Validate the CreateRepoOption struct
type CreateSecretOption ¶
type CreateSecretOption struct {
Name string `json:"name"` // Name is the name of the secret.
Data string `json:"data"` // Data is the data of the secret.
}
CreateSecretOption represents the options for creating a secret.
func (*CreateSecretOption) Validate ¶
func (opt *CreateSecretOption) Validate() error
Validate checks if the CreateSecretOption is valid. It returns an error if any of the validation checks fail. Validation rules: - Name is required and must not exceed 255 characters - Name must contain only alphanumeric characters and underscores (case-insensitive) - Name must not start with GITEA_ or GITHUB_ (reserved prefixes) - Data is required
type CreateStatusOption ¶
type CreateStatusOption struct {
State StatusState `json:"state"`
TargetURL string `json:"target_url"`
Description string `json:"description"`
Context string `json:"context"`
}
CreateStatusOption holds the information needed to create a new Status for a Commit
type CreateTagOption ¶
type CreateTagOption struct {
TagName string `json:"tag_name"`
Message string `json:"message"`
Target string `json:"target"`
}
CreateTagOption options when creating a tag
func (CreateTagOption) Validate ¶
func (opt CreateTagOption) Validate() error
Validate validates CreateTagOption
type CreateTagProtectionOption ¶
type CreateTagProtectionOption struct {
NamePattern string `json:"name_pattern"`
WhitelistUsernames []string `json:"whitelist_usernames"`
WhitelistTeams []string `json:"whitelist_teams"`
}
CreateTagProtectionOption options for creating a tag protection
type CreateTeamOption ¶
type CreateTeamOption struct {
Name string `json:"name"`
Description string `json:"description"`
Permission AccessMode `json:"permission"`
CanCreateOrgRepo bool `json:"can_create_org_repo"`
IncludesAllRepositories bool `json:"includes_all_repositories"`
// example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.pulls":"owner","repo.releases":"none","repo.wiki":"admin","repo.ext_wiki":"none","repo.projects":"none","repo.packages":"none","repo.actions":"none"}
UnitsMap map[string]string `json:"units_map"`
// Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
Units []RepoUnitType `json:"units"`
}
CreateTeamOption options for creating a team
func (*CreateTeamOption) Validate ¶
func (opt *CreateTeamOption) Validate() error
Validate the CreateTeamOption struct
type CreateUserOption ¶
type CreateUserOption struct {
SourceID int64 `json:"source_id"`
LoginName string `json:"login_name"`
Username string `json:"username"`
FullName string `json:"full_name"`
Email string `json:"email"`
Password string `json:"password"`
MustChangePassword *bool `json:"must_change_password"`
SendNotify bool `json:"send_notify"`
Visibility *VisibleType `json:"visibility"`
}
CreateUserOption create user options
func (CreateUserOption) Validate ¶
func (opt CreateUserOption) Validate() error
Validate the CreateUserOption struct
type CreateVariableOption ¶
CreateVariableOption options for creating/updating a variable
func (*CreateVariableOption) Validate ¶
func (opt *CreateVariableOption) Validate() error
Validate checks if the CreateVariableOption is valid.
type CreateWikiPageOptions ¶
type CreateWikiPageOptions struct {
// page title. leave empty to keep unchanged
Title string `json:"title"`
// content must be base64 encoded
ContentBase64 string `json:"content_base64"`
// optional commit message summarizing the change
Message string `json:"message"`
}
CreateWikiPageOptions form for creating a wiki page
type CronTask ¶
type CronTask struct {
Name string `json:"name"`
Schedule string `json:"schedule"`
Next time.Time `json:"next"`
Prev time.Time `json:"prev"`
ExecTimes int64 `json:"exec_times"`
}
CronTask represents a Cron task
type DeleteEmailOption ¶
type DeleteEmailOption struct {
// email addresses to delete
Emails []string `json:"emails"`
}
DeleteEmailOption options when deleting email addresses
type DeleteFileOptions ¶
type DeleteFileOptions struct {
FileOptions
// sha is the SHA for the file that already exists
// required: true
SHA string `json:"sha"`
}
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)
type DeployKey ¶
type DeployKey struct {
ID int64 `json:"id"`
KeyID int64 `json:"key_id"`
Key string `json:"key"`
URL string `json:"url"`
Title string `json:"title"`
Fingerprint string `json:"fingerprint"`
Created time.Time `json:"created_at"`
ReadOnly bool `json:"read_only"`
Repository *Repository `json:"repository,omitempty"`
}
DeployKey a deploy key
type DiffPatchFileOptions ¶
type DiffPatchFileOptions struct {
FileOptions
// sha is the SHA for the file that already exists
// required: true
SHA string `json:"sha"`
// content is plaintext
// required: true
Content string `json:"content"`
}
DiffPatchFileOptions options for applying diff patches to 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)
type DismissPullReviewOptions ¶
type DismissPullReviewOptions struct {
Message string `json:"message"`
}
DismissPullReviewOptions are options to dismiss a pull review
type DispatchWorkflowOption ¶
type DispatchWorkflowOption struct {
Ref string `json:"ref"`
Inputs map[string]string `json:"inputs,omitempty"`
ReturnRunInfo bool `json:"return_run_info,omitempty"`
}
DispatchWorkflowOption options for triggering a workflow
type DispatchWorkflowResponse ¶
type DispatchWorkflowResponse struct {
ID int64 `json:"id"`
RunNumber int64 `json:"run_number"`
Jobs []string `json:"jobs"` // job names, not full ActionRunJob records
}
DispatchWorkflowResponse response from dispatching a workflow
type EditAttachmentOptions ¶
type EditAttachmentOptions struct {
Name string `json:"name"`
}
EditAttachmentOptions options for editing attachments
type EditBranchProtectionOption ¶
type EditBranchProtectionOption struct {
EnablePush *bool `json:"enable_push"`
EnablePushWhitelist *bool `json:"enable_push_whitelist"`
PushWhitelistUsernames []string `json:"push_whitelist_usernames"`
PushWhitelistTeams []string `json:"push_whitelist_teams"`
PushWhitelistDeployKeys *bool `json:"push_whitelist_deploy_keys"`
EnableMergeWhitelist *bool `json:"enable_merge_whitelist"`
MergeWhitelistUsernames []string `json:"merge_whitelist_usernames"`
MergeWhitelistTeams []string `json:"merge_whitelist_teams"`
EnableStatusCheck *bool `json:"enable_status_check"`
StatusCheckContexts []string `json:"status_check_contexts"`
RequiredApprovals *int64 `json:"required_approvals"`
EnableApprovalsWhitelist *bool `json:"enable_approvals_whitelist"`
ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"`
ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"`
BlockOnRejectedReviews *bool `json:"block_on_rejected_reviews"`
BlockOnOfficialReviewRequests *bool `json:"block_on_official_review_requests"`
BlockOnOutdatedBranch *bool `json:"block_on_outdated_branch"`
DismissStaleApprovals *bool `json:"dismiss_stale_approvals"`
RequireSignedCommits *bool `json:"require_signed_commits"`
ProtectedFilePatterns *string `json:"protected_file_patterns"`
UnprotectedFilePatterns *string `json:"unprotected_file_patterns"`
ApplyToAdmins *bool `json:"apply_to_admins"`
}
EditBranchProtectionOption options for editing a branch protection
type EditDeadlineOption ¶
type EditDeadlineOption struct {
// Deadline is the new due date. Passing nil unsets the deadline.
Deadline *time.Time `json:"due_date"`
}
EditDeadlineOption options for creating or updating an issue deadline
type EditGitHookOption ¶
type EditGitHookOption struct {
Content string `json:"content"`
}
EditGitHookOption options when modifying one Git hook
type EditHookOption ¶
type EditHookOption struct {
Config map[string]string `json:"config"`
Events []string `json:"events"`
BranchFilter string `json:"branch_filter"`
Active *bool `json:"active"`
AuthorizationHeader string `json:"authorization_header"`
}
EditHookOption options when modify one hook
type EditIssueCommentOption ¶
type EditIssueCommentOption struct {
Body string `json:"body"`
}
EditIssueCommentOption options for editing a comment
func (EditIssueCommentOption) Validate ¶
func (opt EditIssueCommentOption) Validate() error
Validate the EditIssueCommentOption struct
type EditIssueOption ¶
type EditIssueOption struct {
Title string `json:"title"`
Body *string `json:"body"`
Ref *string `json:"ref"`
Assignees []string `json:"assignees"`
Milestone *int64 `json:"milestone"`
State *StateType `json:"state"`
Deadline *time.Time `json:"due_date"`
RemoveDeadline *bool `json:"unset_due_date"`
}
EditIssueOption options for editing an issue
func (EditIssueOption) Validate ¶
func (opt EditIssueOption) Validate() error
Validate the EditIssueOption struct
type EditLabelOption ¶
type EditLabelOption struct {
Name *string `json:"name"`
Exclusive *bool `json:"exclusive"`
Color *string `json:"color"`
Description *string `json:"description"`
IsArchived *bool `json:"is_archived"`
}
EditLabelOption options for editing a label
func (EditLabelOption) Validate ¶
func (opt EditLabelOption) Validate() error
Validate the EditLabelOption struct
type EditMilestoneOption ¶
type EditMilestoneOption struct {
Title string `json:"title"`
Description *string `json:"description"`
State *StateType `json:"state"`
Deadline *time.Time `json:"due_on"`
}
EditMilestoneOption options for editing a milestone
func (EditMilestoneOption) Validate ¶
func (opt EditMilestoneOption) Validate() error
Validate the EditMilestoneOption struct
type EditOrgOption ¶
type EditOrgOption struct {
FullName string `json:"full_name"`
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
Visibility VisibleType `json:"visibility"`
}
EditOrgOption options for editing an organization
func (EditOrgOption) Validate ¶
func (opt EditOrgOption) Validate() error
Validate the EditOrgOption struct
type EditPullRequestOption ¶
type EditPullRequestOption struct {
Title string `json:"title"`
Body *string `json:"body"`
Base string `json:"base"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
State *StateType `json:"state"`
Deadline *time.Time `json:"due_date"`
RemoveDeadline *bool `json:"unset_due_date"`
AllowMaintainerEdit *bool `json:"allow_maintainer_edit"`
}
EditPullRequestOption options when modify pull request
func (EditPullRequestOption) Validate ¶
func (opt EditPullRequestOption) Validate(c *Client) error
Validate the EditPullRequestOption struct
type EditQuotaRuleOption ¶
type EditQuotaRuleOption struct {
Limit *int64 `json:"limit,omitempty"`
Subjects []string `json:"subjects,omitempty"`
}
EditQuotaRuleOption options for editing an existing quota rule
type EditReleaseOption ¶
type EditReleaseOption struct {
TagName string `json:"tag_name"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
IsDraft *bool `json:"draft"`
IsPrerelease *bool `json:"prerelease"`
}
EditReleaseOption options when editing a release
type EditRepoOption ¶
type EditRepoOption struct {
// name of the repository
Name *string `json:"name,omitempty"`
// a short description of the repository.
Description *string `json:"description,omitempty"`
// a URL with more information about the repository.
Website *string `json:"website,omitempty"`
// either `true` to make the repository private or `false` to make it public.
// Note: you will get a 422 error if the organization restricts changing repository visibility to organization
// owners and a non-owner tries to change the value of private.
Private *bool `json:"private,omitempty"`
// either `true` to make this repository a template or `false` to make it a normal repository
Template *bool `json:"template,omitempty"`
// either `true` to enable issues for this repository or `false` to disable them.
HasIssues *bool `json:"has_issues,omitempty"`
// set this structure to configure internal issue tracker (requires has_issues)
InternalTracker *InternalTracker `json:"internal_tracker,omitempty"`
// set this structure to use external issue tracker (requires has_issues)
ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"`
// either `true` to enable the wiki for this repository or `false` to disable it.
HasWiki *bool `json:"has_wiki,omitempty"`
// set this structure to use external wiki instead of internal (requires has_wiki)
ExternalWiki *ExternalWiki `json:"external_wiki,omitempty"`
// set the globally editable state of the wiki
GloballyEditableWiki *bool `json:"globally_editable_wiki,omitempty"`
// sets the default branch for this repository.
DefaultBranch *string `json:"default_branch,omitempty"`
// sets the branch used for this repository's wiki.
WikiBranch *string `json:"wiki_branch,omitempty"`
// either `true` to allow pull requests, or `false` to prevent pull request.
HasPullRequests *bool `json:"has_pull_requests,omitempty"`
// either `true` to enable project unit, or `false` to disable them.
HasProjects *bool `json:"has_projects,omitempty"`
// either `true` to enable release, or `false` to disable them.
HasReleases *bool `json:"has_releases,omitempty"`
// either `true` to enable packages, or `false` to disable them.
HasPackages *bool `json:"has_packages,omitempty"`
// either `true` to enable actions, or `false` to disable them.
HasActions *bool `json:"has_actions,omitempty"`
// either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.
IgnoreWhitespaceConflicts *bool `json:"ignore_whitespace_conflicts,omitempty"`
// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.
AllowMerge *bool `json:"allow_merge_commits,omitempty"`
// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.
AllowRebase *bool `json:"allow_rebase,omitempty"`
// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.
AllowRebaseMerge *bool `json:"allow_rebase_explicit,omitempty"`
// either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.
AllowSquash *bool `json:"allow_squash_merge,omitempty"`
// either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.
AllowFastForwardOnly *bool `json:"allow_fast_forward_only_merge,omitempty"`
// set to `true` to archive this repository.
Archived *bool `json:"archived,omitempty"`
// set to a string like `8h30m0s` to set the mirror interval time
MirrorInterval *string `json:"mirror_interval,omitempty"`
// either `true` to allow mark pr as merged manually, or `false` to prevent it. `has_pull_requests` must be `true`.
AllowManualMerge *bool `json:"allow_manual_merge,omitempty"`
// either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur.
AutodetectManualMerge *bool `json:"autodetect_manual_merge,omitempty"`
// either `true` to allow updating pull request branch by rebase, or `false` to prevent it.
AllowRebaseUpdate *bool `json:"allow_rebase_update,omitempty"`
// set to `true` to delete pr branch after merge by default
DefaultDeleteBranchAfterMerge *bool `json:"default_delete_branch_after_merge,omitempty"`
// set to a merge style to be used by this repository: "merge", "rebase", "rebase-merge", or "squash". `has_pull_requests` must be `true`.
DefaultMergeStyle *MergeStyle `json:"default_merge_style,omitempty"`
// set to a update style to be used by this repository: "rebase" or "merge"
DefaultUpdateStyle *string `json:"default_update_style,omitempty" binding:"In(merge,rebase)"`
// set to `true` to allow edits from maintainers by default
DefaultAllowMaintainerEdit *bool `json:"default_allow_maintainer_edit,omitempty"`
// enable prune - remove obsolete remote-tracking references when mirroring
EnablePrune *bool `json:"enable_prune,omitempty"`
}
EditRepoOption options when editing a repository's properties
type EditTagProtectionOption ¶
type EditTagProtectionOption struct {
NamePattern *string `json:"name_pattern"`
WhitelistUsernames []string `json:"whitelist_usernames"`
WhitelistTeams []string `json:"whitelist_teams"`
}
EditTagProtectionOption options for editing a tag protection
type EditTeamOption ¶
type EditTeamOption struct {
Name string `json:"name"`
Description *string `json:"description"`
Permission AccessMode `json:"permission"`
CanCreateOrgRepo *bool `json:"can_create_org_repo"`
IncludesAllRepositories *bool `json:"includes_all_repositories"`
// example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.pulls":"owner","repo.releases":"none","repo.wiki":"admin","repo.ext_wiki":"none","repo.projects":"none","repo.packages":"none","repo.actions":"none"}
UnitsMap map[string]string `json:"units_map"`
// Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
Units []RepoUnitType `json:"units"`
}
EditTeamOption options for editing a team
func (*EditTeamOption) Validate ¶
func (opt *EditTeamOption) Validate() error
Validate the EditTeamOption struct
type EditUserOption ¶
type EditUserOption struct {
SourceID int64 `json:"source_id"`
LoginName string `json:"login_name"`
Email *string `json:"email"`
FullName *string `json:"full_name"`
Password string `json:"password"`
Description *string `json:"description"`
MustChangePassword *bool `json:"must_change_password"`
Website *string `json:"website"`
Location *string `json:"location"`
Active *bool `json:"active"`
Admin *bool `json:"admin"`
AllowGitHook *bool `json:"allow_git_hook"`
AllowImportLocal *bool `json:"allow_import_local"`
MaxRepoCreation *int `json:"max_repo_creation"`
ProhibitLogin *bool `json:"prohibit_login"`
AllowCreateOrganization *bool `json:"allow_create_organization"`
Restricted *bool `json:"restricted"`
Visibility *VisibleType `json:"visibility"`
}
EditUserOption edit user options
type Email ¶
type Email struct {
Email string `json:"email"`
Verified bool `json:"verified"`
Primary bool `json:"primary"`
// UserID is only populated by admin endpoints that list emails across users.
UserID int64 `json:"user_id,omitempty"`
// UserName is only populated by admin endpoints that list emails across users.
UserName string `json:"username,omitempty"`
}
Email an email address belonging to a user
type ErrUnknownVersion ¶
type ErrUnknownVersion struct {
// contains filtered or unexported fields
}
ErrUnknownVersion is an unknown version from the API
func (*ErrUnknownVersion) Is ¶
func (*ErrUnknownVersion) Is(target error) bool
type ExternalTracker ¶
type ExternalTracker struct {
// URL of external issue tracker.
ExternalTrackerURL string `json:"external_tracker_url"`
// External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.
ExternalTrackerFormat string `json:"external_tracker_format"`
// External Issue Tracker Number Format, either `numeric` or `alphanumeric`
ExternalTrackerStyle string `json:"external_tracker_style"`
// External Issue Tracker issue regular expression
ExternalTrackerRegexPattern string `json:"external_tracker_regexp_pattern"`
}
ExternalTracker represents settings for external tracker
type ExternalWiki ¶
type ExternalWiki struct {
// URL of external wiki.
ExternalWikiURL string `json:"external_wiki_url"`
}
ExternalWiki represents setting for external wiki
type FileCommitResponse ¶
type FileCommitResponse struct {
CommitMeta
HTMLURL string `json:"html_url"`
Author *CommitUser `json:"author"`
Committer *CommitUser `json:"committer"`
Parents []*CommitMeta `json:"parents"`
Message string `json:"message"`
Tree *CommitMeta `json:"tree"`
}
FileCommitResponse contains information generated from a Git commit for a repo's file.
type FileDeleteResponse ¶
type FileDeleteResponse struct {
Content interface{} `json:"content"` // to be set to nil
Commit *FileCommitResponse `json:"commit"`
Verification *PayloadCommitVerification `json:"verification"`
}
FileDeleteResponse contains information about a repo's file that was deleted
type FileLinksResponse ¶
type FileLinksResponse struct {
Self *string `json:"self"`
GitURL *string `json:"git"`
HTMLURL *string `json:"html"`
}
FileLinksResponse contains the links for a repo's file
type FileOptions ¶
type FileOptions struct {
// message (optional) for the commit of this file. if not supplied, a default message will be used
Message string `json:"message"`
// branch (optional) to base this file from. if not given, the default branch is used
BranchName string `json:"branch"`
// new_branch (optional) will make a new branch from `branch` before creating the file
NewBranchName string `json:"new_branch"`
// `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
Author Identity `json:"author"`
Committer Identity `json:"committer"`
Dates CommitDateOptions `json:"dates"`
// Add a Signed-off-by trailer by the committer at the end of the commit log message.
Signoff bool `json:"signoff"`
}
FileOptions options for all file APIs
type FileResponse ¶
type FileResponse struct {
Content *ContentsResponse `json:"content"`
Commit *FileCommitResponse `json:"commit"`
Verification *PayloadCommitVerification `json:"verification"`
}
FileResponse contains information about a repo's file
type FilesResponse ¶
type FilesResponse struct {
Files []*ContentsResponse `json:"files"`
Commit *FileCommitResponse `json:"commit"`
Verification *PayloadCommitVerification `json:"verification"`
}
FilesResponse contains information about multiple files from a repo
type GPGKey ¶
type GPGKey struct {
ID int64 `json:"id"`
PrimaryKeyID string `json:"primary_key_id"`
KeyID string `json:"key_id"`
PublicKey string `json:"public_key"`
Emails []*GPGKeyEmail `json:"emails"`
SubsKey []*GPGKey `json:"subkeys"`
CanSign bool `json:"can_sign"`
CanEncryptComms bool `json:"can_encrypt_comms"`
CanEncryptStorage bool `json:"can_encrypt_storage"`
CanCertify bool `json:"can_certify"`
Created time.Time `json:"created_at,omitempty"`
Expires time.Time `json:"expires_at,omitempty"`
}
GPGKey a user GPG key to sign commit and tag in repository
type GPGKeyEmail ¶
GPGKeyEmail an email attached to a GPGKey
type GetTreesOptions ¶
type GetTreesOptions struct {
Recursive bool
ListOptions
}
GetTreesOptions options for listing a repository's trees
type GitBlobResponse ¶
type GitBlobResponse struct {
Content string `json:"content"`
Encoding string `json:"encoding"`
URL string `json:"url"`
SHA string `json:"sha"`
Size int64 `json:"size"`
}
GitBlobResponse represents a git blob
type GitEntry ¶
type GitEntry struct {
Path string `json:"path"`
Mode string `json:"mode"`
Type string `json:"type"`
Size int64 `json:"size"`
SHA string `json:"sha"`
URL string `json:"url"`
}
GitEntry represents a git tree
type GitHook ¶
type GitHook struct {
Name string `json:"name"`
IsActive bool `json:"is_active"`
Content string `json:"content,omitempty"`
}
GitHook represents a Git repository hook
type GitServiceType ¶
type GitServiceType string
GitServiceType represents a git service
const ( // GitServicePlain represents a plain git service GitServicePlain GitServiceType = "git" // GitServiceGithub represents github.com GitServiceGithub GitServiceType = "github" // GitServiceGitlab represents a gitlab service GitServiceGitlab GitServiceType = "gitlab" // GitServiceForgejo represents a forgejo service GitServiceForgejo GitServiceType = "forgejo" // GitServiceGitea represents a gitea service GitServiceGitea GitServiceType = "gitea" // GitServiceGogs represents a gogs service GitServiceGogs GitServiceType = "gogs" )
type GitTreeResponse ¶
type GitTreeResponse struct {
SHA string `json:"sha"`
URL string `json:"url"`
Entries []GitEntry `json:"tree"`
Truncated bool `json:"truncated"`
Page int `json:"page"`
TotalCount int `json:"total_count"`
}
GitTreeResponse returns a git tree
type GitignoreTemplateInfo ¶
GitignoreTemplateInfo holds the name and content of a gitignore template.
type GlobalAPISettings ¶
type GlobalAPISettings struct {
MaxResponseItems int `json:"max_response_items"`
DefaultPagingNum int `json:"default_paging_num"`
DefaultGitTreesPerPage int `json:"default_git_trees_per_page"`
DefaultMaxBlobSize int64 `json:"default_max_blob_size"`
}
GlobalAPISettings contains global api settings exposed by it
type GlobalAttachmentSettings ¶
type GlobalAttachmentSettings struct {
Enabled bool `json:"enabled"`
AllowedTypes string `json:"allowed_types"`
MaxSize int64 `json:"max_size"`
MaxFiles int `json:"max_files"`
}
GlobalAttachmentSettings contains global Attachment settings exposed by API
type GlobalRepoSettings ¶
type GlobalRepoSettings struct {
MirrorsDisabled bool `json:"mirrors_disabled"`
HTTPGitDisabled bool `json:"http_git_disabled"`
MigrationsDisabled bool `json:"migrations_disabled"`
StarsDisabled bool `json:"stars_disabled"`
TimeTrackingDisabled bool `json:"time_tracking_disabled"`
LFSDisabled bool `json:"lfs_disabled"`
}
GlobalRepoSettings represent the global repository settings of a forgejo instance witch is exposed by API
type GlobalUISettings ¶
type GlobalUISettings struct {
DefaultTheme string `json:"default_theme"`
AllowedReactions []string `json:"allowed_reactions"`
CustomEmojis []string `json:"custom_emojis"`
}
GlobalUISettings represent the global ui settings of a forgejo instance witch is exposed by API
type HTTPSign ¶
HTTPSign contains the signer used for signing requests
func NewHTTPSignWithCert ¶
NewHTTPSignWithCert can be used to create a HTTPSign with a certificate if no principal is specified it returns the first certificate found
func NewHTTPSignWithPubkey ¶
NewHTTPSignWithPubkey can be used to create a HTTPSign with a public key if no fingerprint is specified it returns the first public key found
type HTTPSignConfig ¶
type HTTPSignConfig struct {
// contains filtered or unexported fields
}
HTTPSignConfig contains the configuration for creating a HTTPSign
type Hook ¶
type Hook struct {
ID int64 `json:"id"`
Type string `json:"type"`
URL string `json:"-"`
Config map[string]string `json:"config"`
Events []string `json:"events"`
Active bool `json:"active"`
Updated time.Time `json:"updated_at"`
Created time.Time `json:"created_at"`
}
Hook a hook is a web hook when one repository changed
type HookType ¶
type HookType string
HookType represent all webhook types forgejo currently offer
const ( // HookTypeDingtalk webhook that dingtalk understand HookTypeDingtalk HookType = "dingtalk" // HookTypeDiscord webhook that discord understand HookTypeDiscord HookType = "discord" // HookTypeForgejo webhook that forgejo understand HookTypeForgejo HookType = "forgejo" // HookTypeGitea webhook that gitea understand HookTypeGitea HookType = "gitea" // HookTypeGogs webhook that gogs understand HookTypeGogs HookType = "gogs" // HookTypeMsteams webhook that msteams understand HookTypeMsteams HookType = "msteams" // HookTypeSlack webhook that slack understand HookTypeSlack HookType = "slack" // HookTypeTelegram webhook that telegram understand HookTypeTelegram HookType = "telegram" // HookTypeFeishu webhook that feishu understand HookTypeFeishu HookType = "feishu" )
type InternalTracker ¶
type InternalTracker struct {
// Enable time tracking (Built-in issue tracker)
EnableTimeTracker bool `json:"enable_time_tracker"`
// Let only contributors track time (Built-in issue tracker)
AllowOnlyContributorsToTrackTime bool `json:"allow_only_contributors_to_track_time"`
// Enable dependencies for issues and pull requests (Built-in issue tracker)
EnableIssueDependencies bool `json:"enable_issue_dependencies"`
}
InternalTracker represents settings for internal tracker
type Issue ¶
type Issue struct {
ID int64 `json:"id"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
Index int64 `json:"number"`
Poster *User `json:"user"`
OriginalAuthor string `json:"original_author"`
OriginalAuthorID int64 `json:"original_author_id"`
Title string `json:"title"`
Body string `json:"body"`
Ref string `json:"ref"`
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
Assignees []*User `json:"assignees"`
// Whether the issue is open or closed
State StateType `json:"state"`
IsLocked bool `json:"is_locked"`
Comments int `json:"comments"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Closed *time.Time `json:"closed_at"`
Deadline *time.Time `json:"due_date"`
PullRequest *PullRequestMeta `json:"pull_request"`
Repository *RepositoryMeta `json:"repository"`
}
Issue represents an issue in a repository
type IssueConfig ¶
type IssueConfig struct {
BlankIssuesEnabled bool `json:"blank_issues_enabled"`
ContactLinks []IssueConfigContactLink `json:"contact_links"`
}
IssueConfig is a repository's issue config, as read from .forgejo/ISSUE_TEMPLATE/config.yaml (or the .gitea/.github equivalents)
type IssueConfigContactLink ¶
type IssueConfigContactLink struct {
Name string `json:"name"`
URL string `json:"url"`
About string `json:"about"`
}
IssueConfigContactLink is a contact link declared in a repository's issue config
type IssueConfigValidation ¶
IssueConfigValidation is the result of validating a repository's issue config
type IssueDeadline ¶
IssueDeadline holds an issue's due date
type IssueFormElement ¶
type IssueFormElement struct {
ID string `json:"id"`
Type IssueFormElementType `json:"type"`
Attributes IssueFormElementAttributes `json:"attributes"`
Validations IssueFormElementValidations `json:"validations"`
}
IssueFormElement describes a part of a IssueTemplate form
type IssueFormElementAttributes ¶
type IssueFormElementAttributes struct {
// required for all element types.
// A brief description of the expected user input, which is also displayed in the form.
Label string `json:"label"`
// required for element types "dropdown", "checkboxes"
// for dropdown, contains the available options
Options []string `json:"options"`
// for element types "markdown", "textarea", "input"
// Text that is pre-filled in the input
Value string `json:"value"`
// for element types "textarea", "input", "dropdown", "checkboxes"
// A description of the text area to provide context or guidance, which is displayed in the form.
Description string `json:"description"`
// for element types "textarea", "input"
// A semi-opaque placeholder that renders in the text area when empty.
Placeholder string `json:"placeholder"`
// for element types "textarea"
// A language specifier. If set, the input is rendered as codeblock with syntax highlighting.
SyntaxHighlighting string `json:"render"`
// for element types "dropdown"
Multiple bool `json:"multiple"`
}
IssueFormElementAttributes contains the combined set of attributes available on all element types.
type IssueFormElementType ¶
type IssueFormElementType string
IssueFormElementType is an enum
const ( // IssueFormElementMarkdown is markdown rendered to the form for context, but omitted in the resulting issue IssueFormElementMarkdown IssueFormElementType = "markdown" // IssueFormElementTextarea is a multi line input IssueFormElementTextarea IssueFormElementType = "textarea" // IssueFormElementInput is a single line input IssueFormElementInput IssueFormElementType = "input" // IssueFormElementDropdown is a select form IssueFormElementDropdown IssueFormElementType = "dropdown" // IssueFormElementCheckboxes are a multi checkbox input IssueFormElementCheckboxes IssueFormElementType = "checkboxes" )
type IssueFormElementValidations ¶
type IssueFormElementValidations struct {
// for all element types
Required bool `json:"required"`
// for element types "input"
IsNumber bool `json:"is_number"`
// for element types "input"
Regex string `json:"regex"`
}
IssueFormElementValidations contains the combined set of validations available on all element types.
type IssueLabelsOption ¶
type IssueLabelsOption struct {
// list of label IDs
Labels []int64 `json:"labels"`
// swagger:strfmt date-time
Updated *time.Time `json:"updated_at"`
}
IssueLabelsOption a collection of labels
type IssueMeta ¶
type IssueMeta struct {
Owner string `json:"owner"`
Name string `json:"repo"`
Index int64 `json:"index"`
}
IssueMeta identifies an issue by owner, repo and index, for use as the request body of endpoints that reference another issue (e.g. blocking and dependency relations)
type IssueTemplate ¶
type IssueTemplate struct {
Name string `json:"name"`
About string `json:"about"`
Filename string `json:"file_name"`
IssueTitle string `json:"title"`
IssueLabels []string `json:"labels"`
IssueRef string `json:"ref"`
// If non-nil, this is a form-based template
Form []IssueFormElement `json:"body"`
// Should only be used when .Form is nil.
MarkdownContent string `json:"content"`
}
IssueTemplate provides metadata and content on an issue template. There are two types of issue templates: .Markdown- and .Form-based.
func (IssueTemplate) IsForm ¶
func (t IssueTemplate) IsForm() bool
IsForm tells if this template is a form instead of a markdown-based template.
type Label ¶
type Label struct {
ID int64 `json:"id"`
Name string `json:"name"`
Exclusive bool `json:"exclusive"`
IsArchived bool `json:"is_archived"`
// example: 00aabb
Color string `json:"color"`
Description string `json:"description"`
URL string `json:"url"`
}
Label a label to an issue or a pr
type LabelTemplate ¶
type LabelTemplate struct {
Name string `json:"name"`
Color string `json:"color"`
Description string `json:"description"`
Exclusive bool `json:"exclusive"`
}
LabelTemplate is a single label defined by a label template.
type LicenseTemplateInfo ¶
type LicenseTemplateInfo struct {
Key string `json:"key"`
Name string `json:"name"`
URL string `json:"url"`
Implementation string `json:"implementation"`
Body string `json:"body"`
}
LicenseTemplateInfo holds the full text and metadata of a single license template.
type LicenseTemplateListEntry ¶
type LicenseTemplateListEntry struct {
Key string `json:"key"`
Name string `json:"name"`
URL string `json:"url"`
}
LicenseTemplateListEntry is one entry of the list returned by ListLicenseTemplates.
type ListAccessTokensOptions ¶
type ListAccessTokensOptions struct {
ListOptions
}
ListAccessTokensOptions options for listing a users's access tokens
type ListActionJobsOption ¶
type ListActionJobsOption struct {
Labels string `json:"labels"`
}
ListActionJobsOption options for listing/searching action jobs
type ListActionRunnersOptions ¶
type ListActionRunnersOptions struct {
ListOptions
// Visible includes all runners visible to the caller, not just the ones
// directly owned by the scope being queried.
Visible bool
}
ListActionRunnersOptions options for listing runners
func (*ListActionRunnersOptions) QueryEncode ¶
func (opt *ListActionRunnersOptions) QueryEncode() string
QueryEncode encodes options to query parameters
type ListActionRunsOption ¶
type ListActionRunsOption struct {
ListOptions
Event string `json:"event"`
Status string `json:"status"`
RunNumber int64 `json:"run_number"`
HeadSHA string `json:"head_sha"`
}
ListActionRunsOption options for listing action runs
func (*ListActionRunsOption) QueryEncode ¶
func (opt *ListActionRunsOption) QueryEncode() string
QueryEncode encodes options to query parameters
type ListActionRunsResponse ¶
type ListActionRunsResponse struct {
TotalCount int64 `json:"total_count"`
WorkflowRuns []*ActionRun `json:"workflow_runs"`
}
ListActionRunsResponse paginated list of action runs
type ListActionTasksOption ¶
type ListActionTasksOption struct {
ListOptions
}
ListActionTasksOption options for listing action tasks
type ListActionTasksResponse ¶
type ListActionTasksResponse struct {
TotalCount int64 `json:"total_count"`
WorkflowRuns []*ActionTask `json:"workflow_runs"`
}
ListActionTasksResponse paginated list of action tasks
type ListActivityFeedsOptions ¶
type ListActivityFeedsOptions struct {
ListOptions
// OnlyPerformedBy restricts the feed to actions performed by the user
// themselves.
OnlyPerformedBy bool
// Date restricts the feed to activities on this date (YYYY-MM-DD). Optional.
Date string
}
ListActivityFeedsOptions holds optional parameters for listing activity feeds
func (*ListActivityFeedsOptions) QueryEncode ¶
func (opt *ListActivityFeedsOptions) QueryEncode() string
QueryEncode encodes options to query parameters
type ListBlockedUsersOptions ¶
type ListBlockedUsersOptions struct {
ListOptions
}
ListBlockedUsersOptions options for listing the users blocked by the authenticated user.
type ListBranchProtectionsOptions ¶
type ListBranchProtectionsOptions struct {
ListOptions
}
ListBranchProtectionsOptions list branch protection options
type ListCollaboratorsOptions ¶
type ListCollaboratorsOptions struct {
ListOptions
}
ListCollaboratorsOptions options for listing a repository's collaborators
type ListCommitOptions ¶
type ListCommitOptions struct {
ListOptions
// SHA or branch to start listing commits from (usually 'master')
SHA string
// Path indicates that only commits that include the path's file/dir should be returned.
Path string
// Stat includes diff stats for every commit (disable for speedup)
Stat bool
// Verification includes verification for every commit (disable for speedup)
Verification bool
// Files includes a list of affected files for every commit (disable for speedup)
Files bool
// Not is a string used such that commits that match the given specifier will not be listed.
Not string
}
ListCommitOptions list commit options
func (*ListCommitOptions) QueryEncode ¶
func (opt *ListCommitOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListCommitStatusesOptions ¶
type ListCommitStatusesOptions struct {
ListOptions
// Sort type, one of: oldest, recentupdate, leastupdate, leastindex, highestindex
Sort string
// State filters the statuses by state: pending, success, error, failure, warning
State StatusState
}
ListCommitStatusesOptions options for listing a commit's statuses by SHA
func (*ListCommitStatusesOptions) QueryEncode ¶
func (opt *ListCommitStatusesOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListCronTaskOptions ¶
type ListCronTaskOptions struct {
ListOptions
}
ListCronTaskOptions list options for ListCronTasks
type ListDeployKeysOptions ¶
type ListDeployKeysOptions struct {
ListOptions
KeyID int64
Fingerprint string
}
ListDeployKeysOptions options for listing a repository's deploy keys
func (*ListDeployKeysOptions) QueryEncode ¶
func (opt *ListDeployKeysOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListEmailsOptions ¶
type ListEmailsOptions struct {
ListOptions
}
ListEmailsOptions options for listing current's user emails
type ListFollowersOptions ¶
type ListFollowersOptions struct {
ListOptions
}
ListFollowersOptions options for listing followers
type ListFollowingOptions ¶
type ListFollowingOptions struct {
ListOptions
}
ListFollowingOptions options for listing a user's users being followed
type ListForksOptions ¶
type ListForksOptions struct {
ListOptions
}
ListForksOptions options for listing repository's forks
type ListGPGKeysOptions ¶
type ListGPGKeysOptions struct {
ListOptions
}
ListGPGKeysOptions options for listing a user's GPGKeys
type ListHooksOptions ¶
type ListHooksOptions struct {
ListOptions
}
ListHooksOptions options for listing hooks
type ListIssueCommentOptions ¶
ListIssueCommentOptions list comment options
func (*ListIssueCommentOptions) QueryEncode ¶
func (opt *ListIssueCommentOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListIssueOption ¶
type ListIssueOption struct {
ListOptions
State StateType
Type IssueType
Labels []string
Milestones []string
KeyWord string
Since time.Time
Before time.Time
// filter by created by username
CreatedBy string
// filter by assigned to username
AssignedBy string
// filter by username mentioned
MentionedBy string
// filter by owner (only works on ListIssues on User)
Owner string
// filter by team (requires organization owner parameter to be provided and only works on ListIssues on User)
Team string
}
ListIssueOption list issue options
func (*ListIssueOption) QueryEncode ¶
func (opt *ListIssueOption) QueryEncode() string
QueryEncode turns options into querystring argument
type ListIssueTimelineOptions ¶
type ListIssueTimelineOptions struct {
ListOptions
Since time.Time
Before time.Time
}
ListIssueTimelineOptions list timeline options
func (*ListIssueTimelineOptions) QueryEncode ¶
func (opt *ListIssueTimelineOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListLabelsOptions ¶
type ListLabelsOptions struct {
ListOptions
}
ListLabelsOptions options for listing repository's labels
type ListMilestoneOption ¶
type ListMilestoneOption struct {
ListOptions
// open, closed, all
State StateType
Name string
}
ListMilestoneOption list milestone options
func (*ListMilestoneOption) QueryEncode ¶
func (opt *ListMilestoneOption) QueryEncode() string
QueryEncode turns options into querystring argument
type ListMyQuotaArtifactsOptions ¶
type ListMyQuotaArtifactsOptions struct {
ListOptions
}
ListMyQuotaArtifactsOptions holds optional parameters for listing quota artifacts
type ListMyQuotaAttachmentsOptions ¶
type ListMyQuotaAttachmentsOptions struct {
ListOptions
}
ListMyQuotaAttachmentsOptions holds optional parameters for listing quota attachments
type ListMyQuotaPackagesOptions ¶
type ListMyQuotaPackagesOptions struct {
ListOptions
}
ListMyQuotaPackagesOptions holds optional parameters for listing quota packages
type ListNotificationOptions ¶
type ListNotificationOptions struct {
ListOptions
Since time.Time
Before time.Time
Status []NotifyStatus
SubjectTypes []NotifySubjectType
}
ListNotificationOptions represents the filter options
func (*ListNotificationOptions) QueryEncode ¶
func (opt *ListNotificationOptions) QueryEncode() string
QueryEncode encode options to url query
func (ListNotificationOptions) Validate ¶
func (opt ListNotificationOptions) Validate(c *Client) error
Validate the CreateUserOption struct
type ListOauth2Option ¶
type ListOauth2Option struct {
ListOptions
}
ListOauth2Option for listing Oauth2 Applications
type ListOptions ¶
type ListOptions struct {
// Setting Page to -1 disables pagination on endpoints that support it.
// Page numbering starts at 1.
Page int
// The default value depends on the server config DEFAULT_PAGING_NUM
// The highest valid value depends on the server config MAX_RESPONSE_ITEMS
PageSize int
}
ListOptions options for using Forgejo's API pagination
type ListOrgActionSecretOption ¶
type ListOrgActionSecretOption struct {
ListOptions
}
ListOrgActionSecretOption list OrgActionSecret options
type ListOrgBlockedUsersOptions ¶
type ListOrgBlockedUsersOptions struct {
ListOptions
}
ListOrgBlockedUsersOptions holds optional parameters for listing an organization's blocked users
type ListOrgMembershipOption ¶
type ListOrgMembershipOption struct {
ListOptions
}
ListOrgMembershipOption list OrgMembership options
type ListOrgQuotaArtifactsOptions ¶
type ListOrgQuotaArtifactsOptions struct {
ListOptions
}
ListOrgQuotaArtifactsOptions holds optional parameters for listing an organization's quota artifacts
type ListOrgQuotaAttachmentsOptions ¶
type ListOrgQuotaAttachmentsOptions struct {
ListOptions
}
ListOrgQuotaAttachmentsOptions holds optional parameters for listing an organization's quota attachments
type ListOrgQuotaPackagesOptions ¶
type ListOrgQuotaPackagesOptions struct {
ListOptions
}
ListOrgQuotaPackagesOptions holds optional parameters for listing an organization's quota packages
type ListOrgReposOptions ¶
type ListOrgReposOptions struct {
ListOptions
}
ListOrgReposOptions options for a organization's repositories
type ListOrgRunnersOption ¶
type ListOrgRunnersOption struct {
ListOptions
// Visible controls whether to include all visible runners (true) or only
// those directly owned by the organization (false).
Visible bool
}
ListOrgRunnersOption options for listing an organization's runners
func (*ListOrgRunnersOption) QueryEncode ¶
func (opt *ListOrgRunnersOption) QueryEncode() string
QueryEncode encodes options to query parameters
type ListOrgsOptions ¶
type ListOrgsOptions struct {
ListOptions
}
ListOrgsOptions options for listing organizations
type ListPackagesOptions ¶
type ListPackagesOptions struct {
ListOptions
Type PackageType // Filter for package type, if empty, list everything
Q string // Name filter
}
ListPackagesOptions options for listing packages
type ListPublicKeysOptions ¶
type ListPublicKeysOptions struct {
ListOptions
}
ListPublicKeysOptions options for listing a user's PublicKeys
type ListPullRequestCommitsOptions ¶
type ListPullRequestCommitsOptions struct {
ListOptions
}
ListPullRequestCommitsOptions options for listing pull requests
type ListPullRequestFilesOptions ¶
type ListPullRequestFilesOptions struct {
ListOptions
}
ListPullRequestFilesOptions options for listing pull request files
type ListPullRequestsOptions ¶
type ListPullRequestsOptions struct {
ListOptions
State StateType `json:"state"`
// oldest, recentupdate, leastupdate, mostcomment, leastcomment, priority
Sort string
Milestone int64
}
ListPullRequestsOptions options for listing pull requests
func (*ListPullRequestsOptions) QueryEncode ¶
func (opt *ListPullRequestsOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListPullReviewsOptions ¶
type ListPullReviewsOptions struct {
ListOptions
}
ListPullReviewsOptions options for listing PullReviews
type ListPushMirrorsOptions ¶
type ListPushMirrorsOptions struct {
ListOptions
}
ListPushMirrorsOptions options for listing a repository's push mirrors
type ListReleasesOptions ¶
type ListReleasesOptions struct {
ListOptions
IsDraft *bool
IsPreRelease *bool
}
ListReleasesOptions options for listing repository's releases
func (*ListReleasesOptions) QueryEncode ¶
func (opt *ListReleasesOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListRepoActionSecretOption ¶
type ListRepoActionSecretOption struct {
ListOptions
}
ListRepoActionSecretOption list RepoActionSecret options
type ListRepoActivityFeedsOptions ¶
type ListRepoActivityFeedsOptions struct {
ListOptions
// Date restricts the feed to activities on this date, in YYYY-MM-DD format
Date string
}
ListRepoActivityFeedsOptions options for listing a repository's activity feeds
func (*ListRepoActivityFeedsOptions) QueryEncode ¶
func (opt *ListRepoActivityFeedsOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListRepoBranchesOptions ¶
type ListRepoBranchesOptions struct {
ListOptions
}
ListRepoBranchesOptions options for listing a repository's branches
type ListRepoGitHooksOptions ¶
type ListRepoGitHooksOptions struct {
ListOptions
}
ListRepoGitHooksOptions options for listing repository's githooks
type ListRepoIssueCommentOptions ¶
type ListRepoIssueCommentOptions struct {
ListOptions
Since time.Time
Before time.Time
}
ListRepoIssueCommentOptions list comment options
func (*ListRepoIssueCommentOptions) QueryEncode ¶
func (opt *ListRepoIssueCommentOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListRepoSubscribersOptions ¶
type ListRepoSubscribersOptions struct {
ListOptions
}
ListRepoSubscribersOptions options for listing a repository's subscribers
type ListRepoTagsOptions ¶
type ListRepoTagsOptions struct {
ListOptions
}
ListRepoTagsOptions options for listing a repository's tags
type ListRepoTopicsOptions ¶
type ListRepoTopicsOptions struct {
ListOptions
}
ListRepoTopicsOptions options for listing repo's topics
type ListReposOptions ¶
type ListReposOptions struct {
ListOptions
}
ListReposOptions options for listing repositories
type ListStargazersOptions ¶
type ListStargazersOptions struct {
ListOptions
}
ListStargazersOptions options for listing a repository's stargazers
type ListStatusesOption ¶
type ListStatusesOption struct {
ListOptions
}
ListStatusesOption options for listing a repository's commit's statuses
type ListTagProtectionsOptions ¶
type ListTagProtectionsOptions struct {
ListOptions
}
ListTagProtectionsOptions options for listing tag protections
type ListTeamMembersOptions ¶
type ListTeamMembersOptions struct {
ListOptions
}
ListTeamMembersOptions options for listing team's members
type ListTeamRepositoriesOptions ¶
type ListTeamRepositoriesOptions struct {
ListOptions
}
ListTeamRepositoriesOptions options for listing team's repositories
type ListTeamsOptions ¶
type ListTeamsOptions struct {
ListOptions
}
ListTeamsOptions options for listing teams
type ListTrackedTimesOptions ¶
type ListTrackedTimesOptions struct {
ListOptions
Since time.Time
Before time.Time
// User filter is only used by ListRepoTrackedTimes !!!
User string
}
ListTrackedTimesOptions options for listing repository's tracked times
func (*ListTrackedTimesOptions) QueryEncode ¶
func (opt *ListTrackedTimesOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListWikiPageRevisionsOptions ¶
type ListWikiPageRevisionsOptions struct {
ListOptions
}
ListWikiPageRevisionsOptions options for listing a wiki page's revisions
type ListWikiPagesOptions ¶
type ListWikiPagesOptions struct {
ListOptions
}
ListWikiPagesOptions options for listing a repository's wiki pages
type MarkNotificationOptions ¶
type MarkNotificationOptions struct {
LastReadAt time.Time
Status []NotifyStatus
ToStatus NotifyStatus
}
MarkNotificationOptions represents the filter & modify options
func (*MarkNotificationOptions) QueryEncode ¶
func (opt *MarkNotificationOptions) QueryEncode() string
QueryEncode encode options to url query
func (MarkNotificationOptions) Validate ¶
func (opt MarkNotificationOptions) Validate(c *Client) error
Validate the CreateUserOption struct
type MarkdownOption ¶
type MarkdownOption struct {
// Context to render
Context string `json:"Context,omitempty"`
// Mode to render (comment, gfm, markdown)
Mode string `json:"Mode,omitempty"`
// Text markdown to render
Text string `json:"Text,omitempty"`
// Wiki tells whether this is a wiki page
Wiki bool `json:"Wiki,omitempty"`
}
MarkdownOption holds the parameters for RenderMarkdown.
type MarkupOption ¶
type MarkupOption struct {
// BranchPath is the current branch path where the form gets posted
BranchPath string `json:"BranchPath,omitempty"`
// Context to render
Context string `json:"Context,omitempty"`
// FilePath is the file path used for detecting the extension in file mode
FilePath string `json:"FilePath,omitempty"`
// Mode to render (comment, gfm, markdown, file)
Mode string `json:"Mode,omitempty"`
// Text markup to render
Text string `json:"Text,omitempty"`
// Wiki tells whether this is a wiki page
Wiki bool `json:"Wiki,omitempty"`
}
MarkupOption holds the parameters for RenderMarkup.
type MergePullRequestOption ¶
type MergePullRequestOption struct {
Style MergeStyle `json:"Do"`
MergeCommitID string `json:"MergeCommitID"`
Title string `json:"MergeTitleField"`
Message string `json:"MergeMessageField"`
DeleteBranchAfterMerge bool `json:"delete_branch_after_merge"`
ForceMerge bool `json:"force_merge"`
HeadCommitId string `json:"head_commit_id"` //nolint
MergeWhenChecksSucceed bool `json:"merge_when_checks_succeed"`
}
MergePullRequestOption options when merging a pull request
func (MergePullRequestOption) Validate ¶
func (opt MergePullRequestOption) Validate(c *Client) error
Validate the MergePullRequestOption struct
type MergeStyle ¶
type MergeStyle string
MergeStyle is used specify how a pull is merged
const ( // MergeStyleMerge merge pull as usual MergeStyleMerge MergeStyle = "merge" // MergeStyleRebase rebase pull MergeStyleRebase MergeStyle = "rebase" // MergeStyleRebaseMerge rebase and merge pull MergeStyleRebaseMerge MergeStyle = "rebase-merge" // MergeStyleSquash squash and merge pull MergeStyleSquash MergeStyle = "squash" // MergeStyleFastForwardOnly fast forward only pull MergeStyleFastForwardOnly MergeStyle = "fast-forward-only" )
type MigrateRepoOption ¶
type MigrateRepoOption struct {
RepoName string `json:"repo_name"`
RepoOwner string `json:"repo_owner"`
// Deprecated: use RepoOwner
RepoOwnerID int64 `json:"uid"`
CloneAddr string `json:"clone_addr"`
Service GitServiceType `json:"service"`
AuthUsername string `json:"auth_username"`
AuthPassword string `json:"auth_password"`
AuthToken string `json:"auth_token"`
Mirror bool `json:"mirror"`
Private bool `json:"private"`
Description string `json:"description"`
Wiki bool `json:"wiki"`
Milestones bool `json:"milestones"`
Labels bool `json:"labels"`
Issues bool `json:"issues"`
PullRequests bool `json:"pull_requests"`
Releases bool `json:"releases"`
MirrorInterval string `json:"mirror_interval"`
LFS bool `json:"lfs"`
LFSEndpoint string `json:"lfs_endpoint"`
}
MigrateRepoOption options for migrating a repository from an external service
func (*MigrateRepoOption) Validate ¶
func (opt *MigrateRepoOption) Validate(c *Client) error
Validate the MigrateRepoOption struct
type Milestone ¶
type Milestone struct {
ID int64 `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
State StateType `json:"state"`
OpenIssues int `json:"open_issues"`
ClosedIssues int `json:"closed_issues"`
Created time.Time `json:"created_at"`
Updated *time.Time `json:"updated_at"`
Closed *time.Time `json:"closed_at"`
Deadline *time.Time `json:"due_on"`
}
Milestone milestone is a collection of issues on one repository
type NewIssuePinsAllowed ¶
type NewIssuePinsAllowed struct {
Issues bool `json:"issues"`
PullRequests bool `json:"pull_requests"`
}
NewIssuePinsAllowed tells whether new issue or pull request pins are allowed for a repository
type NodeInfo ¶
type NodeInfo struct {
Version string `json:"version"`
Software NodeInfoSoftware `json:"software"`
Protocols []string `json:"protocols"`
Services NodeInfoServices `json:"services"`
OpenRegistrations bool `json:"openRegistrations"`
Usage NodeInfoUsage `json:"usage"`
Metadata interface{} `json:"metadata"`
}
NodeInfo is the standardized way of exposing metadata about a server running one of the distributed social networks, as described by https://nodeinfo.diaspora.software/.
type NodeInfoServices ¶
type NodeInfoServices struct {
Inbound []string `json:"inbound"`
Outbound []string `json:"outbound"`
}
NodeInfoServices lists the third-party sites this server can connect to, and be connected from, via their application API.
type NodeInfoSoftware ¶
type NodeInfoSoftware struct {
Name string `json:"name"`
Version string `json:"version"`
Repository string `json:"repository"`
Homepage string `json:"homepage"`
}
NodeInfoSoftware holds metadata about the server software in use.
type NodeInfoUsage ¶
type NodeInfoUsage struct {
Users NodeInfoUsageUsers `json:"users"`
LocalPosts int64 `json:"localPosts"`
LocalComments int64 `json:"localComments"`
}
NodeInfoUsage holds usage statistics for the server.
type NodeInfoUsageUsers ¶
type NodeInfoUsageUsers struct {
Total int64 `json:"total"`
ActiveMonth int64 `json:"activeMonth"`
ActiveHalfyear int64 `json:"activeHalfyear"`
}
NodeInfoUsageUsers holds statistics about the users of the server.
type NoteOptions ¶
type NoteOptions struct {
Message string `json:"message"`
}
NoteOptions options when setting a git note
type NotificationSubject ¶
type NotificationSubject struct {
Title string `json:"title"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
LatestCommentURL string `json:"latest_comment_url"`
LatestCommentHTMLURL string `json:"latest_comment_html_url"`
Type NotifySubjectType `json:"type"`
State NotifySubjectState `json:"state"`
}
NotificationSubject contains the notification subject (Issue/Pull/Commit)
type NotificationThread ¶
type NotificationThread struct {
ID int64 `json:"id"`
Repository *Repository `json:"repository"`
Subject *NotificationSubject `json:"subject"`
Unread bool `json:"unread"`
Pinned bool `json:"pinned"`
UpdatedAt time.Time `json:"updated_at"`
URL string `json:"url"`
}
NotificationThread expose Notification on API
type NotifyStatus ¶
type NotifyStatus string
NotifyStatus notification status type
const ( // NotifyStatusUnread was not read NotifyStatusUnread NotifyStatus = "unread" // NotifyStatusRead was already read by user NotifyStatusRead NotifyStatus = "read" // NotifyStatusPinned notification is pinned by user NotifyStatusPinned NotifyStatus = "pinned" )
type NotifySubjectState ¶
type NotifySubjectState string
NotifySubjectState reflect state of notification subject
const ( // NotifySubjectOpen if subject is a pull/issue and is open at the moment NotifySubjectOpen NotifySubjectState = "open" // NotifySubjectClosed if subject is a pull/issue and is closed at the moment NotifySubjectClosed NotifySubjectState = "closed" // NotifySubjectMerged if subject is a pull and got merged NotifySubjectMerged NotifySubjectState = "merged" )
type NotifySubjectType ¶
type NotifySubjectType string
NotifySubjectType represent type of notification subject
const ( // NotifySubjectIssue an issue is subject of an notification NotifySubjectIssue NotifySubjectType = "Issue" // NotifySubjectPull an pull is subject of an notification NotifySubjectPull NotifySubjectType = "Pull" // NotifySubjectCommit an commit is subject of an notification NotifySubjectCommit NotifySubjectType = "Commit" // NotifySubjectRepository an repository is subject of an notification NotifySubjectRepository NotifySubjectType = "Repository" )
type Oauth2 ¶
type Oauth2 struct {
ID int64 `json:"id"`
Name string `json:"name"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
RedirectURIs []string `json:"redirect_uris"`
ConfidentialClient bool `json:"confidential_client"`
Created time.Time `json:"created"`
}
Oauth2 represents an Oauth2 Application
type OrgPermissions ¶
type OrgPermissions struct {
CanCreateRepository bool `json:"can_create_repository"`
CanRead bool `json:"can_read"`
CanWrite bool `json:"can_write"`
IsAdmin bool `json:"is_admin"`
IsOwner bool `json:"is_owner"`
}
OrgPermissions represents the permissions for an user in an organization
type Organization ¶
type Organization struct {
ID int64 `json:"id"`
UserName string `json:"username"`
FullName string `json:"full_name"`
AvatarURL string `json:"avatar_url"`
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
Visibility string `json:"visibility"`
}
Organization represents an organization
type PRBranchInfo ¶
type PRBranchInfo struct {
Name string `json:"label"`
Ref string `json:"ref"`
Sha string `json:"sha"`
RepoID int64 `json:"repo_id"`
Repository *Repository `json:"repo"`
}
PRBranchInfo information about a branch
type Package ¶
type Package struct {
// the package's id
ID int64 `json:"id"`
// the package's owner
Owner User `json:"owner"`
// the repo this package belongs to (if any)
Repository *Repository `json:"repository"`
// the package's creator
Creator User `json:"creator"`
// the type of package:
Type string `json:"type"`
// the name of the package
Name string `json:"name"`
// the version of the package
Version string `json:"version"`
// the date the package was uploaded
CreatedAt time.Time `json:"created_at"`
}
Package represents a package
type PackageFile ¶
type PackageFile struct {
// the file's ID
ID int64 `json:"id"`
// the size of the file in bytes
Size int64 `json:"size"`
// the name of the file
Name string `json:"name"`
// the md5 hash of the file
MD5 string `json:"md5"`
// the sha1 hash of the file
SHA1 string `json:"sha1"`
// the sha256 hash of the file
SHA256 string `json:"sha256"`
// the sha512 hash of the file
SHA512 string `json:"sha512"`
}
PackageFile represents a file from a package
type PackageType ¶
type PackageType string
const ( PackageTypeAll PackageType = "" PackageTypeArch PackageType = "arch" PackageTypeAlt PackageType = "alt" PackageTypeAlpine PackageType = "alpine" PackageTypeCargo PackageType = "cargo" PackageTypeChef PackageType = "chef" PackageTypeComposer PackageType = "composer" PackageTypeConan PackageType = "conan" PackageTypeConda PackageType = "conda" PackageTypeContainer PackageType = "container" PackageTypeCran PackageType = "cran" PackageTypeDebian PackageType = "debian" PackageTypeGeneric PackageType = "generic" PackageTypeGo PackageType = "go" PackageTypeHelm PackageType = "helm" PackageTypeMaven PackageType = "maven" PackageTypeNpm PackageType = "npm" PackageTypeNuget PackageType = "nuget" PackageTypePub PackageType = "pub" PackageTypePypi PackageType = "pypi" PackageTypeRpm PackageType = "rpm" PackageTypeRubygems PackageType = "rubygems" PackageTypeSwift PackageType = "swift" PackageTypeVagrant PackageType = "vagrant" )
type PayloadCommit ¶
type PayloadCommit struct {
// sha1 hash of the commit
ID string `json:"id"`
Message string `json:"message"`
URL string `json:"url"`
Author *PayloadUser `json:"author"`
Committer *PayloadUser `json:"committer"`
Verification *PayloadCommitVerification `json:"verification"`
Timestamp time.Time `json:"timestamp"`
Added []string `json:"added"`
Removed []string `json:"removed"`
Modified []string `json:"modified"`
}
PayloadCommit represents a commit
type PayloadCommitVerification ¶
type PayloadCommitVerification struct {
Verified bool `json:"verified"`
Reason string `json:"reason"`
Signature string `json:"signature"`
Payload string `json:"payload"`
}
PayloadCommitVerification represents the GPG verification of a commit
type PayloadUser ¶
type PayloadUser struct {
// Full name of the commit author
Name string `json:"name"`
Email string `json:"email"`
UserName string `json:"username"`
}
PayloadUser represents the author or committer of a commit
type Permission ¶
type Permission struct {
Admin bool `json:"admin"`
Push bool `json:"push"`
Pull bool `json:"pull"`
}
Permission represents a set of permissions
type PublicKey ¶
type PublicKey struct {
ID int64 `json:"id"`
Key string `json:"key"`
URL string `json:"url,omitempty"`
Title string `json:"title,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
Created time.Time `json:"created_at,omitempty"`
Owner *User `json:"user,omitempty"`
ReadOnly bool `json:"read_only,omitempty"`
KeyType string `json:"key_type,omitempty"`
}
PublicKey publickey is a user key to push code to repository
type PullRequest ¶
type PullRequest struct {
ID int64 `json:"id"`
URL string `json:"url"`
Index int64 `json:"number"`
Poster *User `json:"user"`
Title string `json:"title"`
Body string `json:"body"`
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
Assignee *User `json:"assignee"`
Assignees []*User `json:"assignees"`
State StateType `json:"state"`
IsLocked bool `json:"is_locked"`
Comments int `json:"comments"`
Draft bool `json:"draft"`
HTMLURL string `json:"html_url"`
DiffURL string `json:"diff_url"`
PatchURL string `json:"patch_url"`
Mergeable bool `json:"mergeable"`
HasMerged bool `json:"merged"`
Merged *time.Time `json:"merged_at"`
MergedCommitID *string `json:"merge_commit_sha"`
MergedBy *User `json:"merged_by"`
AllowMaintainerEdit bool `json:"allow_maintainer_edit"`
Base *PRBranchInfo `json:"base"`
Head *PRBranchInfo `json:"head"`
MergeBase string `json:"merge_base"`
Deadline *time.Time `json:"due_date"`
Created *time.Time `json:"created_at"`
Updated *time.Time `json:"updated_at"`
Closed *time.Time `json:"closed_at"`
}
PullRequest represents a pull request
type PullRequestDiffOptions ¶
type PullRequestDiffOptions struct {
// Include binary file changes when requesting a .diff
Binary bool
}
PullRequestDiffOptions options for GET /repos/<owner>/<repo>/pulls/<idx>.[diff|patch]
func (PullRequestDiffOptions) QueryEncode ¶
func (o PullRequestDiffOptions) QueryEncode() string
QueryEncode converts the options to a query string
type PullRequestMeta ¶
PullRequestMeta PR info if an issue is a PR
type PullReview ¶
type PullReview struct {
ID int64 `json:"id"`
Reviewer *User `json:"user"`
ReviewerTeam *Team `json:"team"`
State ReviewStateType `json:"state"`
Body string `json:"body"`
CommitID string `json:"commit_id"`
// Stale indicates if the pull has changed since the review
Stale bool `json:"stale"`
// Official indicates if the review counts towards the required approval limit, if PR base is a protected branch
Official bool `json:"official"`
Dismissed bool `json:"dismissed"`
CodeCommentsCount int `json:"comments_count"`
Submitted time.Time `json:"submitted_at"`
HTMLURL string `json:"html_url"`
HTMLPullURL string `json:"pull_request_url"`
}
PullReview represents a pull request review
type PullReviewComment ¶
type PullReviewComment struct {
ID int64 `json:"id"`
Body string `json:"body"`
Reviewer *User `json:"user"`
ReviewID int64 `json:"pull_request_review_id"`
Resolver *User `json:"resolver"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Path string `json:"path"`
CommitID string `json:"commit_id"`
OrigCommitID string `json:"original_commit_id"`
DiffHunk string `json:"diff_hunk"`
LineNum uint64 `json:"position"`
OldLineNum uint64 `json:"original_position"`
HTMLURL string `json:"html_url"`
HTMLPullURL string `json:"pull_request_url"`
}
PullReviewComment represents a comment on a pull request review
type PullReviewRequestOptions ¶
type PullReviewRequestOptions struct {
Reviewers []string `json:"reviewers"`
TeamReviewers []string `json:"team_reviewers"`
}
PullReviewRequestOptions are options to add or remove pull review requests
type PushMirrorResponse ¶
type PushMirrorResponse struct {
Created string `json:"created"`
Interval string `json:"interval"`
LastError string `json:"last_error"`
LastUpdate string `json:"last_update"`
RemoteAddress string `json:"remote_address"`
RemoteName string `json:"remote_name"`
RepoName string `json:"repo_name"`
SyncONCommit bool `json:"sync_on_commit"`
}
PushMirrorResponse returns a git push mirror
type QuotaSubject ¶
type QuotaSubject string
QuotaSubject represents a quota limit subject for use with CheckMyQuota.
const ( QuotaSubjectNone QuotaSubject = "none" QuotaSubjectSizeAll QuotaSubject = "size:all" QuotaSubjectSizeReposAll QuotaSubject = "size:repos:all" QuotaSubjectSizeReposPublic QuotaSubject = "size:repos:public" QuotaSubjectSizeReposPrivate QuotaSubject = "size:repos:private" QuotaSubjectSizeGitAll QuotaSubject = "size:git:all" QuotaSubjectSizeGitLFS QuotaSubject = "size:git:lfs" QuotaSubjectSizeAssetsAll QuotaSubject = "size:assets:all" QuotaSubjectSizeAssetsAttachmentsAll QuotaSubject = "size:assets:attachments:all" QuotaSubjectSizeAssetsAttachmentsIssues QuotaSubject = "size:assets:attachments:issues" QuotaSubjectSizeAssetsAttachmentsReleases QuotaSubject = "size:assets:attachments:releases" QuotaSubjectSizeAssetsArtifacts QuotaSubject = "size:assets:artifacts" QuotaSubjectSizeAssetsPackagesAll QuotaSubject = "size:assets:packages:all" QuotaSubjectSizeWiki QuotaSubject = "size:assets:wiki" )
type Reaction ¶
type Reaction struct {
User *User `json:"user"`
Reaction string `json:"content"`
Created time.Time `json:"created_at"`
}
Reaction contain one reaction
type Reference ¶
type Reference struct {
Ref string `json:"ref"`
URL string `json:"url"`
Object *GitObject `json:"object"`
}
Reference represents a Git reference.
type RegisterRunnerOption ¶
type RegisterRunnerOption struct {
// Name of the runner to register. It does not have to be unique.
Name string `json:"name"`
// Description provides optional details about this runner.
Description string `json:"description,omitempty"`
// Ephemeral registers a runner that only takes a single job before being
// removed. See https://forgejo.org/docs/latest/admin/actions/security/#ephemeral-runner
Ephemeral bool `json:"ephemeral,omitempty"`
}
RegisterRunnerOption options for registering a new runner
type RegisterRunnerResponse ¶
type RegisterRunnerResponse struct {
ID int64 `json:"id"`
Token string `json:"token"`
UUID string `json:"uuid"`
}
RegisterRunnerResponse contains the details of the just-registered runner, including the token needed to configure the runner daemon.
type Release ¶
type Release struct {
ID int64 `json:"id"`
TagName string `json:"tag_name"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
TarURL string `json:"tarball_url"`
ZipURL string `json:"zipball_url"`
IsDraft bool `json:"draft"`
IsPrerelease bool `json:"prerelease"`
CreatedAt time.Time `json:"created_at"`
PublishedAt time.Time `json:"published_at"`
Publisher *User `json:"author"`
Attachments []*Attachment `json:"assets"`
}
Release represents a repository release
type RenameOrgOption ¶
type RenameOrgOption struct {
// NewName is the new username for this org. It cannot already be in use by any other user.
NewName string `json:"new_name"`
}
RenameOrgOption options for renaming an organization
type RenameUserOption ¶
type RenameUserOption struct {
// NewName is the new username for this user. It cannot already be in use
// by any other user.
NewName string `json:"new_username"`
}
RenameUserOption options for renaming a user
type ReplaceFlagsOption ¶
type ReplaceFlagsOption struct {
Flags []string `json:"flags"`
}
ReplaceFlagsOption options when replacing the flags of a repository
type RepoCommit ¶
type RepoCommit struct {
URL string `json:"url"`
Author *CommitUser `json:"author"`
Committer *CommitUser `json:"committer"`
Message string `json:"message"`
Tree *CommitMeta `json:"tree"`
Verification *PayloadCommitVerification `json:"verification"`
}
RepoCommit contains information of a commit in the context of a repository.
type RepoType ¶
type RepoType string
RepoType represent repo type
const ( // RepoTypeNone dont specify a type RepoTypeNone RepoType = "" // RepoTypeSource is the default repo type RepoTypeSource RepoType = "source" // RepoTypeFork is a repo witch was forked from an other one RepoTypeFork RepoType = "fork" // RepoTypeMirror represents an mirror repo RepoTypeMirror RepoType = "mirror" )
type RepoUnitType ¶
type RepoUnitType string
RepoUnitType represent all unit types of a repo forgejo currently offer
const ( // RepoUnitCode represent file view of a repository RepoUnitCode RepoUnitType = "repo.code" // RepoUnitIssues represent issues of a repository RepoUnitIssues RepoUnitType = "repo.issues" // RepoUnitPulls represent pulls of a repository RepoUnitPulls RepoUnitType = "repo.pulls" // RepoUnitExtIssues represent external issues of a repository RepoUnitExtIssues RepoUnitType = "repo.ext_issues" // RepoUnitWiki represent wiki of a repository RepoUnitWiki RepoUnitType = "repo.wiki" // RepoUnitExtWiki represent external wiki of a repository RepoUnitExtWiki RepoUnitType = "repo.ext_wiki" // RepoUnitReleases represent releases of a repository RepoUnitReleases RepoUnitType = "repo.releases" // RepoUnitProjects represent projects of a repository RepoUnitProjects RepoUnitType = "repo.projects" // RepoUnitPackages represents packages of a repository RepoUnitPackages RepoUnitType = "repo.packages" // RepoUnitActions represents actions of a repository RepoUnitActions RepoUnitType = "repo.actions" )
func (RepoUnitType) String ¶
func (r RepoUnitType) String() string
type Repository ¶
type Repository struct {
ID int64 `json:"id"`
Owner *User `json:"owner"`
Name string `json:"name"`
FullName string `json:"full_name"`
Description string `json:"description"`
Empty bool `json:"empty"`
Private bool `json:"private"`
Fork bool `json:"fork"`
Template bool `json:"template"`
Parent *Repository `json:"parent"`
Mirror bool `json:"mirror"`
Size int `json:"size"`
HTMLURL string `json:"html_url"`
SSHURL string `json:"ssh_url"`
CloneURL string `json:"clone_url"`
OriginalURL string `json:"original_url"`
Website string `json:"website"`
Stars int `json:"stars_count"`
Forks int `json:"forks_count"`
Watchers int `json:"watchers_count"`
OpenIssues int `json:"open_issues_count"`
OpenPulls int `json:"open_pr_counter"`
Releases int `json:"release_counter"`
DefaultBranch string `json:"default_branch"`
Archived bool `json:"archived"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Permissions *Permission `json:"permissions,omitempty"`
HasIssues bool `json:"has_issues"`
InternalTracker *InternalTracker `json:"internal_tracker,omitempty"`
ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"`
HasWiki bool `json:"has_wiki"`
ExternalWiki *ExternalWiki `json:"external_wiki,omitempty"`
HasPullRequests bool `json:"has_pull_requests"`
HasProjects bool `json:"has_projects"`
HasReleases bool `json:"has_releases,omitempty"`
HasPackages bool `json:"has_packages,omitempty"`
HasActions bool `json:"has_actions,omitempty"`
IgnoreWhitespaceConflicts bool `json:"ignore_whitespace_conflicts"`
AllowMerge bool `json:"allow_merge_commits"`
AllowRebase bool `json:"allow_rebase"`
AllowRebaseMerge bool `json:"allow_rebase_explicit"`
AllowSquash bool `json:"allow_squash_merge"`
AvatarURL string `json:"avatar_url"`
Internal bool `json:"internal"`
MirrorInterval string `json:"mirror_interval"`
MirrorUpdated time.Time `json:"mirror_updated,omitempty"`
DefaultMergeStyle MergeStyle `json:"default_merge_style"`
}
Repository represents a repository
type RepositoryMeta ¶
type RepositoryMeta struct {
ID int64 `json:"id"`
Name string `json:"name"`
Owner string `json:"owner"`
FullName string `json:"full_name"`
}
RepositoryMeta basic repository information
type ReviewStateType ¶
type ReviewStateType string
ReviewStateType review state type
const ( // ReviewStateApproved pr is approved ReviewStateApproved ReviewStateType = "APPROVED" // ReviewStatePending pr state is pending ReviewStatePending ReviewStateType = "PENDING" // ReviewStateComment is a comment review ReviewStateComment ReviewStateType = "COMMENT" // ReviewStateRequestChanges changes for pr are requested ReviewStateRequestChanges ReviewStateType = "REQUEST_CHANGES" // ReviewStateRequestReview review is requested from user ReviewStateRequestReview ReviewStateType = "REQUEST_REVIEW" // ReviewStateUnknown state of pr is unknown ReviewStateUnknown ReviewStateType = "" )
type RunnerRegistrationToken ¶
type RunnerRegistrationToken struct {
Token string `json:"token"`
}
RunnerRegistrationToken represents a runner registration token
type SearchRepoOptions ¶
type SearchRepoOptions struct {
ListOptions
// The keyword to query
Keyword string
// Limit search to repositories with keyword as topic
KeywordIsTopic bool
// Include search of keyword within repository description
KeywordInDescription bool
// Repo Owner
OwnerID int64
// Stared By UserID
StarredByUserID int64
// pubic, private or all repositories (defaults to all)
IsPrivate *bool
// archived, non-archived or all repositories (defaults to all)
IsArchived *bool
// Exclude template repos from search
ExcludeTemplate bool
// Filter by "fork", "source", "mirror"
Type RepoType
// sort repos by attribute. Supported values are "alpha", "created", "updated", "size", and "id". Default is "alpha"
Sort string
// sort order, either "asc" (ascending) or "desc" (descending). Default is "asc", ignored if "sort" is not specified.
Order string
// Repo owner to prioritize in the results
PrioritizedByOwnerID int64
/*
Cover EdgeCases
*/
// if set all other options are ignored and this string is used as query
RawQuery string
}
SearchRepoOptions options for searching repositories
func (*SearchRepoOptions) QueryEncode ¶
func (opt *SearchRepoOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type SearchTeamsOptions ¶
type SearchTeamsOptions struct {
ListOptions
Query string
IncludeDescription bool
}
SearchTeamsOptions options for searching teams.
type SearchTopicsOptions ¶
type SearchTopicsOptions struct {
ListOptions
// Keyword to search for
Query string
}
SearchTopicsOptions options for searching topics
func (*SearchTopicsOptions) QueryEncode ¶
func (opt *SearchTopicsOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type SearchUsersOption ¶
type SearchUsersOption struct {
ListOptions
KeyWord string
}
SearchUsersOption options for SearchUsers
func (*SearchUsersOption) QueryEncode ¶
func (opt *SearchUsersOption) QueryEncode() string
QueryEncode turns options into querystring argument
type SetUserQuotaGroupsOption ¶
type SetUserQuotaGroupsOption struct {
// Groups is the complete list of quota groups the user shall be a member of.
Groups []string `json:"groups"`
}
SetUserQuotaGroupsOption options for setting a user's quota groups
type Status ¶
type Status struct {
ID int64 `json:"id"`
State StatusState `json:"status"`
TargetURL string `json:"target_url"`
Description string `json:"description"`
URL string `json:"url"`
Context string `json:"context"`
Creator *User `json:"creator"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
}
Status holds a single Status of a single Commit
type StatusState ¶
type StatusState string
StatusState holds the state of a Status It can be "pending", "success", "error", "failure", and "warning"
const ( // StatusPending is for when the Status is Pending StatusPending StatusState = "pending" // StatusSuccess is for when the Status is Success StatusSuccess StatusState = "success" // StatusError is for when the Status is Error StatusError StatusState = "error" // StatusFailure is for when the Status is Failure StatusFailure StatusState = "failure" // StatusWarning is for when the Status is Warning StatusWarning StatusState = "warning" )
type StopWatch ¶
type StopWatch struct {
Created time.Time `json:"created"`
Seconds int64 `json:"seconds"`
Duration string `json:"duration"`
IssueIndex int64 `json:"issue_index"`
IssueTitle string `json:"issue_title"`
RepoOwnerName string `json:"repo_owner_name"`
RepoName string `json:"repo_name"`
}
StopWatch represents a running stopwatch of an issue / pr
type SubmitPullReviewOptions ¶
type SubmitPullReviewOptions struct {
State ReviewStateType `json:"event"`
Body string `json:"body"`
}
SubmitPullReviewOptions are options to submit a pending pull review
func (SubmitPullReviewOptions) Validate ¶
func (opt SubmitPullReviewOptions) Validate() error
Validate the SubmitPullReviewOptions struct
type SyncForkInfo ¶
type SyncForkInfo struct {
Allowed bool `json:"allowed"`
ForkCommit string `json:"fork_commit"`
BaseCommit string `json:"base_commit"`
CommitsBehind int `json:"commits_behind"`
}
SyncForkInfo has information about syncing a fork branch with its base branch
type Tag ¶
type Tag struct {
Name string `json:"name"`
Message string `json:"message"`
ID string `json:"id"`
Commit *CommitMeta `json:"commit"`
ZipballURL string `json:"zipball_url"`
TarballURL string `json:"tarball_url"`
}
Tag represents a repository tag
type TagProtection ¶
type TagProtection struct {
ID int64 `json:"id"`
NamePattern string `json:"name_pattern"`
WhitelistUsernames []string `json:"whitelist_usernames"`
WhitelistTeams []string `json:"whitelist_teams"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
}
TagProtection represents a tag protection for a repository
type Team ¶
type Team struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Organization *Organization `json:"organization"`
Permission AccessMode `json:"permission"`
CanCreateOrgRepo bool `json:"can_create_org_repo"`
IncludesAllRepositories bool `json:"includes_all_repositories"`
// example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.pulls":"owner","repo.releases":"none","repo.wiki":"admin","repo.ext_wiki":"none","repo.projects":"none","repo.packages":"none","repo.actions":"none"}
UnitsMap map[string]string `json:"units_map"`
// Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
Units []RepoUnitType `json:"units"`
}
Team represents a team in an organization
type TeamSearchResults ¶
type TeamSearchResults struct {
OK bool `json:"ok"`
Error string `json:"error"`
Data []*Team `json:"data"`
}
TeamSearchResults is the JSON struct that is returned from Team search API.
type TimelineComment ¶
type TimelineComment struct {
ID int64 `json:"id"`
HTMLURL string `json:"html_url"`
PRURL string `json:"pull_request_url"`
IssueURL string `json:"issue_url"`
Poster *User `json:"user"`
Body string `json:"body"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Type string `json:"type"`
Assignee *User `json:"assignee"`
AssigneeTeam *Team `json:"assignee_team"`
RemovedAssignee bool `json:"removed_assignee"`
ResolveDoer *User `json:"resolve_doer"`
Label *Label `json:"label"`
Milestone *Milestone `json:"milestone"`
OldMilestone *Milestone `json:"old_milestone"`
ProjectID int64 `json:"project_id"`
OldProjectID int64 `json:"old_project_id"`
NewTitle string `json:"new_title"`
OldTitle string `json:"old_title"`
NewRef string `json:"new_ref"`
OldRef string `json:"old_ref"`
DependentIssue *Issue `json:"dependent_issue"`
RefIssue *Issue `json:"ref_issue"`
RefComment *Comment `json:"ref_comment"`
RefAction string `json:"ref_action"`
RefCommitSHA string `json:"ref_commit_sha"`
ReviewID int64 `json:"review_id"`
TrackedTime *TrackedTime `json:"tracked_time"`
}
TimelineComment represents a timeline comment (comment of any type) on an issue or pull request
type TopicResponse ¶
type TopicResponse struct {
ID int64 `json:"id"`
Name string `json:"topic_name"`
RepoCount int `json:"repo_count"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
TopicResponse for returning topics
type TrackedTime ¶
type TrackedTime struct {
ID int64 `json:"id"`
Created time.Time `json:"created"`
// Time in seconds
Time int64 `json:"time"`
// deprecated (only for backwards compatibility)
UserID int64 `json:"user_id"`
UserName string `json:"user_name"`
// deprecated (only for backwards compatibility)
IssueID int64 `json:"issue_id"`
Issue *Issue `json:"issue"`
}
TrackedTime worked time for an issue / pr
type TransferRepoOption ¶
type TransferRepoOption struct {
// required: true
NewOwner string `json:"new_owner"`
// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
TeamIDs *[]int64 `json:"team_ids"`
}
TransferRepoOption options when transfer a repository's ownership
type TrustModel ¶
type TrustModel string
TrustModel represent how git signatures are handled in a repository
const ( // TrustModelDefault use TM set by global config TrustModelDefault TrustModel = "default" // TrustModelCollaborator gpg signature has to be owned by a repo collaborator TrustModelCollaborator TrustModel = "collaborator" // TrustModelCommitter gpg signature has to match committer TrustModelCommitter TrustModel = "committer" // TrustModelCollaboratorCommitter gpg signature has to match committer and owned by a repo collaborator TrustModelCollaboratorCommitter TrustModel = "collaboratorcommitter" )
type UpdateBranchRepoOption ¶
type UpdateBranchRepoOption struct {
// New branch name
Name string `json:"name"`
}
UpdateBranchRepoOption options when renaming a branch
type UpdateFileOptions ¶
type UpdateFileOptions struct {
FileOptions
// sha is the SHA for the file that already exists
// required: true
SHA string `json:"sha"`
// content must be base64 encoded
// required: true
Content string `json:"content"`
// from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL
FromPath string `json:"from_path"`
}
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)
type UpdateOrgAvatarOption ¶
type UpdateOrgAvatarOption struct {
// Image must be base64 encoded
Image string `json:"image"`
}
UpdateOrgAvatarOption options for updating an organization's avatar
type UpdatePullRequestOptions ¶
type UpdatePullRequestOptions struct {
// Style is how to update the pull request, either "merge" or "rebase". Defaults to "merge"
Style string
}
UpdatePullRequestOptions options for updating a pull request by merging its base branch into its head branch
type UpdateRepoAvatarOption ¶
type UpdateRepoAvatarOption struct {
// image must be base64 encoded
Image string `json:"image"`
}
UpdateRepoAvatarOption options when updating a repository's avatar
type UpdateUserAvatarOption ¶
type UpdateUserAvatarOption struct {
// Image must be base64 encoded image data.
Image string `json:"image"`
}
UpdateUserAvatarOption options for updating the authenticated user's avatar
type User ¶
type User struct {
// the user's id
ID int64 `json:"id"`
// the user's username
UserName string `json:"login"`
// The login_name of non local users (e.g. LDAP / OAuth / SMTP)
LoginName string `json:"login_name"`
// The ID of the Authentication Source for non local users.
SourceID int64 `json:"source_id"`
// the user's full name
FullName string `json:"full_name"`
Email string `json:"email"`
// URL to the user's page
HTMLURL string `json:"html_url"`
// URL to the user's avatar
AvatarURL string `json:"avatar_url"`
// User locale
Language string `json:"language"`
// Is the user an administrator
IsAdmin bool `json:"is_admin"`
// Date and Time of last login
LastLogin time.Time `json:"last_login"`
// Date and Time of user creation
Created time.Time `json:"created"`
// Is user restricted
Restricted bool `json:"restricted"`
// Is user active
IsActive bool `json:"active"`
// Is user login prohibited
ProhibitLogin bool `json:"prohibit_login"`
// the user's location
Location string `json:"location"`
// the user's website
Website string `json:"website"`
// the user's description
Description string `json:"description"`
// User visibility level option
Visibility VisibleType `json:"visibility"`
// user counts
FollowerCount int `json:"followers_count"`
FollowingCount int `json:"following_count"`
StarredRepoCount int `json:"starred_repos_count"`
}
User represents a user
type UserHeatmapData ¶
type UserHeatmapData struct {
Timestamp int64 `json:"timestamp"`
Contributions int64 `json:"contributions"`
}
UserHeatmapData represents one point of a user's contribution heatmap: the number of contributions made at a given Unix timestamp.
type UserSettings ¶
type UserSettings struct {
FullName string `json:"full_name"`
Website string `json:"website"`
Description string `json:"description"`
Location string `json:"location"`
Language string `json:"language"`
Theme string `json:"theme"`
DiffViewStyle string `json:"diff_view_style"`
// Privacy
HideEmail bool `json:"hide_email"`
HideActivity bool `json:"hide_activity"`
}
UserSettings represents user settings
type UserSettingsOptions ¶
type UserSettingsOptions struct {
FullName *string `json:"full_name,omitempty"`
Website *string `json:"website,omitempty"`
Description *string `json:"description,omitempty"`
Location *string `json:"location,omitempty"`
Language *string `json:"language,omitempty"`
Theme *string `json:"theme,omitempty"`
DiffViewStyle *string `json:"diff_view_style,omitempty"`
// Privacy
HideEmail *bool `json:"hide_email,omitempty"`
HideActivity *bool `json:"hide_activity,omitempty"`
}
UserSettingsOptions represents options to change user settings
type VerifyGPGKeyOption ¶
type VerifyGPGKeyOption struct {
// KeyID is the ID of the GPG key being verified.
KeyID string `json:"key_id"`
// Signature is the armored signature produced by signing the token from
// GetGPGKeyVerificationToken with the key being verified.
Signature string `json:"armored_signature"`
}
VerifyGPGKeyOption options for verifying a GPG key
type VisibleType ¶
type VisibleType string
VisibleType defines the visibility
const ( // VisibleTypePublic Visible for everyone VisibleTypePublic VisibleType = "public" // VisibleTypeLimited Visible for every connected user VisibleTypeLimited VisibleType = "limited" // VisibleTypePrivate Visible only for organization's members VisibleTypePrivate VisibleType = "private" )
type WatchInfo ¶
type WatchInfo struct {
Subscribed bool `json:"subscribed"`
Ignored bool `json:"ignored"`
Reason interface{} `json:"reason"`
CreatedAt time.Time `json:"created_at"`
URL string `json:"url"`
RepositoryURL string `json:"repository_url"`
}
WatchInfo represents an API watch status of one repository
type WikiCommit ¶
type WikiCommit struct {
ID string `json:"sha"`
Author *CommitUser `json:"author"`
Committer *CommitUser `json:"commiter"`
Message string `json:"message"`
}
WikiCommit page commit/revision
type WikiCommitList ¶
type WikiCommitList struct {
WikiCommits []*WikiCommit `json:"commits"`
Count int64 `json:"count"`
}
WikiCommitList commit/revision list
type WikiPage ¶
type WikiPage struct {
*WikiPageMetaData
// Page content, base64 encoded
ContentBase64 string `json:"content_base64"`
CommitCount int64 `json:"commit_count"`
Sidebar string `json:"sidebar"`
}
WikiPage a wiki page
type WikiPageMetaData ¶
type WikiPageMetaData struct {
Title string `json:"title"`
HTMLURL string `json:"html_url"`
SubURL string `json:"sub_url"`
LastCommit *WikiCommit `json:"last_commit"`
}
WikiPageMetaData wiki page meta information
Source Files
¶
- action.go
- activitypub.go
- activitypub_httpsign.go
- admin_action_runner.go
- admin_cron.go
- admin_email.go
- admin_hook.go
- admin_org.go
- admin_quota_group.go
- admin_quota_rule.go
- admin_repo.go
- admin_unadopted.go
- admin_user.go
- agent.go
- attachment.go
- client.go
- doc.go
- fork.go
- git_blob.go
- git_hook.go
- gitignore_template.go
- helper.go
- hook.go
- hook_validate.go
- httpsign.go
- issue.go
- issue_attachment.go
- issue_comment.go
- issue_comment_attachment.go
- issue_deadline.go
- issue_dependency.go
- issue_label.go
- issue_milestone.go
- issue_pin.go
- issue_reaction.go
- issue_stopwatch.go
- issue_subscription.go
- issue_template.go
- issue_timeline.go
- issue_tracked_time.go
- label_template.go
- license_template.go
- list_options.go
- markup.go
- nodeinfo.go
- notifications.go
- oauth2.go
- org.go
- org_action.go
- org_activity.go
- org_avatar.go
- org_block.go
- org_label.go
- org_member.go
- org_quota.go
- org_team.go
- package.go
- pull.go
- pull_review.go
- release.go
- repo.go
- repo_action.go
- repo_activity.go
- repo_avatar.go
- repo_branch.go
- repo_branch_protection.go
- repo_collaborator.go
- repo_commit.go
- repo_compare.go
- repo_file.go
- repo_flags.go
- repo_git_notes.go
- repo_issue_config.go
- repo_issue_pin.go
- repo_key.go
- repo_migrate.go
- repo_mirror.go
- repo_refs.go
- repo_stars.go
- repo_sync_fork.go
- repo_tag.go
- repo_tag_protection.go
- repo_team.go
- repo_template.go
- repo_topics.go
- repo_transfer.go
- repo_tree.go
- repo_watch.go
- repo_wiki.go
- secret.go
- settings.go
- signing_key.go
- status.go
- user.go
- user_action.go
- user_activity.go
- user_app.go
- user_avatar.go
- user_block.go
- user_email.go
- user_follow.go
- user_gpgkey.go
- user_key.go
- user_quota.go
- user_search.go
- user_settings.go
- version.go