route

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRouteFieldCantEmpty error
	ErrRouteFieldCantEmpty = errors.New("route field can not be empty")
	// ErrInvalidRoute error
	ErrInvalidRoute = errors.New("invalid route")
)

Functions

This section is empty.

Types

type Route

type Route struct {
	SvType  string
	Service string
	Method  string
}

Route struct

func Decode

func Decode(route string) (*Route, error)

Decode decodes the route

func NewRoute

func NewRoute(server, service, method string) *Route

NewRoute creates a new route

func (*Route) Short

func (r *Route) Short() string

Short transforms the route into a string without the server type

func (*Route) String

func (r *Route) String() string

String transforms the route into a string

Jump to

Keyboard shortcuts

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