audit: Document that arguments must not be modified

This commit is contained in:
Armon Dadgar 2015-04-27 14:24:11 -07:00
parent 478a5965ee
commit a76cd4c58d

View File

@ -8,11 +8,15 @@ import "github.com/hashicorp/vault/logical"
// or other external services.
type Backend interface {
// LogRequest is used to syncronously log a request. This is done after the
// request is authorized but before the request is executed.
// request is authorized but before the request is executed. The arguments
// MUST not be modified in anyway. They should be deep copied if this is
// a possibility.
LogRequest(*logical.Auth, *logical.Request) error
// LogResponse is used to syncronously log a response. This is done after
// the request is processed but before the response is sent.
// the request is processed but before the response is sent. The arguments
// MUST not be modified in anyway. They should be deep copied if this is
// a possibility.
LogResponse(*logical.Auth, *logical.Request, *logical.Response, error) error
}