server

package
v0.0.0-...-a3f087f Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package server defines rest api endpoints for pinger

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(h *handler.Handler, c *config.Config)

New makes http endpoints and handler

Types

type AccountResponse

type AccountResponse struct {
	ID          string    `json:"id"`
	Token       string    `json:"token"`
	CreatedTime time.Time `json:"time"`
	Name        string    `json:"name"`
	Email       string    `json:"email"`
}

AccountResponse defines response after creating of account

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
	Status  string `json:"status"`
}

ErrorResponse defines response after errors

type SiteResponse

type SiteResponse struct {
	ID          string    `json:"id"`
	CreatedTime time.Time `json:"time"`
}

SiteResponse define response after creating of site

Jump to

Keyboard shortcuts

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