signature

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractPath

type ContractPath struct {
	Method string  `yaml:"Method"`
	URI    string  `yaml:"URI"`
	Input  *Input  `yaml:"Input"`
	Output *Output `yaml:"Output"`
}
type Header struct {
	URL       string
	Resource  *Resource       `yaml:"Resource"`
	Contracts []*ContractPath `yaml:"Routes"`
}

func NewHeader

func NewHeader(ctx context.Context, URL string) (*Header, error)

func (*Header) Signature

func (h *Header) Signature(aContract *ContractPath, registry *xreflect.Types) (*Signature, error)

type Input

type Input struct {
	Type *Type `yaml:"Type"`
}

type Output

type Output struct {
	Type *Type `yaml:"Type"`
}

type Resource

type Resource struct {
	Types           []*view.TypeDefinition `yaml:"Types"`
	InputParameters []*state.Parameter     `yaml:"Parameters"`
	MessageBuses    []*mbus.Resource       `yaml:"MessageBuses"`
}

type Service

type Service struct {
	APIPrefix string
	URL       string
	Headers   []*Header
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, APIPrefix string, URL string) (*Service, error)

func (*Service) Signature

func (s *Service) Signature(method, URI string) (*Signature, error)

Signature returns match component signature

type Signature

type Signature struct {
	URI       string
	Method    string
	Anonymous bool
	Types     []*view.TypeDefinition
	Output    *state.Schema
	Input     *state.Type
	Filter    *state.Schema
}

Signature defines contract signature

func (*Signature) GoImports added in v0.9.9

func (s *Signature) GoImports() xreflect.GoImports

type Type

type Type struct {
	Name       string             `yaml:"Name"`
	Package    string             `yaml:"Package"`
	Parameters []*state.Parameter `yaml:"Parameters"`
}

Jump to

Keyboard shortcuts

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