user

package
v0.0.0-...-661c6f8 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountByUsername

func CountByUsername(ctx context.Context, username string) (int, error)

func CreateOne

func CreateOne(ctx context.Context, user *User) (*ent.User, error)

func ReadOneByUserID

func ReadOneByUserID(ctx context.Context, uid int) (*ent.User, error)

func ReadOneByUsername

func ReadOneByUsername(ctx context.Context, username string) (*ent.User, error)

Types

type User

type User struct {
	ID       int    `json:"id,omitempty" swaggerignore:"true"`
	Username string `json:"username,omitempty" binding:"required" minLength:"4" maxLength:"32"`
	Password string `json:"password,omitempty" binding:"required" minLength:"8" maxLength:"32"`
}

Jump to

Keyboard shortcuts

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