server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRouter

func SetupRouter(apiHandler *APIHandler) *chi.Mux

Types

type APIHandler

type APIHandler struct {
	Dispatcher           *backup.BackupDispatcher
	Db                   *database.Database
	RepositoryAdder      backup.RepositoryAdder
	BackupRepoNameGetter database.BackupRepoNameGetter
	BackupReposGetter    database.BackupReposGetter
	BackupRepoInserter   database.BackupRepoInserter
	BackupRepoProcessor  backuprepo.BackupRepoProcessor
	TemplatesDir         string
	StaticDir            string
}

func NewAPIHandler

func NewAPIHandler(dispatcher *backup.BackupDispatcher, db *database.Database, templatesDir string) *APIHandler

func (*APIHandler) HandleCreateBackupRepo

func (a *APIHandler) HandleCreateBackupRepo(w http.ResponseWriter, r *http.Request)

func (*APIHandler) HandleDelete

func (a *APIHandler) HandleDelete(w http.ResponseWriter, r *http.Request)

func (*APIHandler) HandleGetBackupRepoByName

func (a *APIHandler) HandleGetBackupRepoByName(w http.ResponseWriter, r *http.Request)

func (*APIHandler) HandleGetBackupRepos

func (a *APIHandler) HandleGetBackupRepos(w http.ResponseWriter, r *http.Request)

func (*APIHandler) HandleIndex

func (a *APIHandler) HandleIndex(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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