response

package
v0.8.1-beta1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: Apache-2.0 Imports: 0 Imported by: 42

Documentation

Overview

Package response is the response of service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Common

type Common interface {
	GetRetCode() int
	GetMessage() string
	GetAction() string
}

Common describe a response of action, it is only used for ucloud open api v1 via HTTP GET and action parameters.

type CommonBase

type CommonBase struct {
	Action  string
	RetCode int
	Message string
}

CommonBase has common attribute and method, it also implement ActionResponse interface.

func (*CommonBase) GetAction

func (c *CommonBase) GetAction() string

GetAction will return the request action of ucloud api

func (*CommonBase) GetMessage

func (c *CommonBase) GetMessage() string

GetMessage will return the error message of ucloud api

func (*CommonBase) GetRetCode

func (c *CommonBase) GetRetCode() int

GetRetCode will return the error code of ucloud api Error is non-zero and succuess is zero

Jump to

Keyboard shortcuts

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