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 ¶
func Initialize(c configurationtypes.AbstractConfigurationInterface, storers []types.Storer, surrogateStorage providers.SurrogateInterface) []EndpointInterface
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 ¶
BulkDelete allow user to delete multiple items with regexp
func (*SouinAPI) Delete ¶
Delete will delete a record into the provider cache system and will update the Souin API if enabled The key can be a regexp to delete multiple items
func (*SouinAPI) GetBasePath ¶
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
Click to show internal directories.
Click to hide internal directories.