Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindAuditContext ¶
func BindAuditContext(ac *Controller) func(ctx *APICtx, rw web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc)
BindAuditContext Helper middleware to bind module to API context
Types ¶
type APICtx ¶
type APICtx struct {
// Base context required by router
*appcontext.AuthPlzCtx
// contains filtered or unexported fields
}
APICtx API context instance
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller instance
func NewController ¶
func NewController(store Storer) *Controller
NewController Instantiates an audit controller
func (*Controller) AddEvent ¶
func (ac *Controller) AddEvent(userExtID, eventType string, eventTime time.Time, data map[string]string) error
AddEvent adds an event to the audit log
func (*Controller) BindAPI ¶
func (ac *Controller) BindAPI(router *web.Router)
BindAPI binds the AuditController API to a provided router
func (*Controller) HandleEvent ¶
func (ac *Controller) HandleEvent(event interface{}) error
HandleEvent handles async events for go-async
func (*Controller) ListEvents ¶
func (ac *Controller) ListEvents(userid string) ([]interface{}, error)
ListEvents fetches events for the provided userID
type Event ¶
type Event interface {
GetUserExtID() string
GetType() string
GetTime() time.Time
GetData() map[string]string
}
Event Audit event type interface
Click to show internal directories.
Click to hide internal directories.