mapper

package
v0.0.0-...-a35a875 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUserPassword

func CheckUserPassword(account string, password string) (bool, error)

func CountProblemByOptions

func CountProblemByOptions(options GetProblemOptions) (int64, error)

func CountUserByOptions

func CountUserByOptions(options GetUserOptions) (int64, error)

Count the total number of users that match the options, ignoring the offset and limit.

func CreateProblem

func CreateProblem(problem model.Problem) error

func CreateUser

func CreateUser(user model.User) error

Account, Password, Roles will be used to create a new user.

func DeleteProblem

func DeleteProblem(problem model.Problem) error

func DeleteUser

func DeleteUser(user model.User) error

func GetProblem

func GetProblem(slug string) (*model.Problem, error)

func GetProblemListByOptions

func GetProblemListByOptions(options GetProblemOptions) ([]model.Problem, int64, error)

func GetPublicUser

func GetPublicUser(account string) (*model.User, error)

func GetTagsList

func GetTagsList(problem model.Problem) []string

func GetUser

func GetUser(account string) (*model.User, error)

func GetUserByOptions

func GetUserByOptions(options GetUserOptions) ([]model.User, int64, error)

func UpdateProblem

func UpdateProblem(problem model.Problem) error

func UpdateUser

func UpdateUser(update model.User) error

Types

type GetProblemOptions

type GetProblemOptions struct {
	Selection []string
	Slug      *string
	Title     *string
	Tags      []*model.AlgorithmTag
	Offset    *int
	Limit     *int
}

type GetUserOptions

type GetUserOptions struct {
	Account string
	Email   string
	Mobile  string
	Offset  *int
	Limit   *int
}

Jump to

Keyboard shortcuts

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