api

package
v0.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDuplicate = errors.New("duplicate record")
)

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(o Opts) *API

func (*API) AddToCacheHandler

func (api *API) AddToCacheHandler(w http.ResponseWriter, req bunrouter.Request) error

func (*API) GetFromCacheHandler

func (api *API) GetFromCacheHandler(w http.ResponseWriter, req bunrouter.Request) error

func (*API) MetricsHandler

func (api *API) MetricsHandler() http.HandlerFunc

func (*API) USSDProxyHandler

func (api *API) USSDProxyHandler() http.HandlerFunc

func (*API) UpdateCacheHandler

func (api *API) UpdateCacheHandler(w http.ResponseWriter, req bunrouter.Request) error

type Opts

type Opts struct {
	Cache cache.Cache
	Logg  logf.Logger
	Proxy *proxy.Proxy
}

Jump to

Keyboard shortcuts

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