frontoffice

package
v1.0.54 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindGetAll

type BindGetAll struct {
	Limit        int    `query:"limit"`
	Offset       int    `query:"offset"`
	UpdatedSince string `query:"updated_since"`
}

type Handler

type Handler struct {
	handlers.BaseHandler
	Repo             *repositories.Repo
	FileStore        backends.FileStore
	IPRanges         string
	IPFilter         *ipfilter.IPFilter
	FrontendUsername string
	FrontendPassword string
}

func (*Handler) BasicAuth

func (h *Handler) BasicAuth(fn func(http.ResponseWriter, *http.Request)) http.HandlerFunc

safe basic auth handling see https://www.alexedwards.net/blog/basic-authentication-in-go

func (*Handler) DownloadFile

func (h *Handler) DownloadFile(w http.ResponseWriter, r *http.Request)

func (*Handler) GetAllDatasets

func (h *Handler) GetAllDatasets(w http.ResponseWriter, r *http.Request)

func (*Handler) GetAllPublications

func (h *Handler) GetAllPublications(w http.ResponseWriter, r *http.Request)

func (*Handler) GetDataset

func (h *Handler) GetDataset(w http.ResponseWriter, r *http.Request)

func (*Handler) GetPublication

func (h *Handler) GetPublication(w http.ResponseWriter, r *http.Request)

type Hits

type Hits struct {
	Limit  int                   `json:"limit"`
	Offset int                   `json:"offset"`
	Total  int                   `json:"total"`
	Hits   []*frontoffice.Record `json:"hits"`
}

Jump to

Keyboard shortcuts

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