spec

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Func2Name

func Func2Name(f EntrypointFunc) string

Func2Name returns the name of the function 'f', it contains the full package name.

Types

type ArgValType

type ArgValType int

type CreateCustomFunc

type CreateCustomFunc func() Customer

CreateCustomFunc can be used to create a custom object for the function The custom object must implement the 'Close' method, godriver can use this method to close or release the custom object.

type Customer

type Customer interface {
	Close() error
}

type EntrypointArgs

type EntrypointArgs map[string]string

EntrypointArgs is the 'Args' argument of the entrypoint

func (EntrypointArgs) Get

func (e EntrypointArgs) Get(name string, typ ArgValType) (interface{}, error)

Get returns the value of the key 'name' in map, if the 'name' not existed, return nil.

func (EntrypointArgs) GetBool

func (e EntrypointArgs) GetBool(name string) (bool, error)

func (EntrypointArgs) GetInt

func (e EntrypointArgs) GetInt(name string) (int, error)

func (EntrypointArgs) GetIntSlice

func (e EntrypointArgs) GetIntSlice(name string) ([]int, error)

func (EntrypointArgs) GetReader

func (e EntrypointArgs) GetReader(name string) (io.Reader, error)

func (EntrypointArgs) GetString

func (e EntrypointArgs) GetString(name string) string

func (EntrypointArgs) GetStringSlice

func (e EntrypointArgs) GetStringSlice(name string) []string

func (EntrypointArgs) GetURL

func (e EntrypointArgs) GetURL(name string) (string, error)

type EntrypointBundle

type EntrypointBundle struct {
	Version   string
	Custom    Customer
	Resources resource.Resources
}

EntrypointBundle

type EntrypointFunc

type EntrypointFunc func(context.Context, EntrypointBundle, EntrypointArgs) (map[string]string, error)

EntrypointFunc defines the entrypoint type of the function

Jump to

Keyboard shortcuts

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