models

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanizeAction

func HumanizeAction(action Action) string

Types

type Action

type Action int

Action !

func (Action) Added

func (a Action) Added() Action

Added @

func (Action) Custom

func (a Action) Custom() Action

Custom !

func (Action) Deleted

func (a Action) Deleted() Action

Deleted !

func (Action) GetSchema

func (a Action) GetSchema() Action

GetSchema !

func (Action) LoginDenied

func (a Action) LoginDenied() Action

LoginDenied !

func (Action) LoginSuccessful

func (a Action) LoginSuccessful() Action

LoginSuccessful !

func (Action) Logout

func (a Action) Logout() Action

Logout !

func (Action) Modified

func (a Action) Modified() Action

Modified !

func (Action) PasswordResetDenied

func (a Action) PasswordResetDenied() Action

PasswordResetDenied !

func (Action) PasswordResetRequest

func (a Action) PasswordResetRequest() Action

PasswordResetRequest !

func (Action) PasswordResetSuccessful

func (a Action) PasswordResetSuccessful() Action

PasswordResetSuccessful !

func (Action) Read

func (a Action) Read() Action

type Log

type Log struct {
	ID            uint             `gorm:"primarykey"`
	ContentType   core.ContentType `uadminform:"ReadonlyField" uadmin:"list,search"`
	ContentTypeID uint
	ModelPK       uint      `uadmin:"list,search" uadminform:"ReadonlyField"`
	Action        Action    `uadminform:"ReadonlyField" uadmin:"list,search"`
	Username      string    `uadminform:"ReadonlyField" uadmin:"list,search"`
	Activity      string    `gorm:"type:longtext" uadminform:"ReadonlyTextareaFieldOptions" uadmin:"list,search"`
	CreatedAt     time.Time `uadminform:"DateTimeFieldOptions" uadmin:"list,search"`
	UpdatedAt     time.Time
	DeletedAt     gorm.DeletedAt `gorm:"index"`
}

Log !

func (*Log) ParseRecord

func (l *Log) ParseRecord(a reflect.Value, modelName string, ID uint, user *core.User, action Action, r *http.Request) (err error)

ParseRecord !

func (*Log) PasswordReset

func (l *Log) PasswordReset(user string, action Action, r *http.Request) (err error)

PasswordReset !

func (*Log) Save

func (l *Log) Save()

Save !

func (*Log) SignIn

func (l *Log) SignIn(user string, action Action, r *http.Request) (err error)

SignIn !

func (Log) String

func (l Log) String() string

Jump to

Keyboard shortcuts

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