datasource

package
v0.0.0-...-57b808a Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ds *DataSource) error

New creates a new data source instance.

func Remove

func Remove(ds *DataSource) error

Remove removes a data source.

Types

type DataSource

type DataSource struct {
	Name               string
	URL                string
	Method             string
	Body               string
	Headers            map[string]string
	Public             bool
	ExpressionTemplate string
}

DataSource represents a data source.

func FindBy

func FindBy(query bson.M) ([]DataSource, error)

FindBy returns a list of data sources filtered by "query".

func Get

func Get(name string) (*DataSource, error)

Get finds a data source by name.

func (*DataSource) Get

func (ds *DataSource) Get(appName string, envs map[string]string) (string, error)

Get tries to get the data from the data source.

Jump to

Keyboard shortcuts

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