forgejo

package
v0.0.0-...-fb6ebef Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client handles communication with a Forgejo instance.

func NewClient

func NewClient(config Config) (*Client, error)

NewClient creates a new Forgejo client.

func (*Client) GetAlerts

func (c *Client) GetAlerts() (*alerts.Manager, error)

GetAlerts retrieves the current alerts from the Forgejo instance.

func (*Client) GetUserInfo

func (c *Client) GetUserInfo() (*UserInfo, error)

GetUserInfo returns information about the authenticated user.

func (*Client) InjectAlertSystem

func (c *Client) InjectAlertSystem() error

InjectAlertSystem injects the alert system into Forgejo's custom assets.

func (*Client) TestConnection

func (c *Client) TestConnection() error

TestConnection tests the connection to the Forgejo instance and validates admin privileges.

func (*Client) UpdateAlerts

func (c *Client) UpdateAlerts(manager *alerts.Manager) error

UpdateAlerts manages alerts and provides deployment instructions (admin-only operation).

type Config

type Config struct {
	BaseURL string
	Token   string
	Timeout time.Duration
}

Config holds configuration for the Forgejo client.

type UserInfo

type UserInfo struct {
	ID       int64  `json:"id"`
	Login    string `json:"login"`
	FullName string `json:"full_name"`
	Email    string `json:"email"`
	IsAdmin  bool   `json:"is_admin"`
}

UserInfo represents user information from Forgejo API.

Jump to

Keyboard shortcuts

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