service

package
v0.0.0-...-8d67cd6 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Monitor

func Monitor(serviceName, routeName, signature string) func(http.Handler) http.Handler

func Trace

func Trace(opName string) func(http.Handler) http.Handler

Types

type Handler

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

func NewHandler

func NewHandler(dbClient dbclient.IGormClient) *Handler

func (*Handler) Close

func (h *Handler) Close()

func (*Handler) GetAccount

func (h *Handler) GetAccount(w http.ResponseWriter, r *http.Request)

GetAccount loads an account instance, including a quote and an image URL using sub-services.

func (*Handler) GetAccountByNameWithCount

func (h *Handler) GetAccountByNameWithCount(w http.ResponseWriter, r *http.Request)

func (*Handler) RandomAccount

func (h *Handler) RandomAccount(w http.ResponseWriter, r *http.Request)

RandomAccount is strictly used for easily getting hold of an account id for demo purposes.

func (*Handler) SeedAccounts

func (h *Handler) SeedAccounts(w http.ResponseWriter, r *http.Request)

func (*Handler) StoreAccount

func (h *Handler) StoreAccount(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateAccount

func (h *Handler) UpdateAccount(w http.ResponseWriter, r *http.Request)

type Server

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

func NewServer

func NewServer(h *Handler, cfg *cmd.Config) *Server

func (*Server) Close

func (s *Server) Close()

func (*Server) SetupRoutes

func (s *Server) SetupRoutes()

func (*Server) Start

func (s *Server) Start()

Jump to

Keyboard shortcuts

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