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 }
Click to show internal directories.
Click to hide internal directories.