Documentation ¶
Index ¶
- Constants
- type AccessLogger
- type AuditLogOptionsType
- type AuditLogger
- type AuditRecord
- type CreateLogger
- type DeleteLogger
- type LogParam
- func (log LogParam) AuditLog(logType, userId string, options AuditLogOptionsType) (mcresponse.ResponseMessage, error)
- func (log LogParam) CreateLog(table string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
- func (log LogParam) DeleteLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
- func (log LogParam) LoginLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error)
- func (log LogParam) LogoutLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error)
- func (log LogParam) ReadLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
- func (log LogParam) String() string
- func (log LogParam) UpdateLog(tableName string, logRecords interface{}, newLogRecords interface{}, ...) (mcresponse.ResponseMessage, error)
- type LogParamMongo
- func (log LogParamMongo) AuditLog(logType, userId string, options AuditLogOptionsType) (mcresponse.ResponseMessage, error)
- func (log LogParamMongo) CreateLog(table string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
- func (log LogParamMongo) DeleteLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
- func (log LogParamMongo) LoginLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error)
- func (log LogParamMongo) LogoutLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error)
- func (log LogParamMongo) ReadLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
- func (log LogParamMongo) String() string
- func (log LogParamMongo) UpdateLog(tableName string, logRecords interface{}, newLogRecords interface{}, ...) (mcresponse.ResponseMessage, error)
- type PgxAuditLogOptionsType
- type PgxLogParam
- type ReadLogger
- type UpdateLogger
Constants ¶
View Source
const ( CreateLog = "create" UpdateLog = "update" ReadLog = "read" GetLog = "get" DeleteLog = "delete" RemoveLog = "remove" LoginLog = "login" LogoutLog = "logout" )
constants LogTypes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessLogger ¶
type AccessLogger interface { LoginLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error) LogoutLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error) }
type AuditLogOptionsType ¶
type AuditLogger ¶
type AuditLogger interface {
AuditLog(logType, userId string, options AuditLogOptionsType) (mcresponse.ResponseMessage, error)
}
type AuditRecord ¶ added in v0.2.0
type AuditRecord struct { TableName string `json:"table_name,omitempty"` LogType string `json:"log_type,omitempty"` LogBy string `json:"log_by,omitempty"` LogAt time.Time `json:"log_at,omitempty"` LogRecords interface{} `json:"log_records,omitempty"` NewLogRecords interface{} `json:"new_log_records,omitempty"` }
type CreateLogger ¶
type CreateLogger interface {
CreateLog(table string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
}
type DeleteLogger ¶
type DeleteLogger interface {
DeleteLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
}
type LogParam ¶
interfaces / types
func (LogParam) AuditLog ¶
func (log LogParam) AuditLog(logType, userId string, options AuditLogOptionsType) (mcresponse.ResponseMessage, error)
func (LogParam) CreateLog ¶
func (log LogParam) CreateLog(table string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
func (LogParam) DeleteLog ¶
func (log LogParam) DeleteLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
func (LogParam) LoginLog ¶
func (log LogParam) LoginLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error)
func (LogParam) LogoutLog ¶
func (log LogParam) LogoutLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error)
func (LogParam) ReadLog ¶
func (log LogParam) ReadLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
func (LogParam) UpdateLog ¶
func (log LogParam) UpdateLog(tableName string, logRecords interface{}, newLogRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
type LogParamMongo ¶ added in v0.2.0
interfaces / types
func NewAuditLogMongo ¶ added in v0.2.0
func NewAuditLogMongo(auditDb *mongo.Database, auditTable string) LogParamMongo
func (LogParamMongo) AuditLog ¶ added in v0.2.0
func (log LogParamMongo) AuditLog(logType, userId string, options AuditLogOptionsType) (mcresponse.ResponseMessage, error)
func (LogParamMongo) CreateLog ¶ added in v0.2.0
func (log LogParamMongo) CreateLog(table string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
func (LogParamMongo) DeleteLog ¶ added in v0.2.0
func (log LogParamMongo) DeleteLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
func (LogParamMongo) LoginLog ¶ added in v0.2.0
func (log LogParamMongo) LoginLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error)
func (LogParamMongo) LogoutLog ¶ added in v0.2.0
func (log LogParamMongo) LogoutLog(logRecords interface{}, userId string, tableName string) (mcresponse.ResponseMessage, error)
func (LogParamMongo) ReadLog ¶ added in v0.2.0
func (log LogParamMongo) ReadLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
func (LogParamMongo) String ¶ added in v0.2.0
func (log LogParamMongo) String() string
String() function implementation
func (LogParamMongo) UpdateLog ¶ added in v0.2.0
func (log LogParamMongo) UpdateLog(tableName string, logRecords interface{}, newLogRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
type PgxAuditLogOptionsType ¶ added in v0.3.0
type PgxLogParam ¶ added in v0.3.0
interfaces / types
func NewAuditLogPgx ¶ added in v0.3.0
func NewAuditLogPgx(auditDb *pgxpool.Pool, auditTable string) PgxLogParam
func (PgxLogParam) AuditLog ¶ added in v0.3.0
func (log PgxLogParam) AuditLog(logType, userId string, options PgxAuditLogOptionsType) (mcresponse.ResponseMessage, error)
func (PgxLogParam) String ¶ added in v0.3.0
func (log PgxLogParam) String() string
String() function implementation
type ReadLogger ¶
type ReadLogger interface {
ReadLog(tableName string, logRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
}
type UpdateLogger ¶
type UpdateLogger interface {
UpdateLog(tableName string, logRecords interface{}, newLogRecords interface{}, userId string) (mcresponse.ResponseMessage, error)
}
Click to show internal directories.
Click to hide internal directories.