controller

package
v2.0.0-...-78e41bb Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package controller provides the business logic for the application

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindModulesInProjects

func FindModulesInProjects(projects []model.Project) (result []model.Module, err error)

FindModulesInProjects fetches modules from Github repositories

func GetProjects

func GetProjects(sortBy string) (result []model.Project, err error)

GetProjects fetches projects from Github using the Search API

func GetReleases

func GetReleases(url string) (result []model.Release, err error)

GetReleases fetches releases from a Github repository

func ParseGithubURL

func ParseGithubURL(repo string) (owner string, name string, err error)

ParseGithubURL parses a GitHub repository URL and returns the owner and repository name.

func PrintModulesJSON

func PrintModulesJSON(modules []model.Module)

PrintModulesJSON prints Modules in JSON format

func PrintModulesTable

func PrintModulesTable(modules []model.Module)

PrintModulesTable prints modules in table format

func PrintProjectsJSON

func PrintProjectsJSON(projects []model.Project)

PrintProjectsJSON prints Projects in JSON format

func PrintProjectsTable

func PrintProjectsTable(projects []model.Project)

PrintProjectsTable prints Projects in Table format

func PrintReleasesJSON

func PrintReleasesJSON(releases []model.Release)

PrintReleasesJSON prints Releases in JSON format

func PrintReleasesTable

func PrintReleasesTable(projects []model.Release)

PrintReleasesTable prints Releases in Table format

Types

type ByForks

type ByForks []model.Project

ByForks sorts projects by their forks

func (ByForks) Len

func (a ByForks) Len() int

Implements the sort.Interface for []Project based on Forks

func (ByForks) Less

func (a ByForks) Less(i, j int) bool

func (ByForks) Swap

func (a ByForks) Swap(i, j int)

type ByLastCommit

type ByLastCommit []model.Project

ByLastCommit sorts projects by their last commit date

func (ByLastCommit) Len

func (a ByLastCommit) Len() int

Implements the sort.Interface for []Project based on Last Commit

func (ByLastCommit) Less

func (a ByLastCommit) Less(i, j int) bool

func (ByLastCommit) Swap

func (a ByLastCommit) Swap(i, j int)

type ByStars

type ByStars []model.Project

ByStars sorts projects by their stars

func (ByStars) Len

func (a ByStars) Len() int

Implements the sort.Interface for []Project based on Stars

func (ByStars) Less

func (a ByStars) Less(i, j int) bool

func (ByStars) Swap

func (a ByStars) Swap(i, j int)

Jump to

Keyboard shortcuts

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