service

package
v0.0.0-...-681e4f9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Check(ctx context.Context, username, password string) (int64, error)

	// HealthCheck check service health status
	HealthCheck() bool
}

Service Define a service interface

type ServiceMiddleware

type ServiceMiddleware func(Service) Service

ServiceMiddleware define service middleware

type UserService

type UserService struct {
}

UserService implement Service interface

func (UserService) Check

func (s UserService) Check(ctx context.Context, username string, password string) (int64, error)

Add implement check method

func (UserService) HealthCheck

func (s UserService) HealthCheck() bool

HealthCheck implement Service method 用于检查服务的健康状态,这里仅仅返回true

Jump to

Keyboard shortcuts

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