crud

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAdminUser

func CreateAdminUser(db *db.Database)

func CreateAnonymousUser

func CreateAnonymousUser(db *db.Database)

func CreateForeignKeys

func CreateForeignKeys(db *db.Database)

func CreateSampleData

func CreateSampleData(database *db.Database)

func CreateTables

func CreateTables(db *db.Database)

func DropTables

func DropTables(db *db.Database)

func MysqlRealEscapeString

func MysqlRealEscapeString(value string) string

func NewDatabaseProblemRepo

func NewDatabaseProblemRepo(database *db.Database) domain.ProblemRepo

func NewDatabaseProblemTagRepo

func NewDatabaseProblemTagRepo(database *db.Database) domain.ProblemTagRepo

func NewDatabaseSchoolRepo

func NewDatabaseSchoolRepo(database *db.Database) domain.SchoolRepo

func NewDatabaseUserActionRepo

func NewDatabaseUserActionRepo(database *db.Database) domain.UserActionRepo

func NewDatabaseUserProblemAttemptRepo

func NewDatabaseUserProblemAttemptRepo(database *db.Database) domain.UserProblemAttemptRepo

func NewDatabaseUserRepo

func NewDatabaseUserRepo(database *db.Database) domain.UserRepo

func NewExpandedUserProblemAttemptRepo

func NewExpandedUserProblemAttemptRepo(database *db.Database) domain.ExpandedUserProblemAttemptRepo

func RefreshViews

func RefreshViews(db *db.Database)

Types

type Logger

type Logger interface {
	LogUserAction(userID uint, description string, statusCode int, method string, resource string) error
	LogUserActionAtTime(userID uint, actionTime time.Time, description string, statusCode int, method string, resource string) error
	LogAnonymousAction(description string, statusCode int, method string, resource string) error
	LogAnonymousActionAtTime(actionTime time.Time, description string, statusCode int, method string, resource string) error
}

To log user's actions

func NewLogger

func NewLogger(database *db.Database) Logger

Jump to

Keyboard shortcuts

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