user

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MaskedPassword = "--------"

Variables

View Source
var (
	From  = contextx.From[tCtxUser, Controller]
	Must  = contextx.Must[tCtxUser, Controller]
	With  = contextx.With[tCtxUser, Controller]
	Carry = contextx.Carry[tCtxUser, Controller]
)

Functions

This section is empty.

Types

type Controller

type Controller interface {
}

func New

func New() Controller

type Data

type Data struct {
	UserID       int64     `json:"userID"`
	Username     string    `json:"username"`
	MemberType   string    `json:"memberType"`
	CreatedAt    time.Time `json:"createdAt"`
	LastActiveAt time.Time `json:"lastActiveAt"`
}

type ErrorForbidden

type ErrorForbidden struct{}

func (ErrorForbidden) Error

func (ErrorForbidden) Error() string

func (ErrorForbidden) StatusCode

func (ErrorForbidden) StatusCode() int

type ErrorNotFound

type ErrorNotFound struct{}

func (ErrorNotFound) Error

func (ErrorNotFound) Error() string

func (ErrorNotFound) StatusCode

func (ErrorNotFound) StatusCode() int

type ListReq

type ListReq struct {
	CreatedAt  time.Time `in:"query" name:"createdAt,omitzero"`
	UpdatedAt  time.Time `in:"query" name:"updatedAt,omitzero"`
	MemberType string    `in:"query" name:"memberType"` // required

}

type ListRsp

type ListRsp struct {
	Data  []Data `json:"data"`
	Total int    `json:"total"`
}

func ListMembers

func ListMembers(_ context.Context, _ *ListReq) (*ListRsp, error)

type Password

type Password string

Password as a string underlying and implements SecurityStringer

func (Password) SecurityString

func (p Password) SecurityString() string

func (Password) String

func (p Password) String() string

type RegisterReq

type RegisterReq struct {
	Username string   `json:"username"`
	Password Password `json:"password"`
}

type RegisterRsp

type RegisterRsp struct {
	UserID   int64
	Username string
}

Jump to

Keyboard shortcuts

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