server

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server represents the HTTP server

func New

func New(storage storage.Storage) (*Server, error)

New creates a new Server instance

func (*Server) AddRepository

func (s *Server) AddRepository(path string) (bool, error)

AddRepository adds a new repository to the server and persists it

func (*Server) GetRepositories

func (s *Server) GetRepositories() (map[string]*git.Repository, error)

GetRepositories returns all repositories

func (*Server) GetRepository

func (s *Server) GetRepository(path string) (*git.Repository, bool, error)

GetRepository returns a repository by path

func (*Server) Router

func (s *Server) Router() http.Handler

Router sets up and returns the HTTP router

Jump to

Keyboard shortcuts

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