rpc_response

package
v2.5.6 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientResponseMapping map[string]func() IResponse

Functions

func GetGrpcResponseStatusCode

func GetGrpcResponseStatusCode(response IResponse) string

get grpc response status code with NA default.

Types

type BatchInstanceResponse

type BatchInstanceResponse struct {
	*Response
}

func (*BatchInstanceResponse) GetResponseType

func (c *BatchInstanceResponse) GetResponseType() string

type ClientDetectionResponse

type ClientDetectionResponse struct {
	*Response
}

func (*ClientDetectionResponse) GetResponseType

func (c *ClientDetectionResponse) GetResponseType() string

type ConfigChangeBatchListenResponse

type ConfigChangeBatchListenResponse struct {
	*Response
	ChangedConfigs []model.ConfigContext `json:"changedConfigs"`
}

func (*ConfigChangeBatchListenResponse) GetResponseType

func (c *ConfigChangeBatchListenResponse) GetResponseType() string

type ConfigPublishResponse

type ConfigPublishResponse struct {
	*Response
}

func (*ConfigPublishResponse) GetResponseType

func (c *ConfigPublishResponse) GetResponseType() string

type ConfigQueryResponse

type ConfigQueryResponse struct {
	*Response
	Content          string `json:"content"`
	EncryptedDataKey string `json:"encryptedDataKey"`
	ContentType      string `json:"contentType"`
	Md5              string `json:"md5"`
	LastModified     int64  `json:"lastModified"`
	IsBeta           bool   `json:"isBeta"`
	Tag              bool   `json:"tag"`
}

func (*ConfigQueryResponse) GetResponseType

func (c *ConfigQueryResponse) GetResponseType() string

type ConfigRemoveResponse

type ConfigRemoveResponse struct {
	*Response
}

func (*ConfigRemoveResponse) GetResponseType

func (c *ConfigRemoveResponse) GetResponseType() string

type ConnectResetResponse

type ConnectResetResponse struct {
	*Response
}

func (*ConnectResetResponse) GetResponseType

func (c *ConnectResetResponse) GetResponseType() string

type ErrorResponse

type ErrorResponse struct {
	*Response
}

func (*ErrorResponse) GetResponseType

func (c *ErrorResponse) GetResponseType() string

type HealthCheckResponse

type HealthCheckResponse struct {
	*Response
}

func (*HealthCheckResponse) GetResponseType

func (c *HealthCheckResponse) GetResponseType() string

type IResponse

type IResponse interface {
	GetResponseType() string
	SetRequestId(requestId string)
	GetBody() string
	GetErrorCode() int
	IsSuccess() bool
	SetSuccess(bool)
	GetResultCode() int
	GetMessage() string
}

func InnerResponseJsonUnmarshal

func InnerResponseJsonUnmarshal(responseBody []byte, responseFunc func() IResponse) (IResponse, error)

type InstanceResponse

type InstanceResponse struct {
	*Response
}

func (*InstanceResponse) GetResponseType

func (c *InstanceResponse) GetResponseType() string

type MockResponse

type MockResponse struct {
	*Response
}

func (*MockResponse) GetResponseType

func (c *MockResponse) GetResponseType() string

type NotifySubscriberResponse

type NotifySubscriberResponse struct {
	*Response
}

func (*NotifySubscriberResponse) GetResponseType

func (c *NotifySubscriberResponse) GetResponseType() string

type QueryServiceResponse

type QueryServiceResponse struct {
	*Response
	ServiceInfo model.Service `json:"serviceInfo"`
}

func (*QueryServiceResponse) GetResponseType

func (c *QueryServiceResponse) GetResponseType() string

type Response

type Response struct {
	ResultCode int    `json:"resultCode"`
	ErrorCode  int    `json:"errorCode"`
	Success    bool   `json:"success"`
	Message    string `json:"message"`
	RequestId  string `json:"requestId"`
}

func (*Response) GetBody

func (r *Response) GetBody() string

func (*Response) GetErrorCode

func (r *Response) GetErrorCode() int

func (*Response) GetMessage

func (r *Response) GetMessage() string

func (*Response) GetResultCode

func (r *Response) GetResultCode() int

func (*Response) IsSuccess

func (r *Response) IsSuccess() bool

func (*Response) SetRequestId

func (r *Response) SetRequestId(requestId string)

func (*Response) SetSuccess

func (r *Response) SetSuccess(successResult bool)

type ResponseCode

type ResponseCode int
const (
	ResponseSuccessCode ResponseCode = 200
	ResponseFailCode    ResponseCode = 500

	ResponseSuccessField = "success"
)

type ServerCheckResponse

type ServerCheckResponse struct {
	*Response
	ConnectionId string `json:"connectionId"`
}

func (*ServerCheckResponse) GetResponseType

func (c *ServerCheckResponse) GetResponseType() string

type ServiceListResponse

type ServiceListResponse struct {
	*Response
	Count        int      `json:"count"`
	ServiceNames []string `json:"serviceNames"`
}

func (*ServiceListResponse) GetResponseType

func (c *ServiceListResponse) GetResponseType() string

type SubscribeServiceResponse

type SubscribeServiceResponse struct {
	*Response
	ServiceInfo model.Service `json:"serviceInfo"`
}

func (*SubscribeServiceResponse) GetResponseType

func (c *SubscribeServiceResponse) GetResponseType() string

Jump to

Keyboard shortcuts

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