server

package
v0.0.0-...-58bfa7f Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DatabaseStatusOffline indicates that the database cannot be reached.
	DatabaseStatusOffline = "OFFLINE"
	// DatabaseStatusOnline indicates that the database can be reached.
	DatabaseStatusOnline = "ONLINE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

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

APIServer serves APIs such as the Payments API.

func NewAPIServer

func NewAPIServer(database db.Database) *APIServer

NewAPIServer returns a new instance of the API server that uses the specified database for storage.

func (*APIServer) Run

func (srv *APIServer) Run(bindAddress string) error

Run runs the API server at the specified address.

type APIServerRootResponse

type APIServerRootResponse struct {
	// DatabaseStatus is the current status of the database.
	DatabaseStatus string `json:"database_status"`
	// Timestamp is the current timestamp.
	Timestamp time.Time `json:"time"`
}

APIServerRootResponse represents a response returned by the root handler.

Directories

Path Synopsis
apis

Jump to

Keyboard shortcuts

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