endpoint

package
v0.0.0-...-99cece9 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OAuth2DetailsKey = "OAuth2Details"
	OAuth2ErrorKey   = "OAuth2Error"
)

Variables

View Source
var (
	ErrInvalidClientRequest = errors.New("invalid client message")
	ErrInvalidUserRequest   = errors.New("invalid user message")
	ErrNotPermit            = errors.New("not permit")
)

Functions

func MakeAdminEndpoint

func MakeAdminEndpoint(svc service.Service) endpoint.Endpoint

func MakeAuthorityAuthorizationMiddleware

func MakeAuthorityAuthorizationMiddleware(authority string, logger log.Logger) endpoint.Middleware

func MakeHealthCheckEndpoint

func MakeHealthCheckEndpoint(svc service.Service) endpoint.Endpoint

MakeHealthCheckEndpoint 创建健康检查Endpoint

func MakeIndexEndpoint

func MakeIndexEndpoint(svc service.Service) endpoint.Endpoint

func MakeOAuth2AuthorizationMiddleware

func MakeOAuth2AuthorizationMiddleware(logger log.Logger) endpoint.Middleware

func MakeSampleEndpoint

func MakeSampleEndpoint(svc service.Service) endpoint.Endpoint

Types

type AdminRequest

type AdminRequest struct {
}

type AdminResponse

type AdminResponse struct {
	Result string `json:"result"`
	Error  string `json:"error"`
}

type HealthRequest

type HealthRequest struct{}

HealthRequest 健康检查请求结构

type HealthResponse

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

HealthResponse 健康检查响应结构

type IndexRequest

type IndexRequest struct {
}

type IndexResponse

type IndexResponse struct {
	Result string `json:"result"`
	Error  string `json:"error"`
}

type OAuth2Endpoints

type OAuth2Endpoints struct {
	IndexEndpoint       endpoint.Endpoint
	SampleEndpoint      endpoint.Endpoint
	AdminEndpoint       endpoint.Endpoint
	HealthCheckEndpoint endpoint.Endpoint
}

CalculateEndpoint define endpoint

type SampleRequest

type SampleRequest struct {
}

type SampleResponse

type SampleResponse struct {
	Result string `json:"result"`
	Error  string `json:"error"`
}

Jump to

Keyboard shortcuts

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