memuser

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLUserProvider added in v0.1.4

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

func NewSQLUserProvider added in v0.1.4

func NewSQLUserProvider(db *sql.DB) (*SQLUserProvider, error)

func (*SQLUserProvider) Create added in v0.1.4

func (up *SQLUserProvider) Create(ctx context.Context, u *User) (*User, error)

func (*SQLUserProvider) Delete added in v0.1.4

func (up *SQLUserProvider) Delete(ctx context.Context, ent rip.Entity) error

func (*SQLUserProvider) Get added in v0.1.4

func (up *SQLUserProvider) Get(ctx context.Context, ent rip.Entity) (*User, error)

func (SQLUserProvider) ListAll added in v0.1.4

func (up SQLUserProvider) ListAll(ctx context.Context) ([]*User, error)

func (*SQLUserProvider) Update added in v0.1.4

func (up *SQLUserProvider) Update(ctx context.Context, u *User) error

type User

type User struct {
	ID           int       `json:"id" xml:"id"`
	BirthDate    time.Time `json:"birth_date" xml:"birth_date"`
	Name         string    `json:"name" xml:"name"`
	EmailAddress string    `json:"email_address" xml:"email_address"`
}

func (*User) IDFromString

func (u *User) IDFromString(s string) error

func (User) IDString

func (u User) IDString() string

type UserProvider

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

func NewUserProvider

func NewUserProvider() *UserProvider

func (*UserProvider) Create

func (up *UserProvider) Create(ctx context.Context, u *User) (*User, error)

func (*UserProvider) Delete

func (up *UserProvider) Delete(ctx context.Context, ent rip.Entity) error

func (UserProvider) Get

func (up UserProvider) Get(ctx context.Context, ent rip.Entity) (*User, error)

func (UserProvider) ListAll

func (up UserProvider) ListAll(ctx context.Context) ([]*User, error)

func (*UserProvider) Update

func (up *UserProvider) Update(ctx context.Context, u *User) error

Jump to

Keyboard shortcuts

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