endpoint

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(pkg string, spec ServiceSpec, withOc bool) (string, error)

Generate generates a go-kit endpoint struct.

Types

type EndpointSpec

type EndpointSpec struct {
	Name string
}

EndpointSpec describes a dispatcher method in an event dispatcher. nolint: golint

type PackageSpec

type PackageSpec struct {
	Name string
	Path string
}

PackageSpec contains import information.

type ServiceSpec

type ServiceSpec struct {
	Name      string
	Package   PackageSpec
	Endpoints []EndpointSpec
}

ServiceSpec describes the service interface.

func Parse

func Parse(dir string, interfaceName string) (ServiceSpec, error)

Parse parses a given package, looks for an interface and returns it as a normalized structure.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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