user

package
v0.0.0-...-657a6a2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 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 Repository

type Repository interface {
	Get(ctx context.Context, id string) (*model.User, error)
	Insert(ctx context.Context, user *model.User) error
	Update(ctx context.Context, user *model.User) error
	DeleteByID(ctx context.Context, id string) error
}

Repository - User repository

type Service

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

Service - user service

func NewService

func NewService(repo Repository) *Service

NewService - constructor

func (*Service) AgeIncrement

func (s *Service) AgeIncrement(ctx context.Context, id string) (*model.User, error)

AgeIncrement - user age incrementation

func (*Service) DeleteByID

func (s *Service) DeleteByID(ctx context.Context, id string) error

DeleteByID - user deletion by id

func (*Service) Get

func (s *Service) Get(ctx context.Context, id string) (*model.User, error)

Get - user acquisition

func (*Service) Insert

func (s *Service) Insert(ctx context.Context, user *model.User) error

Insert - user insertion

func (*Service) Update

func (s *Service) Update(ctx context.Context, user *model.User) error

Update - user update

Jump to

Keyboard shortcuts

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