service

package
v0.0.0-...-4aec9fb Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertifyService

type CertifyService interface {
	// Add your methods here
	// e.x: Foo(ctx context.Context,s string)(rs string, err error)
	GetAuthInfo(ctx context.Context, id string) (status bool, errinfo string, data model.User)
	PostAuthInfo(ctx context.Context, id string, certifiedPic string) (status bool, errinfo string, data model.User)
	GetAllUnCertify(ctx context.Context) (status bool, errinfo string, data []model.User)
	GetUnCertifyInfo(ctx context.Context, id string) (status bool, errinfo string, data model.User)
	PostCertifyState(ctx context.Context, id string, pass bool) (status bool, errinfo string, data model.User)
}

CertifyService describes the service.

func New

func New(middleware []Middleware) CertifyService

New returns a CertifyService with all of the expected middleware wired in.

func NewBasicCertifyService

func NewBasicCertifyService() CertifyService

NewBasicCertifyService returns a naive, stateless implementation of CertifyService.

type Middleware

type Middleware func(CertifyService) CertifyService

Middleware describes a service middleware.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

LoggingMiddleware takes a logger as a dependency and returns a CertifyService Middleware.

Jump to

Keyboard shortcuts

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