endpoints

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package endpoints API相关的数据信息

Package endpoints Info的handle

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

type Endpoints struct {
	// contains filtered or unexported fields
}

Endpoints 定义 endpoint 方法

func New

func New(options ...Option) *Endpoints

New 创建 Endpoints 对象.

func (*Endpoints) Info

func (e *Endpoints) Info(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

Info 用于健康检查

func (*Endpoints) ListSyncRecord

func (e *Endpoints) ListSyncRecord(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

ListSyncRecord 查看uc同步历史记录

func (*Endpoints) Routes

func (e *Endpoints) Routes() []httpserver.Endpoint

Routes 返回 endpoints 的所有 endpoint 方法,也就是 route.

type Option

type Option func(*Endpoints)

Option 定义Endpoints的func类型

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithQueryStringDecoder

func WithQueryStringDecoder(decoder *schema.Decoder) Option

func WithUcAdaptor

func WithUcAdaptor(ucAdaptor *adaptor.Adaptor) Option

WithUcAdaptor 配置数据库

Jump to

Keyboard shortcuts

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