server

package
v0.0.0-...-8a61130 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	// contains filtered or unexported fields
}

func NewEndpoint

func NewEndpoint(config manifest.Endpoint) (Endpoint, error)

func (*Endpoint) Path

func (e *Endpoint) Path() string

func (*Endpoint) Use

func (e *Endpoint) Use(router *echo.Echo) error

type Failure

type Failure struct {
	Error error `json:"error"`
}

type Method

type Method struct {
	// contains filtered or unexported fields
}

func NewMethod

func NewMethod(config manifest.Method) (Method, error)

func (*Method) Description

func (m *Method) Description() string

func (*Method) Handle

func (m *Method) Handle(ctx echo.Context) error

func (*Method) Name

func (m *Method) Name() string

type RequestContext

type RequestContext struct {
	URL *url.URL
	// contains filtered or unexported fields
}

func NewRequestContext

func NewRequestContext(echo echo.Context) RequestContext

func (*RequestContext) Body

func (rc *RequestContext) Body() (string, error)

func (*RequestContext) Cookie

func (rc *RequestContext) Cookie(name string) (*http.Cookie, error)

func (*RequestContext) Header

func (rc *RequestContext) Header(name string) string

func (*RequestContext) Param

func (rc *RequestContext) Param(name string) string

func (*RequestContext) Query

func (rc *RequestContext) Query(name string) string

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(settings Settings) (*Server, error)

func (*Server) Run

func (s *Server) Run() error

type Settings

type Settings struct {
	Version  string
	Port     uint64
	Manifest manifest.Application
}

type Success

type Success struct {
	Result string `json:"result"`
}

Jump to

Keyboard shortcuts

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