Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ID int Active bool Created int Secret string Email string Notes string OTP string }
Client is a structure containing all the information representing a remote client
type ClientLoader ¶
ClientLoader is an interface abstracting a loading of a client. It will most likely been loaded from a database, but we want to abstract that away.
type ClientLoaderFunc ¶
ClientLoaderFunc is a wrapper for a function to implement the ClientLoader interface
func (ClientLoaderFunc) LoadClient ¶
func (clf ClientLoaderFunc) LoadClient(id uint64) (*Client, error)
LoadClient wraps a function to implement ClientLoader interface
type UserLoader ¶
UserLoader is an interface abstracting a loading of a user from store. It will most likely been loaded from a database, but we want to abstract that away.
type UserLoaderFunc ¶
UserLoaderFunc is a wrapper for a function to implement the UserLoader interface
type Yubikey ¶
type Yubikey struct { Active bool Created int64 Modified int64 PublicName string Counter uint // Number of time the key is plugged Use uint // Number of time the key is tapped Low uint High uint Nonce string Notes string }
Yubikey is a structure representing a Yubikey state
type YubikeyDBMapper ¶
type YubikeyDBMapper interface { YubikeyLoader YubikeyUpdater YubikeyProducer }
YubikeyDBMapper is an interface aggregator for Yubikey database interactions.
type YubikeyLoader ¶
YubikeyLoader is an interface abstracting a loading of a Yubikey state. It will most likely been loaded from a database, but we want to abstract that away.
type YubikeyLoaderFunc ¶
YubikeyLoaderFunc is a wrapper for a function to implement the YubikeyLoader interface
func (YubikeyLoaderFunc) YubikeyLoad ¶
func (ylf YubikeyLoaderFunc) YubikeyLoad(name string) (*Yubikey, error)
YubikeyLoad wraps a function to implement YubikeyLoader interface
type YubikeyProducer ¶
YubikeyProducer is an interface abstracting the creation of a Yubikey. It will most likely been saved to a database, but we want to abstract that away.
type YubikeyProducerFunc ¶
YubikeyProducerFunc is a wrapper for a function to implement the YubikeyProducer interface
func (YubikeyProducerFunc) YubikeyProduce ¶
func (ypf YubikeyProducerFunc) YubikeyProduce(token *Token, nonce string) (*Yubikey, error)
YubikeyProduce wraps a function to implement ClientLoader interface
type YubikeyUpdater ¶
YubikeyUpdater is an interface abstracting the update of a Yubikey state. It will most likely been saved to a database, but we want to abstract that away.
type YubikeyUpdaterFunc ¶
YubikeyUpdaterFunc is a wrapper for a function to implement the YubikeyUpdater interface
func (YubikeyUpdaterFunc) YubikeyUpdate ¶
func (yuf YubikeyUpdaterFunc) YubikeyUpdate(key *Yubikey) error
YubikeyUpdate wraps a function to implement YubikeyUpdater interface