api

package
v0.0.0-...-a0d6630 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Config    tenso.Configuration
	DB        *gorp.DbMap
	Validator gopherpolicy.Validator
	// contains filtered or unexported fields
}

API is a httpapi.API that serves the tenso API.

func NewAPI

func NewAPI(cfg tenso.Configuration, db *gorp.DbMap, validator gopherpolicy.Validator) *API

NewAPI creates an tenso API.

func (*API) AddTo

func (a *API) AddTo(r *mux.Router)

AddTo implements the httpapi.API interface.

func (*API) OverrideTimeNow

func (a *API) OverrideTimeNow(now func() time.Time) *API

OverrideTimeNow is used by unit tests to inject a mock clock.

Jump to

Keyboard shortcuts

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