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: 0

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