api

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package api implements the REST API interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API represents an API instance.

func New

func New(o NewOptions) (*API, error)

New creates a new API instance by the given options.

func (*API) Listen

func (api *API) Listen() error

Listen starts listening for HTTP requests.

type NewOptions

type NewOptions struct {
	Address string
	DB      *sql.DB
	AppEnv  string
}

NewOptions represents the options which can be set when creating a new API instance.

Directories

Path Synopsis
Package locations implements the REST API locations endpoint.
Package locations implements the REST API locations endpoint.
Package request provides interface for handling REST API requests.
Package request provides interface for handling REST API requests.

Jump to

Keyboard shortcuts

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