endpoint

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(file File) ([]byte, error)

Generate generates Go kit endpoint sets for services.

Types

type EndpointSet added in v0.1.0

type EndpointSet struct {
	Service Service

	// ModuleName can be used instead of the package name in an operation name to uniquely identify a service call.
	//
	// Falls back to the package name.
	ModuleName string

	// WithOpenCensus enables generating a trace middleware for the endpoint set.
	WithOpenCensus bool

	// ErrorStrategy decides whether returned errors are checked for being endpoint or service errors.
	ErrorStrategy string
}

EndpointSet represents a set of endpoints for a single service. nolint: golint

type File added in v0.1.0

type File struct {
	gentypes.File

	// EndpointSets represents endpoints to be generated for each service in the package.
	EndpointSets []EndpointSet
}

File represents one or more services and provides information for generating endpoints for these services.

type Service added in v0.1.0

type Service struct {
	Object *types.TypeName
	Type   *types.Interface
}

Service represents a service interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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