hwebconnector

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DownloadFlag = "FILE-DOWNLOAD"
	PreviewFlag  = "FILE-PREVIEW"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	core.BaseConnector

	App *fiber.App
	// contains filtered or unexported fields
}

func New

func New(options *core.ConnectorOptions) *Connector

func (*Connector) Config

func (this *Connector) Config() core.IEntityConf

func (*Connector) EntityStub

func (this *Connector) EntityStub() *core.EntityStub

func (*Connector) HandleFileRequest

func (this *Connector) HandleFileRequest(c *fiber.Ctx, data htypes.Any) (bool, *herrors.Error)

func (*Connector) Open

func (this *Connector) Open(gw core.IAPIGateway, ins core.IAPIConnector) *herrors.Error

func (*Connector) ParseBodyParams

func (this *Connector) ParseBodyParams(c *fiber.Ctx, ps htypes.Map) *herrors.Error

func (*Connector) ParseFormParams

func (this *Connector) ParseFormParams(c *fiber.Ctx, ps htypes.Map) *herrors.Error

func (*Connector) ParseHeaderParams

func (this *Connector) ParseHeaderParams(c *fiber.Ctx, ps htypes.Map) *herrors.Error

func (*Connector) ParseQueryParams

func (this *Connector) ParseQueryParams(c *fiber.Ctx) (htypes.Map, *herrors.Error)

func (*Connector) SendResponse

func (this *Connector) SendResponse(c *fiber.Ctx, data htypes.Any, err *herrors.Error)

type ResponseData

type ResponseData struct {
	Data  htypes.Any     `json:"data"`
	Error *herrors.Error `json:"error"`
}

func NewResponseData

func NewResponseData(data htypes.Any, err *herrors.Error) *ResponseData

type WebConnector

type WebConnector struct {
	core.ConnectorConf

	AppKey           string
	AppSecret        string
	SignMethod       string
	Port             int
	Timeout          int
	BodyLimit        int // Mbit
	Tls              bool
	TlsCertPath      string
	TlsKeyPath       string
	AddressField     string
	WebSocketEnabled bool   // 是否开启websocket
	WebSocketUrl     string // websocket路由地址
}

Jump to

Keyboard shortcuts

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