Documentation ¶
Index ¶
- Constants
- func CreateServer(setupHandlers setupHandlers, cfg config.Handler, port int, development bool) *http.Server
- func MakeSCRestAPICall(scAddress string, relativePath string, params map[string]string) ([]byte, error)
- func NewClient() *http.Client
- func NewRetryableClient(retryMax int) *retryablehttp.Client
- func StartServer(server *http.Server, appCtxCancel func())
Constants ¶
View Source
const (
// ScRestApiUrl represents base URL path to execute smart contract rest points.
ScRestApiUrl = "v1/screst/"
)
Variables ¶
This section is empty.
Functions ¶
func CreateServer ¶
func CreateServer(setupHandlers setupHandlers, cfg config.Handler, port int, development bool) *http.Server
CreateServer creates http.Server and setups handlers.
func MakeSCRestAPICall ¶
func MakeSCRestAPICall(scAddress string, relativePath string, params map[string]string) ([]byte, error)
MakeSCRestAPICall calls smart contract with provided address and makes retryable request to smart contract resource with provided relative path using params.
func NewRetryableClient ¶
func NewRetryableClient(retryMax int) *retryablehttp.Client
NewRetryableClient creates default retryablehttp.Client with timeouts and embedded NewClient result.
func StartServer ¶
StartServer calls http.Server.ListenAndServe and calls app context cancel if error occurs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.