rest

package
v0.0.0-...-4ab6a2d Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcatURL

func ConcatURL(segments ...string) string

ConcatURL handle slashes between segments automatically.

func NewServiceErr

func NewServiceErr(message string, err error) error

func NewUserErr

func NewUserErr(message string, err error) error

Types

type Response

type Response struct {
	StatusCode int
	Data       []byte
}

func Delete

func Delete(uri string, params ...interface{}) (*Response, error)

func Get

func Get(uri string, params ...interface{}) (*Response, error)

func Post

func Post(uri string, data interface{}, params ...interface{}) (*Response, error)

func Put

func Put(uri string, data interface{}, params ...interface{}) (*Response, error)

func (*Response) JSON

func (r *Response) JSON(path string) gjson.Result

func (*Response) Map

func (r *Response) Map(path string) map[string]interface{}

type ServiceErr

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

func (*ServiceErr) Error

func (e *ServiceErr) Error() string

type UserErr

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

func (*UserErr) Error

func (e *UserErr) Error() string

Jump to

Keyboard shortcuts

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