proxge

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name      = "proxge"
	Version   = "dev"
	Commit    = "HEAD"
	BuildTime = "now"
)
View Source
var ErrDoesNotExist = errors.New("item does not exist")

Functions

This section is empty.

Types

type GEApi

type GEApi interface {
	PriceById(id int) (int, error)
	Name() string
}

type GECache

type GECache interface {
	Get(id int) (int, time.Duration, error)
	Set(id int, price int) error
	GetTTL() time.Duration
}

type ProxGe

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

func New

func New(cache GECache, router *mux.Router, api ...GEApi) *ProxGe

func (*ProxGe) GetById

func (p *ProxGe) GetById(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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