issueapi

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Overview

Package issueapi implements the API handler for taking a code request, assigning an OTP, saving it to the database and returning the result. This is invoked over AJAX from the Web frontend.

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricPrefix = observability.MetricRoot + "/api/issue"
)

Functions

This section is empty.

Types

type Controller

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

func New

func New(ctx context.Context, config config.IssueAPIConfig, db *database.Database, limiter limiter.Store, h *render.Renderer) (*Controller, error)

New creates a new IssueAPI controller.

func (*Controller) HandleIssue

func (c *Controller) HandleIssue() http.Handler

type Metrics added in v0.5.1

type Metrics struct {
	IssueAttempts       *stats.Int64Measure
	QuotaErrors         *stats.Int64Measure
	QuotaExceeded       *stats.Int64Measure
	CodesIssued         *stats.Int64Measure
	CodeIssueErrors     *stats.Int64Measure
	SMSSent             *stats.Int64Measure
	SMSSendErrors       *stats.Int64Measure
	RealmTokenIssued    *stats.Int64Measure
	RealmTokenRemaining *stats.Int64Measure
	RealmTokenCapacity  *stats.Float64Measure
}

Jump to

Keyboard shortcuts

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