sap_api_request_client_header_setup

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 8 Imported by: 0

README

sap-api-request-client-header-setup

sap-api-request-client-header-setup は、主にエッジコンピューティング環境において、sap-sandbox が対象とする SAP APIs ならびに 各 SAP API Integrations の Runtimes のうち「creates」に分類される APIs ならびに Runtimes について、当該 Runtimes において Post する Json フォーマットに対して必要なヘッダ情報を付与するマイクロサービスです。

動作環境

sap-api-request-client-header-setup は、主にエッジコンピューティング環境における動作にフォーカスしています。
使用する際は、事前に下記の通り エッジコンピューティングの動作環境(推奨/必須)を用意してください。

  • エッジ Kubernetes (推奨)
  • AION のリソース (推奨)
  • OS: LinuxOS (必須)
  • CPU: ARM/AMD/Intel(いずれか必須)
  • Golang Runtime

クラウド環境での利用

sap-api-request-client-header-setup は、外部システムがクラウド環境である場合にSAPと統合するときにおいても、利用可能なように設計されています。

JSON に 付与される ヘッダデータ

sap-api-request-client-header-setup では、次のヘッダデータが付与されます。

  • Accept値(固定値 "application/json")
  • Content-Type値(固定値 "application/json")
  • csrfToken(コール先のSAPサーバーの csrfToken)
  • refreshTokenURL(コール先のSAPサーバーの csrfTokenURL)
  • SAPUser(SAPユーザID)
  • Pass(SAPパスワード)

go.mod / go.sum

sap-api-request-client-header-setup は、ライブラリであり、go.mod / go.sum に設定することで、他のレポジトリやランタイムで実行できます。
sap-api-request-client-header-setup は、sap-sandboxにおける SAP APIs ならびに 各 SAP API Integrations の Runtimes を対象としています。
sap-api-request-client-header-setup は、マイクロサービスとして利用されることができます。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SAPRequestClient

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

func NewSAPRequestClient

func NewSAPRequestClient(sapUserName, sapPass, refreshTokenURL string, retryMaxCnt, retryIntervalMilliSec int) *SAPRequestClient

func NewSAPRequestClientWithOption

func NewSAPRequestClientWithOption(o SAPRequestClientOption) *SAPRequestClient

func (*SAPRequestClient) Request

func (c *SAPRequestClient) Request(method, url string, params map[string]string, body string) (*http.Response, error)

type SAPRequestClientOption

type SAPRequestClientOption interface {
	User() string
	Pass() string
	RefreshTokenURL() string
	RetryMax() int
	RetryInterval() int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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