graphql

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 (
	AUTH_NONE   = "none"
	AUTH_BASIC  = "basic"
	AUTH_BEARER = "bearer"
	AUTH_APIKEY = "apiKey"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Query     string
	Variables []map[string]interface{}
	Headers   []map[string]string
}

type Connector

type Connector struct {
	ResourceOpts Resource
	ActionOpts   Action
}

func (*Connector) GetMetaInfo

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

func (*Connector) Run

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

func (*Connector) TestConnection

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

func (*Connector) ValidateActionOptions

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

func (*Connector) ValidateResourceOptions

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

type Resource

type Resource struct {
	BaseURL              string `validate:"required"`
	URLParams            []map[string]string
	Headers              []map[string]string
	Cookies              []map[string]string
	Authentication       string `validate:"required,oneof=none basic bearer apiKey"`
	AuthContent          map[string]string
	DisableIntrospection bool
}

Jump to

Keyboard shortcuts

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