service

package
v0.0.0-...-bfcc399 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUserNotFound 用户未发现
	ErrUserNotFound = errors.New("not found user")
	// ErrUserAlreadyExisting 用户名已存在
	ErrUserAlreadyExisting = errors.New("username already existing")
)

Functions

This section is empty.

Types

type Middleware

type Middleware func(Service) Service

func InstrumentingMiddleware

func InstrumentingMiddleware(ints, chars metrics.Counter) Middleware

InstrumentingMiddleware ..

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

LoggingMiddleware ..

type Service

type Service interface {
	GetUser(ctx context.Context, id string) (model.GetUserResponse, error)
	Register(ctx context.Context, RegisterRequest model.RegisterRequest) (model.RegisterUserResponse, error)
	Login(ctx context.Context, login model.LoginRequest) (model.LoginResponse, error)
}

Jump to

Keyboard shortcuts

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