wargaming

package
v0.0.0-...-4976f39 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdapter

func NewAdapter(logger *zap.Logger, config *Config) domain.Wargaming

Types

type Config

type Config struct {
	ApplicationID string        `long:"application-id" env:"APPLICATION_ID" description:"Wargaming API application_id" required:"yes"`
	HTTPTimeout   time.Duration `long:"http-timeout" env:"HTTP_TIMEOUT" description:"HTTP Wargaming API call timeout" default:"10s"`
}

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Field   string `json:"field"`
	Value   string `json:"value"`
}

func (*Error) Error

func (e *Error) Error() string

type PlayerData

type PlayerData struct {
	Nickname  string `json:"nickname"`
	AccountID int    `json:"account_id"`
}

type Response

type Response struct {
	Status string          `json:"status"`
	Error  *Error          `json:"error"`
	Data   json.RawMessage `json:"data"`
}

Jump to

Keyboard shortcuts

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