errors

package
v0.0.0-...-54ce5d6 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errors handles multiple errors that can be returned from the Tradier API

Example:

{
  "errors": {
    "error": [
      "Backoffice rejected override of the order.",
      "InitialMargin"
    ]
  }
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Errors

type Errors struct {
	Err []error `json:"error"`
}

Errors hold a collection of errors returned by a response.

func (*Errors) AppendStrings

func (e *Errors) AppendStrings(errorStrings []string)

AppendStrings appends a slice of strings to *Errors.Err.

func (*Errors) Error

func (e *Errors) Error() string

func (*Errors) MarshalJSON

func (e *Errors) MarshalJSON() ([]byte, error)

MarshalJSON marshals Errors into its JSON representation.

func (*Errors) UnmarshalJSON

func (e *Errors) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals errors into Errors object.

Jump to

Keyboard shortcuts

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