The hook package should be self-contained and return errors instead of
relying on the log subsystem. This commit removes the logging
side-effects from the hook package. Custom errors are returned that
should be transparent to the caller -- they can just treat them as
simple errors if they don't care to check the type.
This commit provides 100% test coverage of the hook package.
Two bugs were discovered with these tests. I'll be submitting separate
commits to fix those issues.
This commit removes the "helpers" package by moving functions from the
package into the other packages that use them.
CheckPayloadSignature() and ExtractParamater() are simply moved to the
"hook" package. I'm not sure of the usefulness of having these
functions exported, but I left them allow for now.
ValuesToMap() is moved to the "main" webhook package and renamed to
valuesToMap().
Tests were moved into the "hook" package since we only test
ExtractParameter() right now.
This commit closesadnanh/webhook#12.