gokithelper

package
v0.0.0-...-c2c5a46 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeResponseToHTTP

func DecodeResponseToHTTP(_ context.Context, w http.ResponseWriter, response interface{}) error

func NewFailedResponse

func NewFailedResponse(err error) *defaultResponse

func NewSuccessResponse

func NewSuccessResponse(successEvent interface{}) *defaultResponse

Types

type ErrResponse

type ErrResponse struct {
	Message string `json:"message"`
}

type Response

type Response interface {
	SuccessEvent() interface{}
	FailedEvent() *ErrResponse
}

Jump to

Keyboard shortcuts

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