Documentation ¶
Index ¶
- Constants
- type BinaryBody
- type RESTAPIConnector
- func (r *RESTAPIConnector) GetMetaInfo(resourceOptions map[string]interface{}) (common.MetaInfoResult, error)
- func (r *RESTAPIConnector) Run(resourceOptions map[string]interface{}, actionOptions map[string]interface{}) (common.RuntimeResult, error)
- func (r *RESTAPIConnector) TestConnection(resourceOptions map[string]interface{}) (common.ConnectionResult, error)
- func (r *RESTAPIConnector) ValidateActionOptions(actionOptions map[string]interface{}) (common.ValidateResult, error)
- func (r *RESTAPIConnector) ValidateResourceOptions(resourceOptions map[string]interface{}) (common.ValidateResult, error)
- type RESTOptions
- type RESTTemplate
- type RawBody
- type RecordBody
Constants ¶
View Source
const ( METHOD_GET = "GET" METHOD_POST = "POST" METHOD_PUT = "PUT" METHOD_DELETE = "DELETE" METHOD_PATCH = "PATCH" BODY_NONE = "none" BODY_RAW = "raw" BODY_BINARY = "binary" BODY_FORM = "form-data" BODY_XWFU = "x-www-form-urlencoded" AUTH_NONE = "none" AUTH_BASIC = "basic" AUTH_BEARER = "bearer" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryBody ¶
type BinaryBody string
type RESTAPIConnector ¶
type RESTAPIConnector struct { Resource RESTOptions Action RESTTemplate }
func (*RESTAPIConnector) GetMetaInfo ¶
func (r *RESTAPIConnector) GetMetaInfo(resourceOptions map[string]interface{}) (common.MetaInfoResult, error)
func (*RESTAPIConnector) Run ¶
func (r *RESTAPIConnector) Run(resourceOptions map[string]interface{}, actionOptions map[string]interface{}) (common.RuntimeResult, error)
func (*RESTAPIConnector) TestConnection ¶
func (r *RESTAPIConnector) TestConnection(resourceOptions map[string]interface{}) (common.ConnectionResult, error)
func (*RESTAPIConnector) ValidateActionOptions ¶
func (r *RESTAPIConnector) ValidateActionOptions(actionOptions map[string]interface{}) (common.ValidateResult, error)
func (*RESTAPIConnector) ValidateResourceOptions ¶
func (r *RESTAPIConnector) ValidateResourceOptions(resourceOptions map[string]interface{}) (common.ValidateResult, error)
type RESTOptions ¶
type RESTTemplate ¶
type RESTTemplate struct { URL string Method string `validate:"oneof=GET POST PUT PATCH DELETE"` BodyType string `validate:"oneof=none form-data x-www-form-urlencoded raw json binary"` UrlParams []map[string]string Headers []map[string]string Body interface{} `validate:"required_unless=BodyType none"` Cookies []map[string]string }
func (*RESTTemplate) ReflectBodyToBinary ¶
func (t *RESTTemplate) ReflectBodyToBinary() []byte
func (*RESTTemplate) ReflectBodyToMap ¶
func (t *RESTTemplate) ReflectBodyToMap() map[string]string
func (*RESTTemplate) ReflectBodyToRaw ¶
func (t *RESTTemplate) ReflectBodyToRaw() *RawBody
func (*RESTTemplate) ReflectBodyToRecord ¶
func (t *RESTTemplate) ReflectBodyToRecord() []*RecordBody
type RecordBody ¶
Click to show internal directories.
Click to hide internal directories.