protocol

package
v0.0.0-...-cb8f91d Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	Meta json.RawMessage `json:"meta"`
}

type FileResponseDto

type FileResponseDto struct {
	Path string
	Name string
}

type GoodsApiResponse

type GoodsApiResponse struct {
	Success int `json:"success"`
	Envelope
	Data  json.RawMessage `json:"data"`
	Error interface{}     `json:"error"`
}

type MetaWithFrom

type MetaWithFrom struct {
	From string `json:"from"`
}

type RError

type RError struct {
	Message string `json:"message" binding:"required"`
	Code    string `json:"code" binding:"required"`
}

type Request

type Request struct {
	Envelope
	Data json.RawMessage `json:"data" binding:"required"`
}

func NewRequest

func NewRequest(data interface{}) *Request

type ResponseError

type ResponseError struct {
	Success int `json:"success"`
	Envelope
	Error RError `json:"error" binding:"required"`
}

type ResponseSuccess

type ResponseSuccess struct {
	Success int `json:"success"`
	Envelope
	Data json.RawMessage `json:"data" binding:"required"`
}

Jump to

Keyboard shortcuts

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