mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-07 17:07:09 +00:00
docs(security): add docstring to auth.Method interface
This commit is contained in:
parent
94414d5f59
commit
d40c426e17
|
@ -4,9 +4,17 @@ import "net/http"
|
|||
|
||||
// Method an interface describing an authentication method
|
||||
type Method interface {
|
||||
// Called after ParseParam method.
|
||||
// auth.Method should initialize itself here and get ready to receive requests.
|
||||
// Logger has been initialized so it is safe to call logger methods here.
|
||||
Init(debug bool)
|
||||
// Return Method Usage Info
|
||||
Usage() string
|
||||
// Parse the parameter passed through the -authparam flag
|
||||
// Logger is not initialized at this state so do NOT call logger methods
|
||||
// If the parameter is unacceptable, return an error and main should exit
|
||||
ParseParam(string) error
|
||||
// Return a middleware to handle connections.
|
||||
Middleware() func(http.Handler) http.Handler
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user