endpoint

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRequestType = errors.New("invalid username, password")
)

Functions

func MakeCreateActivityEndpoint

func MakeCreateActivityEndpoint(svc service.ActivityService) endpoint.Endpoint

func MakeCreateProductEndpoint

func MakeCreateProductEndpoint(svc service.ProductService) endpoint.Endpoint

func MakeGetActivityEndpoint

func MakeGetActivityEndpoint(svc service.ActivityService) endpoint.Endpoint

make endpoint

func MakeGetProductEndpoint

func MakeGetProductEndpoint(svc service.ProductService) endpoint.Endpoint

make endpoint

func MakeHealthCheckEndpoint

func MakeHealthCheckEndpoint(svc service.Service) endpoint.Endpoint

MakeHealthCheckEndpoint 创建健康检查Endpoint

Types

type CreateResponse

type CreateResponse struct {
	Error error `json:"error"`
}

type GetListRequest

type GetListRequest struct{}

type GetResponse

type GetResponse struct {
	Result []gorose.Data `json:"result"`
	Error  error         `json:"error"`
}

type HealthRequest

type HealthRequest struct{}

HealthRequest 健康检查请求结构

type HealthResponse

type HealthResponse struct {
	Status bool `json:"status"`
}

HealthResponse 健康检查响应结构

type SkAdminEndpoints

type SkAdminEndpoints struct {
	GetActivityEndpoint    endpoint.Endpoint
	CreateActivityEndpoint endpoint.Endpoint
	CreateProductEndpoint  endpoint.Endpoint
	GetProductEndpoint     endpoint.Endpoint
	HealthCheckEndpoint    endpoint.Endpoint
}

CalculateEndpoint define endpoint

func (SkAdminEndpoints) HealthCheck

func (ue SkAdminEndpoints) HealthCheck() bool

type UserRequest

type UserRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

UserRequest define request struct

type UserResponse

type UserResponse struct {
}

UserResponse define response struct

Jump to

Keyboard shortcuts

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