user

package
v0.0.0-...-edc78fc Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(u *User)

func WithAge

func WithAge[T constraints.Integer](age T) Option

func WithName

func WithName(name string) Option

type User

type User struct {
	// contains filtered or unexported fields
}

func NewUser

func NewUser(id, age int, name string, createdAt time.Time) (*User, error)

func (*User) Age

func (u *User) Age() int

func (*User) GetCreatedAt

func (u *User) GetCreatedAt() time.Time

func (*User) ID

func (u *User) ID() int

func (*User) Name

func (u *User) Name() string

func (*User) SetAge

func (u *User) SetAge(age int)

func (*User) SetName

func (u *User) SetName(name string)

Jump to

Keyboard shortcuts

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