SOAService

package
v0.0.0-...-89505e1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Context *gin.Context `json:"-"`

	Meta Meta        `json:"meta"`
	Data interface{} `json:"data"`
}

func NewAPIResponse

func NewAPIResponse(ctx *gin.Context) (rs *APIResponse)

type Meta

type Meta struct {
	ResultCode    int    `json:"result_code"`
	ResultMessage string `json:"result_message"`
	ReturnCode    int    `json:"return_code"`
	ReturnMessage string `json:"return_message"`
	Locale        string `json:"locale"`
	Timezone      string `json:"timezone"`
}

type RestService

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

func NewRestService

func NewRestService() *RestService

func (RestService) BindHeader

func (srv RestService) BindHeader(obj interface{}) SOA

func (RestService) BindJSON

func (srv RestService) BindJSON(obj interface{}) SOA

func (RestService) Code

func (srv RestService) Code(httpCode *int) SOA

func (RestService) Do

func (srv RestService) Do() error

func (RestService) GET

func (srv RestService) GET(url string) SOA

func (RestService) POST

func (srv RestService) POST(url string) SOA

func (RestService) SetBody

func (srv RestService) SetBody(obj interface{}) SOA

func (RestService) SetForm

func (srv RestService) SetForm(obj interface{}) SOA

func (RestService) SetHeader

func (srv RestService) SetHeader(obj interface{}) SOA

type RspHeader

type RspHeader struct {
	ContentType string `header:"Content-Type"`
}

type SOA

type SOA interface {
	SetHeader(obj interface{}) SOA
	SetBody(obj interface{}) SOA
	SetForm(obj interface{}) SOA

	BindJSON(obj interface{}) SOA
	BindHeader(obj interface{}) SOA
	Code(httpCode *int) SOA

	GET(url string) SOA
	POST(url string) SOA
	Do() error
}

Jump to

Keyboard shortcuts

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