Rename challengeHandler to solver

This commit is contained in:
xenolf 2015-06-11 15:31:09 +02:00
parent 811c68692c
commit 7f7e96097b

View file

@ -35,7 +35,7 @@ type User interface {
GetPrivateKey() *rsa.PrivateKey GetPrivateKey() *rsa.PrivateKey
} }
type challengeHandler interface { type solver interface {
CanSolve() bool CanSolve() bool
Solve() Solve()
} }
@ -44,7 +44,7 @@ type challengeHandler interface {
type Client struct { type Client struct {
regURL string regURL string
user User user User
Solvers map[string]challengeHandler Solvers map[string]solver
} }
// NewClient creates a new client for the set user. // NewClient creates a new client for the set user.
@ -54,7 +54,7 @@ func NewClient(caURL string, usr User) *Client {
} }
// REVIEW: best possibility? // REVIEW: best possibility?
solvers := make(map[string]challengeHandler) solvers := make(map[string]solver)
solvers["simpleHttp"] = &simpleHTTPChallenge{} solvers["simpleHttp"] = &simpleHTTPChallenge{}
solvers["dvsni"] = &dvsniChallenge{} solvers["dvsni"] = &dvsniChallenge{}