gitea

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCookie

func ValidateCookie(opts ScanOptions) error

ValidateCookie validates the provided cookie by making a test request.

Types

type ActionArtifact

type ActionArtifact struct {
	ID                 int64  `json:"id"`
	Name               string `json:"name"`
	Size               int64  `json:"size_in_bytes"`
	CreatedAt          string `json:"created_at"`
	ExpiredAt          string `json:"expired_at"`
	WorkflowRunID      int64  `json:"workflow_run_id"`
	ArchiveDownloadURL string `json:"archive_download_url"`
}

type ActionArtifactsResponse

type ActionArtifactsResponse struct {
	TotalCount int64            `json:"total_count"`
	Artifacts  []ActionArtifact `json:"artifacts"`
}

type ActionJob

type ActionJob struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	Status      string `json:"status"`
	Conclusion  string `json:"conclusion"`
	StartedAt   string `json:"started_at"`
	CompletedAt string `json:"completed_at"`
	RunID       int64  `json:"run_id"`
	TaskID      int64  `json:"task_id"`
}

type ActionJobsResponse

type ActionJobsResponse struct {
	TotalCount int64       `json:"total_count"`
	Jobs       []ActionJob `json:"jobs"`
}

type ActionWorkflowRun

type ActionWorkflowRun struct {
	ID         int64  `json:"id"`
	Name       string `json:"name"`
	Title      string `json:"title"`
	Status     string `json:"status"`
	Event      string `json:"event"`
	CreatedAt  string `json:"created_at"`
	UpdatedAt  string `json:"updated_at"`
	RunNumber  int64  `json:"run_number"`
	WorkflowID string `json:"workflow_id"`
	HeadBranch string `json:"head_branch"`
	HeadSha    string `json:"head_sha"`
	URL        string `json:"url"`
	HTMLURL    string `json:"html_url"`
}

func ListWorkflowRuns

func ListWorkflowRuns(client *gitea.Client, repo *gitea.Repository) ([]ActionWorkflowRun, error)

ListWorkflowRuns retrieves workflow runs for a repository.

type ActionWorkflowRunsResponse

type ActionWorkflowRunsResponse struct {
	TotalCount   int64               `json:"total_count"`
	WorkflowRuns []ActionWorkflowRun `json:"workflow_runs"`
}

type AuthTransport

type AuthTransport struct {
	Base  http.RoundTripper
	Token string
}

func (*AuthTransport) RoundTrip

func (t *AuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

type GiteaScanOptions

type GiteaScanOptions struct {
	Token                  string
	GiteaURL               string
	Artifacts              bool
	ConfidenceFilter       []string
	MaxScanGoRoutines      int
	TruffleHogVerification bool
	Owned                  bool
	Organization           string
	Repository             string
	Cookie                 string
	RunsLimit              int
	StartRunID             int64
	MaxArtifactSize        int64
	HitTimeout             time.Duration
	Context                context.Context
	Client                 *gitea.Client
	HttpClient             *retryablehttp.Client
}

type ScanOptions

type ScanOptions = GiteaScanOptions

ScanOptions is an alias for GiteaScanOptions for interface consistency with other providers.

func InitializeOptions

func InitializeOptions(token, giteaURL, repository, organization, cookie, maxArtifactSizeStr string,
	owned, artifacts, truffleHogVerification bool,
	runsLimit int, startRunID int64, maxScanGoRoutines int, confidenceFilter []string, hitTimeout time.Duration) (ScanOptions, error)

InitializeOptions prepares scan options from CLI parameters.

type Scanner

type Scanner interface {
	pkgscanner.BaseScanner
}

func NewScanner

func NewScanner(opts ScanOptions) Scanner

Jump to

Keyboard shortcuts

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