api

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package api provides a structure for designing an API for your app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(root seed.Seed) map[string]http.Handler

Types

type Design

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

Design is an API design for your app.

func New

func New(options ...Option) Design

New returns a new API design.

func (Design) AddTo

func (d Design) AddTo(c seed.Seed)

AddTo app.

func (Design) And

func (d Design) And(more ...seed.Option) seed.Option

type Option

type Option func(*Design)

func Endpoint

func Endpoint(route string, handler interface{}) Option

Endpoint is an API endpoint with a route and handler.

Jump to

Keyboard shortcuts

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