api

package
v1.6.49 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndpointInterface

type EndpointInterface interface {
	GetBasePath() string
	IsEnabled() bool
	HandleRequest(http.ResponseWriter, *http.Request)
}

EndpointInterface is the contract to be able to enable your custom endpoints

func Initialize

Initialize contains all apis that should be enabled

type MapHandler

type MapHandler struct {
	Handlers *map[string]http.HandlerFunc
}

MapHandler is a map to store the available http Handlers

func GenerateHandlerMap

func GenerateHandlerMap(
	configuration configurationtypes.AbstractConfigurationInterface,
	storers []types.Storer,
	surrogateStorage providers.SurrogateInterface,
) *MapHandler

GenerateHandlerMap generate the MapHandler

type SouinAPI

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

SouinAPI object contains informations related to the endpoints

func (*SouinAPI) BulkDelete

func (s *SouinAPI) BulkDelete(key string, purge bool)

BulkDelete allow user to delete multiple items with regexp

func (*SouinAPI) Delete

func (s *SouinAPI) Delete(key string)

Delete will delete a record into the provider cache system and will update the Souin API if enabled

func (*SouinAPI) GetAll

func (s *SouinAPI) GetAll() []string

GetAll will retrieve all stored keys in the provider

func (*SouinAPI) GetBasePath

func (s *SouinAPI) GetBasePath() string

GetBasePath will return the basepath for this resource

func (*SouinAPI) HandleRequest

func (s *SouinAPI) HandleRequest(w http.ResponseWriter, r *http.Request)

HandleRequest will handle the request

func (*SouinAPI) IsEnabled

func (s *SouinAPI) IsEnabled() bool

IsEnabled will return enabled status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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