niservice

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NIService

type NIService struct{}

NIService struct is taking the parsed model, all input parameters and settings and creates a new HTTP request with all HTTP headers, url and body parameters set and sends it to SystemLink web service

func (NIService) Call

func (s NIService) Call(
	operation model.Operation,
	parameterValues []model.ParameterValue,
	settings model.Settings) (int, string, error)

Call is instantiating a new HTTP client, prepares the request object and sends a message to the target service The response is parsed and returned to the caller.

type ServiceError

type ServiceError struct {
	Message string
	Err     error
}

ServiceError is returned when the NI service call failed

func NewServiceError

func NewServiceError(message string, err error) *ServiceError

NewServiceError initializes a new error which happened when calling the NI service

func (*ServiceError) Error

func (e *ServiceError) Error() string

Error formats the ServiceError as a printable string

Jump to

Keyboard shortcuts

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