go-core-runtime

module
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT

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 Name Description
API Response Provides a struct around the HTTP response and the data.
API Error Provides a structure to represent error responses from API calls.
Array Serialization Provides constants for array serialization like Indexed, Plain, etc.
Auth Group Provides capability to group authentication keys into groups.
Auth Interface Defines the functionality of an authentication manager.
Call Builder Provides the logic related to the HTTPs request. Includes building and making the request call.
File Wrapper Provides a wrapper for file parameters to use in the HTTPs calls.
Form Data Provides handling of form parameters in the request.
HTTP Client Provides an interface for the HTTP Client to use for making the calls.
HTTP Configuration Provides configurations for the HTTP calls.
HTTP Context Provides a struct that holds request and corresponding response instances.
HTTP Headers Provides handling for headers to send with the request.
Internal Error Provides handling for internal errors that may occur during the API calls.
Interceptors Provides handling to intercept requests.
Retryer Provides handling to automatically retry for failed requests.
Test Helper

Package testHelper provides helper functions for testing purposes.

File Name Description
BodyMatchers Provides functions to match JSON response bodies with expected bodies.
HeadersMatchers Provides functions to match HTTP headers with expected headers.
StatusCodeMatchers Provides functions to match HTTP status codes with expected status codes.
Types

Package types provides utility types and functions.

File Name Description
Optional Provides a wrapper to use any type as optional and nullable.
Utilities

The utilities package provides utility functions for making HTTP calls.

File Name Description
API Helper Provides helper functions for making the HTTP calls.
Marshal Error Defines a structure for error that will be returned if marshalling/unmarshalling fail.
Union Type Helper Provides 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 support@apimatic.io.

Directories

Path Synopsis
Package testHelper provides helper functions for testing purposes.
Package testHelper provides helper functions for testing purposes.
Package types provides utility types and functions.
Package types provides utility types and functions.
Package utilities provides various utility functions and helpers for common operations.
Package utilities provides various utility functions and helpers for common operations.

Jump to

Keyboard shortcuts

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