api

package
v0.0.0-...-561d2ec Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GraphqlHandler

func GraphqlHandler() gin.HandlerFunc

GraphqlHandler POST graphql query endpoint

Types

type GraphqlConfig

type GraphqlConfig struct {
	Method  Method
	Path    string
	Handler gin.HandlerFunc
}

GraphqlConfig 配置

func (*GraphqlConfig) SetHandler

func (g *GraphqlConfig) SetHandler(h *gin.HandlerFunc) (err error)

SetHandler 与Gin框架的接口

type Method

type Method string

Method API支持的方法

const (
	MethodGET     Method = "GET"
	MethodPUT     Method = "PUT"
	MethodPOST    Method = "POST"
	MethodDELETE  Method = "DELETE"
	MethodPATCH   Method = "PATCH"
	MethodOPTIONS Method = "OPTIONS"
	MethodHEAD    Method = "HEAD"
)

type ProtobufConfig

type ProtobufConfig struct {
	Method  Method
	Path    string
	Handler gin.HandlerFunc
}

ProtobufConfig 提供API管理

type RestAPI

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

RestAPI 提供API管理

func (*RestAPI) DeleteFlow

func (a *RestAPI) DeleteFlow(ctx *gin.Context)

DeleteFlow 删除流程数据

func (*RestAPI) GetFlow

func (a *RestAPI) GetFlow(ctx *gin.Context)

GetFlow 获取流程数据

func (*RestAPI) QueryFlowPage

func (a *RestAPI) QueryFlowPage(ctx *gin.Context)

QueryFlowPage 查询流程分页数据

func (*RestAPI) SaveFlow

func (a *RestAPI) SaveFlow(ctx *gin.Context)

SaveFlow 保存流程

type RestConfig

type RestConfig struct {
	Method  Method
	Path    string
	Handler gin.HandlerFunc
}

RestConfig 配置

Jump to

Keyboard shortcuts

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