service

package
v0.0.1-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxConnections int           `yaml:"max_connections"`
	Timeout        time.Duration `yaml:"timeout"`
	URI            string        `yaml:"db_uri"`
	HTTPAddress    string        `yaml:"http_address"`
	LogHTTP        bool          `yaml:"log_http"`
}

func (*Config) Load

func (c *Config) Load(name string) error

type Handler

type Handler struct {
	Storage *pg.PostgresStorage
	Logger  log.FieldLogger
	Timeout time.Duration
}

func (*Handler) GetBalanceUpdate

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

type Service

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

func NewService

func NewService(c *Config, logger log.FieldLogger) (*Service, error)

func (*Service) NewAPIHandler

func (s *Service) NewAPIHandler() http.Handler

Jump to

Keyboard shortcuts

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