gitea

package module
v0.0.0-...-e35caf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 6 Imported by: 0

README

Gitea SDK for Go

Release Go Report Card GoDoc

This project acts as a client SDK implementation written in Go to interact with the Gitea API implementation. For further informations take a look at the current documentation.

Note: function arguments are escaped by the SDK.

Use it

import "code.gitea.io/sdk/gitea"

Version Requirements

  • go >= 1.23
  • gitea >= 1.11

Contributing

Fork -> Patch -> Push -> Pull Request

Authors

License

This project is under the MIT License. See the LICENSE file for the full license text.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeFileOperation

type ChangeFileOperation struct {
	Operation string `json:"operation"` // create, update, upload, rename, delete
	Path      string `json:"path"`
	Content   string `json:"content"`             // base64 encoded for create/update
	SHA       string `json:"sha,omitempty"`       // required for update/delete
	FromPath  string `json:"from_path,omitempty"` // for rename
}

ChangeFileOperation represents a file operation in batch

type ChangeFilesOptions

type ChangeFilesOptions struct {
	Files     []*ChangeFileOperation `json:"files"`
	Message   string                 `json:"message"`
	Branch    string                 `json:"branch,omitempty"`
	NewBranch string                 `json:"new_branch,omitempty"`
	ForcePush bool                   `json:"force_push,omitempty"`
	Author    Identity               `json:"author"`
	Committer Identity               `json:"committer"`
	Dates     CommitDateOptions      `json:"dates"`
	Signoff   bool                   `json:"signoff,omitempty"`
}

ChangeFilesOptions options for batch file operations

type IssueConfigValidation

type IssueConfigValidation struct {
	Valid   bool   `json:"valid"`
	Message string `json:"message"`
}

IssueConfigValidation represents the validation result for issue config

type ListRepoActivityFeedsOptions

type ListRepoActivityFeedsOptions struct {
	ListOptions
	Date string `json:"date"` // the date of the activities to be found (format: YYYY-MM-DD)
}

ListRepoActivityFeedsOptions options for listing repository activity feeds

type MergeUpstreamRequest

type MergeUpstreamRequest struct {
	Branch string `json:"branch"`
	FfOnly bool   `json:"ff_only"`
}

MergeUpstreamRequest options for merging upstream

type MergeUpstreamResponse

type MergeUpstreamResponse struct {
	MergeStyle string `json:"merge_type"`
}

MergeUpstreamResponse represents the response from merging upstream

type NewIssuePinsAllowed

type NewIssuePinsAllowed struct {
	Issues       bool `json:"issues"`
	PullRequests bool `json:"pull_requests"`
}

NewIssuePinsAllowed represents whether new issue/PR pins are allowed

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 represents a topic

type TopicSearchOptions

type TopicSearchOptions struct {
	ListOptions
	Query string `json:"q"` // query string
}

TopicSearchOptions options for searching topics

type TopicSearchResult

type TopicSearchResult struct {
	Topics []*TopicResponse `json:"topics"`
}

TopicSearchResult represents a topic search result

Directories

Path Synopsis
gitea module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL