mockserver

package
v0.0.0-...-1568143 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ErrCodeBadRequest = 400

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	ErrMessage string `json:"error"`
	Code       int    `json:"code"`
}

func (ErrorResponse) JSON

func (s ErrorResponse) JSON() string

type Server

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

func NewApiServer

func NewApiServer(cfg *config.Config, log *zap.Logger) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context)

type SuccessOK

type SuccessOK struct {
	Status string `json:"status"`
}

func NewSuccessOK

func NewSuccessOK() SuccessOK

type SuccessResponse

type SuccessResponse struct {
	Result interface{} `json:"result"`
	Code   int         `json:"code"`
}

func (SuccessResponse) JSON

func (s SuccessResponse) JSON() string

Jump to

Keyboard shortcuts

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