Categorygithub.com/apimatic/go-core-runtime
module
0.0.25
Repository: https://github.com/apimatic/go-core-runtime.git
Documentation: pkg.go.dev

# README

Getting Started with Go Core Runtime

Go Reference GitHub release Licence Tests Test Coverage Maintainability

Introduction

The go-core-runtime is a core library for Apimatic's Go SDK, providing essential utilities and structures for handling API requests and responses using the HTTP protocol. For detailed API documentation and usage examples, visit the GoDoc documentation.

Requirement

This package requires Go v1.18 or higher.

Installation

To install the package, you can use go get:

go get github.com/apimatic/go-core-runtime

Alternatively, you can add the package manually to your go.mod file:

require "github.com/apimatic/go-core-runtime" v0.0.x

Then, run the following command to install the package automatically:

go get ./...

Package Details

Following is a list of all packages. Here each package contains its own test files.

HTTPS

The https package provides logic related to HTTP requests, including building and making the request call. It offers features such as handling form data, file parameters, headers, and interceptors.

File NameDescription
API ResponseProvides a struct around the HTTP response and the data.
API ErrorProvides a structure to represent error responses from API calls.
Array SerializationProvides constants for array serialization like Indexed, Plain, etc.
Auth GroupProvides capability to group authentication keys into groups.
Auth InterfaceDefines the functionality of an authentication manager.
Call BuilderProvides the logic related to the HTTPs request. Includes building and making the request call.
File WrapperProvides a wrapper for file parameters to use in the HTTPs calls.
Form DataProvides handling of form parameters in the request.
HTTP ClientProvides an interface for the HTTP Client to use for making the calls.
HTTP ConfigurationProvides configurations for the HTTP calls.
HTTP ContextProvides a struct that holds request and corresponding response instances.
HTTP HeadersProvides handling for headers to send with the request.
Internal ErrorProvides handling for internal errors that may occur during the API calls.
InterceptorsProvides handling to intercept requests.
RetryerProvides handling to automatically retry for failed requests.

Logger

The logger package provides logic related to logging. It offers the Facade Design Pattern for configuring the Logger and SDK Logger. Additionally, it provides the LoggerConfiguration to customize logging behavior.

File NameDescription
Console LoggerProvides default implementation of Logger Interface to log messages.
LevelProvides constants for log level like Level_ERROR, Level_INFO, etc.
Logger ConfigurationProvides logging configurations for the Sdk Logger.
Response Logger ConfigurationProvides response logging configurations for the Sdk Logger.
Request Logger ConfigurationProvides request logging configurations for the Sdk Logger.
Sdk LoggerProvides default and null implementation of Sdk Logger Interface to log API requests and responses.

Test Helper

Package testHelper provides helper functions for testing purposes.

File NameDescription
BodyMatchersProvides functions to match JSON response bodies with expected bodies.
HeadersMatchersProvides functions to match HTTP headers with expected headers.
StatusCodeMatchersProvides functions to match HTTP status codes with expected status codes.

Types

Package types provides utility types and functions.

File NameDescription
OptionalProvides a wrapper to use any type as optional and nullable.

Utilities

The utilities package provides utility functions for making HTTP calls.

File NameDescription
API HelperProvides helper functions for making the HTTP calls.
Marshal ErrorDefines a structure for error that will be returned if marshalling/unmarshalling fail.
Union Type HelperProvides helper functions for unmarshalling containers of multiple types.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvement, please open an issue.

License

This project is licensed under the MIT License.

Contact

For any questions or support, please feel free to contact us at [email protected].

# Packages

Copyright (c) APIMatic.
No description provided by the author
Package testHelper provides helper functions for testing purposes.
Package types provides utility types and functions.
Package utilities provides various utility functions and helpers for common operations.