networking

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiVersion70 = "7.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImproperError

type ImproperError struct {
	Message *string `json:"Message,omitempty"`
}

type RestClient

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

func NewRestClient

func NewRestClient(baseUrl string, authorization string, providerVersion string) *RestClient

func (*RestClient) DeleteJSON

func (c *RestClient) DeleteJSON(ctx context.Context, pathSegments []string, queryParams url.Values, apiVersion string) (*http.Response, error)

func (*RestClient) GetJSON

func (c *RestClient) GetJSON(ctx context.Context, pathSegments []string, queryParams url.Values, apiVersion string) (*http.Response, error)

func (*RestClient) ParseJSON

func (c *RestClient) ParseJSON(ctx context.Context, response *http.Response, v any) error

func (*RestClient) PatchJSON

func (c *RestClient) PatchJSON(ctx context.Context, pathSegments []string, queryParams url.Values, body any, apiVersion string) (*http.Response, error)

func (*RestClient) PostJSON

func (c *RestClient) PostJSON(ctx context.Context, pathSegments []string, queryParams url.Values, body any, apiVersion string) (*http.Response, error)

func (*RestClient) PutJSON

func (c *RestClient) PutJSON(ctx context.Context, pathSegments []string, queryParams url.Values, body any, apiVersion string) (*http.Response, error)

func (*RestClient) UnwrapError

func (c *RestClient) UnwrapError(response *http.Response) (err error)

type WrappedError

type WrappedError struct {
	ExceptionId      *string                 `json:"$id,omitempty"`
	InnerError       *WrappedError           `json:"innerException,omitempty"`
	Message          *string                 `json:"message,omitempty"`
	TypeName         *string                 `json:"typeName,omitempty"`
	TypeKey          *string                 `json:"typeKey,omitempty"`
	ErrorCode        *int                    `json:"errorCode,omitempty"`
	EventId          *int                    `json:"eventId,omitempty"`
	CustomProperties *map[string]interface{} `json:"customProperties,omitempty"`
	StatusCode       *int
}

func (WrappedError) Error

func (e WrappedError) Error() string

type WrappedImproperError

type WrappedImproperError struct {
	Count *int           `json:"count,omitempty"`
	Value *ImproperError `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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