http

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ancestors

func Ancestors(r *results.PlaceholderRecord, placetype string) []*results.PlaceholderRecord

func AppendStaticAssetHandlers

func AppendStaticAssetHandlers(mux *gohttp.ServeMux) error

func AppendStaticAssetHandlersWithPrefix

func AppendStaticAssetHandlersWithPrefix(mux *gohttp.ServeMux, prefix string) error

func NewAPIHandler

func NewAPIHandler(cl *client.PlaceholderClient, opts *APIHandlerOptions) (gohttp.Handler, error)

func NewSearchHandler

func NewSearchHandler(opts *SearchHandlerOptions) (gohttp.Handler, error)

func PlaceholderReadyHandler added in v0.5.0

func PlaceholderReadyHandler(placeholder_endpoint string, ttl time.Time) (gohttp.Handler, error)

func SearchFiltersWithRequest

func SearchFiltersWithRequest(req *gohttp.Request) ([]filters.Filter, error)

func StaticAssetsHandler

func StaticAssetsHandler() (gohttp.Handler, error)

func StaticAssetsHandlerWithPrefix

func StaticAssetsHandlerWithPrefix(prefix string) (gohttp.Handler, error)

Types

type APIHandlerOptions

type APIHandlerOptions struct {
	EnableSearchAutoComplete bool
	Authenticator            auth.Authenticator
}

func DefaultAPIHandlerOptions

func DefaultAPIHandlerOptions() *APIHandlerOptions

type SearchHandlerOptions

type SearchHandlerOptions struct {
	PlaceholderClient *client.PlaceholderClient
	IsAPIGateway      bool
	Templates         *template.Template
	StaticPrefix      string
	EnableReadyCheck  bool
	ReadyCheckURL     string
	Authenticator     auth.Authenticator
}

type SearchVars

type SearchVars struct {
	StaticPrefix     string
	IsAPIGateway     bool
	Query            string
	Results          *results.SearchResults
	Error            error
	EnableReadyCheck bool
	ReadyCheckURL    string
	Account          *auth.Account
}

Jump to

Keyboard shortcuts

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