hfendpoint

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INPUT_PAIRS_MODE  = "pairs"
	INPUT_TEXT_MODE   = "text"
	INPUT_JSON_MODE   = "json"
	INPUT_BINARY_MODE = "binary"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Params Parameters `mapstructure:"params"`
}

type Connector

type Connector struct {
	ResourceOpts Resource
	ActionOpts   Action
}

func (*Connector) GetMetaInfo

func (h *Connector) GetMetaInfo(resourceOptions map[string]interface{}) (common.MetaInfoResult, error)

func (*Connector) Run

func (h *Connector) Run(resourceOptions map[string]interface{}, actionOptions map[string]interface{}) (common.RuntimeResult, error)

func (*Connector) TestConnection

func (h *Connector) TestConnection(resourceOptions map[string]interface{}) (common.ConnectionResult, error)

func (*Connector) ValidateActionOptions

func (h *Connector) ValidateActionOptions(actionOptions map[string]interface{}) (common.ValidateResult, error)

func (*Connector) ValidateResourceOptions

func (h *Connector) ValidateResourceOptions(resourceOptions map[string]interface{}) (common.ValidateResult, error)

type Inputs

type Inputs struct {
	Type    string      `mapstructure:"type"`
	Content interface{} `mapstructure:"content"`
}

type Pairs

type Pairs struct {
	Key   string      `mapstructure:"key"`
	Value interface{} `mapstructure:"value"`
}

type Parameters

type Parameters struct {
	Inputs           Inputs  `mapstructure:"inputs"`
	WithDetailParams bool    `mapstructure:"withDetailParams"`
	DetailParams     []Pairs `mapstructure:"detailParams"`
}

type Resource

type Resource struct {
	Endpoint string `mapstructure:"endpoint" validate:"required"`
	Token    string `mapstructure:"token" validate:"required"`
}

Jump to

Keyboard shortcuts

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