api

package
v0.0.0-...-07c5cce Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Name             string
	Prefix           string
	UpstreamUrl      *Url `yaml:"upstream_url"`
	Methods          []string
	AllowCrossOrigin bool `yaml:"allow_cross_origin"`
	Middlewares      map[string]bool
}

type Registry

type Registry struct {
	APIs map[string]API
}

func RegisterAPIs

func RegisterAPIs(configFile string) (ar Registry, e error)

type Url

type Url struct {
	*url.URL
}

func (*Url) UnmarshalYAML

func (u *Url) UnmarshalYAML(unmarshal func(interface{}) error) error

Tell yaml parser how to unmarshal a string to type Url

Jump to

Keyboard shortcuts

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