github.com/goravel/framework@v1.13.9/auth/access/response.go (about) 1 package access 2 3 import "github.com/goravel/framework/contracts/auth/access" 4 5 func NewAllowResponse() access.Response { 6 return &ResponseImpl{allowed: true} 7 } 8 9 func NewDenyResponse(message string) access.Response { 10 return &ResponseImpl{message: message} 11 } 12 13 type ResponseImpl struct { 14 allowed bool 15 message string 16 } 17 18 func (r *ResponseImpl) Allowed() bool { 19 return r.allowed 20 } 21 22 func (r *ResponseImpl) Message() string { 23 return r.message 24 }