providers

package
v0.0.0-...-3cc3ff2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLengthMismatch = errors.New("the length of repeated does not match the schema")

ErrLengthMismatch is returned when the length of repeated does not match the schema

Functions

func CleanPattern

func CleanPattern(path string) string

CleanPattern removes any nested pattern from the given path

func DefineCall

func DefineCall(ctx *broker.Context, services specs.ServiceList, schemas specs.Schemas, node *specs.Node, call *specs.Call, flow specs.FlowInterface) (err error)

DefineCall defineds the types for the specs call

func ResolveFlow

func ResolveFlow(parent *broker.Context, services specs.ServiceList, schemas specs.Schemas, flow specs.FlowInterface) (err error)

ResolveFlow ensures that all schema properties are defined inside the given flow

func ResolveNode

func ResolveNode(ctx *broker.Context, services specs.ServiceList, schemas specs.Schemas, node *specs.Node, flow specs.FlowInterface) (err error)

ResolveNode ensures that all schema properties are defined inside the given node

func ResolveOnError

func ResolveOnError(ctx *broker.Context, schemas specs.Schemas, params *specs.OnError, flow specs.FlowInterface) (err error)

ResolveOnError ensures that all schema properties are defined inside the given on error object

func ResolveParameterMap

func ResolveParameterMap(ctx *broker.Context, schemas specs.Schemas, params *specs.ParameterMap, flow specs.FlowInterface) (err error)

ResolveParameterMap ensures that all schema properties are defined inisde the given parameter map

func ResolveParameterMapSchema

func ResolveParameterMapSchema(ctx *broker.Context, schemas specs.Schemas, params *specs.ParameterMap) (_ *specs.Property, err error)

ResolveParameterMapSchema ensures that the given parameter map schema is available

func ResolveProperty

func ResolveProperty(property, schema *specs.Property, flow specs.FlowInterface) error

ResolveProperty ensures that all schema properties are defined inside the given property

func ResolveSchemas

func ResolveSchemas(ctx *broker.Context, services specs.ServiceList, schemas specs.Schemas, flows specs.FlowListInterface) (err error)

ResolveSchemas ensures that all schema properties are defined inside the given flows

Types

type EndpointResolvers

type EndpointResolvers []EndpointsResolver

EndpointResolvers represents a collection of endpoint resolvers

func (EndpointResolvers) Resolve

func (resolvers EndpointResolvers) Resolve(ctx *broker.Context) (specs.EndpointList, error)

Resolve resolves the endpoint resolvers collection and returns a aggregated response

type EndpointsResolver

type EndpointsResolver func(*broker.Context) (specs.EndpointList, error)

EndpointsResolver when called collects the available endpoint(s) with the configured configuration

type ErrUndefinedMethod

type ErrUndefinedMethod struct {
	Method string
	Flow   string
}

ErrUndefinedMethod occurs when method is not defined in a flow

func (ErrUndefinedMethod) Error

func (e ErrUndefinedMethod) Error() string

Error returns a description of the given error as a string

func (ErrUndefinedMethod) Prettify

func (e ErrUndefinedMethod) Prettify() prettyerr.Error

Prettify returns the prettified version of the given error

type ErrUndefinedObject

type ErrUndefinedObject struct {
	Schema string
}

ErrUndefinedObject occurs when Object is not found in schema

func (ErrUndefinedObject) Error

func (e ErrUndefinedObject) Error() string

Error returns a description of the given error as a string

func (ErrUndefinedObject) Prettify

func (e ErrUndefinedObject) Prettify() prettyerr.Error

Prettify returns the prettified version of the given error

type ErrUndefinedOutput

type ErrUndefinedOutput struct {
	Output string
	Flow   string
}

ErrUndefinedOutput occurs when output is not defined in a flow

func (ErrUndefinedOutput) Error

func (e ErrUndefinedOutput) Error() string

Error returns a description of the given error as a string

func (ErrUndefinedOutput) Prettify

func (e ErrUndefinedOutput) Prettify() prettyerr.Error

Prettify returns the prettified version of the given error

type ErrUndefinedProperty

type ErrUndefinedProperty struct {
	Property string
	Flow     string
}

ErrUndefinedProperty occurs when property is not defined in a flow

func (ErrUndefinedProperty) Error

func (e ErrUndefinedProperty) Error() string

Error returns a description of the given error as a string

func (ErrUndefinedProperty) Prettify

func (e ErrUndefinedProperty) Prettify() prettyerr.Error

Prettify returns the prettified version of the given error

type ErrUndefinedService

type ErrUndefinedService struct {
	Service string
	Flow    string
}

ErrUndefinedService occurs when Service is not defined in a flow

func (ErrUndefinedService) Error

func (e ErrUndefinedService) Error() string

Error returns a description of the given error as a string

func (ErrUndefinedService) Prettify

func (e ErrUndefinedService) Prettify() prettyerr.Error

Prettify returns the prettified version of the given error

type FileInfo

type FileInfo struct {
	os.FileInfo
	Path string
}

A FileInfo describes a file

func ResolvePath

func ResolvePath(ctx *broker.Context, ignore []string, pattern string) (files []*FileInfo, _ error)

ResolvePath resolves the given path and returns the matching pattern files.

type FlowsResolver

type FlowsResolver func(*broker.Context) (specs.FlowListInterface, error)

FlowsResolver when called collects the available flow(s) with the configured configuration

type FlowsResolvers

type FlowsResolvers []FlowsResolver

FlowsResolvers represents a collection of flows resolvers

func (FlowsResolvers) Resolve

func (resolvers FlowsResolvers) Resolve(ctx *broker.Context) (specs.FlowListInterface, error)

Resolve resolvers the flows and returns a aggregated response

type SchemaResolver

type SchemaResolver func(*broker.Context) (specs.Schemas, error)

SchemaResolver when called collects the available service(s) with the configured configuration

type SchemaResolvers

type SchemaResolvers []SchemaResolver

SchemaResolvers represents a collection of schema resolvers

func (SchemaResolvers) Resolve

func (resolvers SchemaResolvers) Resolve(ctx *broker.Context) (specs.Schemas, error)

Resolve resolves all schema resolves and returns a aggregated Object

type ServiceDiscoveryClientsResolver

type ServiceDiscoveryClientsResolver func(ctx *broker.Context) (specs.ServiceDiscoveryClients, error)

ServiceDiscoveryClientsResolver collects all the available service discovery configuration and builds clients for the servers.

type ServiceDiscoveryClientsResolvers

type ServiceDiscoveryClientsResolvers []ServiceDiscoveryClientsResolver

func (ServiceDiscoveryClientsResolvers) Resolve

type ServiceResolvers

type ServiceResolvers []ServicesResolver

ServiceResolvers represents a collection of service resolvers

func (ServiceResolvers) Resolve

func (resolvers ServiceResolvers) Resolve(ctx *broker.Context) (specs.ServiceList, error)

Resolve resolves all the given service resolvers and returns a aggregated service list

type ServicesResolver

type ServicesResolver func(*broker.Context) (specs.ServiceList, error)

ServicesResolver when called collects the available service(s) with the configured configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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