Documentation ¶
Index ¶
Constants ¶
View Source
const (
StrMaxSize = 1024
)
Service constants
Variables ¶
View Source
var ( ErrMaxSize = errors.New("maximum size of 1024 bytes exceeded") ErrStrValue = errors.New("error str value to Integer") )
Service errors
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // Concat a and b Concat(a, b string) (string, error) // a,b pkg string value Diff(ctx context.Context, a, b string) (string, error) // HealthCheck check service health status HealthCheck() bool }
Service Define a service interface
type ServiceMiddleware ¶
ServiceMiddleware define service middleware
type StringService ¶
type StringService struct { }
ArithmeticService implement Service interface
func (StringService) HealthCheck ¶
func (s StringService) HealthCheck() bool
HealthCheck implement Service method 用于检查服务的健康状态,这里仅仅返回true。
Click to show internal directories.
Click to hide internal directories.