logs

package module
v0.0.0-...-aef6525 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2019 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLog

type AuditLog interface {
	Add(ctx context.Context, action string) error
	GetLogsOfUser(ctx context.Context, userID string) ([]*Log, error)
	GetLogsBetweenInterval(ctx context.Context, start time.Time, end time.Time, userID string) ([]*Log, error)
}

AuditLog is the interface that stores Audit Logs of actions performed by an user

func NewPostgresAuditLog

func NewPostgresAuditLog(db *sql.DB) (AuditLog, error)

NewPostgresAuditLog returns the AuditLog interface that implements Audit Logs Functions

type Log

type Log struct {
	Timestamp time.Time
	UserID    string
	Action    string
}

Log is an instance of an Audit Log

Directories

Path Synopsis
Package logs_mock is a generated GoMock package.
Package logs_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL