handler

package
v0.0.0-...-88eca32 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGithubOAuth

func GetGithubOAuth(c echo.Context, client *GitHubClient) error

func GetInfos

func GetInfos(c echo.Context) error

GetInfos returns a JSON response with the server infos

func GetOAuthCallback

func GetOAuthCallback(c echo.Context, client *GitHubClient) error

func GetVersion

func GetVersion(c echo.Context) error

GetVersion returns the current version

func PostDeviceCode

func PostDeviceCode(c echo.Context, client *GitHubClient) error

func PostDeviceToken

func PostDeviceToken(c echo.Context, client *GitHubClient) error

Types

type DeviceCodeResponse

type DeviceCodeResponse struct {
	DeviceCode              string `json:"device_code"`
	UserCode                string `json:"user_code"`
	VerificationURI         string `json:"verification_uri"`
	VerificationURIComplete string `json:"verification_uri_complete"`
	ExpiresIn               int    `json:"expires_in"`
	Interval                int    `json:"interval"`
}

DeviceCodeResponse represents the response from the device code endpoint

type GitHubClient

type GitHubClient struct {
	ID            string
	Secret        string
	WebhookSecret string
}

type GithubRelease

type GithubRelease struct {
	TagName string `json:"tag_name"`
}

type OAuthResponse

type OAuthResponse struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	Scope       string `json:"scope"`
}

type ServerInfo

type ServerInfo struct {
	Uptime  string `json:"uptime"`
	Version string `json:"version"`
}

type VersionService

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

VersionService handles version checking and scheduling

func NewVersionService

func NewVersionService() *VersionService

func (*VersionService) Start

func (vs *VersionService) Start()

func (*VersionService) Stop

func (vs *VersionService) Stop()

Jump to

Keyboard shortcuts

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