sdkerrors

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalTestException

type GlobalTestException struct {
	// Represents the server's error code
	ServerCode int `json:"ServerCode"`
	// Represents the server's exception message
	ServerMessage string `json:"ServerMessage"`
}

GlobalTestException - To test specific global exceptions.

func (*GlobalTestException) Error

func (e *GlobalTestException) Error() string

type LocalTestException

type LocalTestException struct {
	// Represents the specific endpoint info
	SecretMessageForEndpoint string `json:"SecretMessageForEndpoint"`
	// Represents the server's error code
	ServerCode int `json:"ServerCode"`
	// Represents the server's exception message
	ServerMessage string `json:"ServerMessage"`
}

LocalTestException - To test specific global exceptions.

func (*LocalTestException) Error

func (e *LocalTestException) Error() string

type NestedModelException

type NestedModelException struct {
	ServerCode    string   `json:"ServerCode"`
	ServerMessage string   `json:"ServerMessage"`
	Model         Validate `json:"model"`
}

func (*NestedModelException) Error

func (e *NestedModelException) Error() string

type SDKError

type SDKError struct {
	Message     string
	StatusCode  int
	Body        string
	RawResponse *http.Response
}

func NewSDKError

func NewSDKError(message string, statusCode int, body string, httpRes *http.Response) *SDKError

func (*SDKError) Error

func (e *SDKError) Error() string

type Validate

type Validate struct {
	Address *string `json:"address,omitempty"`
	Field   string  `json:"field"`
	Name    string  `json:"name"`
}

func (*Validate) GetAddress added in v0.2.0

func (o *Validate) GetAddress() *string

func (*Validate) GetField added in v0.2.0

func (o *Validate) GetField() string

func (*Validate) GetName added in v0.2.0

func (o *Validate) GetName() string

Jump to

Keyboard shortcuts

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