handler

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse

type AuthResponse struct {
	UserID int64  `json:"user_id,omitempty"`
	Token  string `json:"token,omitempty"`
}

type Handler

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

func New

func New(stats *stats.Stats) *Handler

func (*Handler) Auth

func (h *Handler) Auth(login string, pass string) (AuthResponse, error)

func (*Handler) ExtStats

func (h *Handler) ExtStats(login string, pass string)

func (*Handler) Hello

func (h *Handler) Hello(name string, skipStats bool, sleep time.Duration) string

func (*Handler) List

func (h *Handler) List(token string, userID int64) (*ListResponse, error)

func (*Handler) Order

func (h *Handler) Order(token string, userID int64, ItemId int64) (*OrderResponse, error)

func (*Handler) Reset

func (h *Handler) Reset() stats.Response

func (*Handler) Stats

func (h *Handler) Stats() stats.Response

type ListItem

type ListItem struct {
	ItemId int64 ` json:"item_id,omitempty"`
}

type ListResponse

type ListResponse struct {
	Result []*ListItem `json:"result,omitempty"`
}

type OrderResponse

type OrderResponse struct {
	OrderId int64 `json:"order_id,omitempty"`
}

Jump to

Keyboard shortcuts

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