duo

package
v1.0.12-0...-3a330c3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: Apache-2.0 Imports: 3 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 interface {
	Call(values url.Values) (*Response, error)
}

API interface wrapping duo api library for testing purpose

type APIImpl

type APIImpl struct {
	*duoapi.DuoApi
}

APIImpl implementation of DuoAPI interface

func NewDuoAPI

func NewDuoAPI(duoAPI *duoapi.DuoApi) *APIImpl

NewDuoAPI create duo API instance

func (*APIImpl) Call

func (d *APIImpl) Call(values url.Values) (*Response, error)

Call call to the DuoAPI

type Response

type Response struct {
	Response struct {
		Result        string `json:"result"`
		Status        string `json:"status"`
		StatusMessage string `json:"status_msg"`
	} `json:"response"`
	Stat string `json:"stat"`
}

Response response coming from Duo API

Jump to

Keyboard shortcuts

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