ddl

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EachFile

func EachFile(libdirs []string, cb func(name string, path string) (br bool))

EachFile calls cb with a path to every found data DDL, stops looking when br is true

Types

type DDL

type DDL struct {
	Schema   string                        `json:"$schema"`
	Metadata Metadata                      `json:"metadata"`
	Query    *common.InputItem             `json:"query"`
	Output   map[string]*common.OutputItem `json:"output"`

	SourceLocation string `json:"-"`

	sync.Mutex
}

func Find

func Find(plugin string, libdirs []string) (ddl *DDL, err error)

func New

func New(file string) (*DDL, error)

New creates a new DDL from a JSON file

func (*DDL) Timeout

func (d *DDL) Timeout() time.Duration

Timeout is the timeout for this data plugin

type FuncMap

type FuncMap map[string]FuncMapEntry

type FuncMapEntry

type FuncMapEntry struct {
	F    interface{}
	Name string
	DDL  *DDL
}

type Metadata

type Metadata struct {
	License     string `json:"license"`
	Author      string `json:"author"`
	Timeout     int    `json:"timeout"`
	Name        string `json:"name"`
	Version     string `json:"version"`
	URL         string `json:"url"`
	Description string `json:"description"`
	Provider    string `json:"provider,omitempty"`
}

Metadata describes an agent at a high level and is required for any agent

Jump to

Keyboard shortcuts

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