gorfc

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gorfc provides SAP NetWeawer RFC SDK client bindings for GO

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNWRFCLibVersion

func GetNWRFCLibVersion() (major, minor, patchlevel uint)

GetNWRFCLibVersion returnd the major version, minor version and patchlevel of the SAP NetWeaver RFC library used.

Types

type Connection

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

Client Connection

func ConnectionFromDest

func ConnectionFromDest(dest string) (conn *Connection, err error)

ConnectionFromDest creates a new connection with just the dest system id.

func ConnectionFromParams

func ConnectionFromParams(connectionParams ConnectionParameters) (conn *Connection, err error)

ConnectionFromParams creates a new connection with the given connection parameters and tries to open it. Returns the connection if successfull, otherwise nil.

func (*Connection) Alive

func (conn *Connection) Alive() bool

Alive returns true if the connection is open else returns false.

func (*Connection) Call

func (conn *Connection) Call(goFuncName string, params interface{}) (result map[string]interface{}, err error)

Call calls the given function with the given parameters and wraps the results returned.

func (*Connection) Close

func (conn *Connection) Close() (err error)

Close closes the connection and sets alive to false.

func (*Connection) GetConnectionAttributes

func (conn *Connection) GetConnectionAttributes() (connAttr ConnectionAttributes, err error)

GetConnectionAttributes returns the wrapped connection attributes of the connection.

func (*Connection) GetFunctionDescription

func (conn *Connection) GetFunctionDescription(goFuncName string) (goFuncDesc FunctionDescription, err error)

GetFunctionDescription returns the wrapped function description of the given function.

func (*Connection) Open

func (conn *Connection) Open() (err error)

Open opens the connection and sets alive to true.

func (*Connection) Ping

func (conn *Connection) Ping() (err error)

Ping pings the server which the client is connected to and does nothing with the error if one occurs.

func (*Connection) RStrip

func (conn *Connection) RStrip(rstrip bool) *Connection

RStrip sets rstrip of the given connection to the passed parameter and returns the connection right strips strings returned from RFC call (default is true)

func (*Connection) Reopen

func (conn *Connection) Reopen() (err error)

Reopen closes and opens the connection.

func (*Connection) ReturnImportParams

func (conn *Connection) ReturnImportParams(returnImportParams bool) *Connection

ReturnImportParams sets returnImportParams of the given connection to the passed parameter and returns the connection

type ConnectionAttributes

type ConnectionAttributes map[string]string

ConnectionAttributes returned by getConnectionInfo() method

type ConnectionParameters

type ConnectionParameters map[string]string

Connection Parameters

type FieldDescription

type FieldDescription struct {
	Name      string
	FieldType string
	NucLength uint
	NucOffset uint
	UcLength  uint
	UcOffset  uint
	Decimals  uint
	TypeDesc  TypeDescription
}

FieldDescription type

type FunctionDescription

type FunctionDescription struct {
	Name       string
	Parameters []ParameterDescription
}

FunctionDescription type

func (FunctionDescription) String

func (funcDesc FunctionDescription) String() (result string)

type GoRfcError

type GoRfcError struct {
	Description string
	GoError     error
}

GoRfcError is returned by gorfc

func (GoRfcError) Error

func (err GoRfcError) Error() string

type ParameterDescription

type ParameterDescription struct {
	Name          string
	ParameterType string
	Direction     string
	NucLength     uint
	UcLength      uint
	Decimals      uint
	DefaultValue  string
	ParameterText string
	Optional      bool
	TypeDesc      TypeDescription
}

ParameterDescription type

func (ParameterDescription) String

func (paramDesc ParameterDescription) String() string

type RfcError

type RfcError struct {
	Description string
	ErrorInfo   rfcSDKError
}

RfcError is returned by SAP NWRFC SDK

func (RfcError) Error

func (err RfcError) Error() string

type TypeDescription

type TypeDescription struct {
	Name      string
	NucLength uint
	UcLength  uint
	Fields    []FieldDescription
}

TypeDescription type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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