sdk

package module
v0.0.0-...-3215105 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: MIT Imports: 0 Imported by: 0

README

go-rest-sdk

package that contains basic RESTful API structures.

Build Status Coverage Status Godoc license

It is mostly used to unify the response value for REST Api.

Features:

Under construction...

Installation:

go get -u github.com/kucjac/go-get-sdk

Examples:

The tests are written using go-convey package.

Under construction...

Inspired by:

Documentation

Overview

Package sdk is a pluggable SDK for creating RESTful API's in Golang.

Developed with an idea of creating RESTful API's using the most popular Golang tools, not forcing the use of specific one.

The SDK removes the complexity of using different web frameworks, databases and data models in a process of creating RESTful API's.

Almost all components are based on the interfaces. That enables combining multiple independent third-party tools. This solution allows to easily develop components either based on the 'go-rest-sdk' prepared tools or on custom implementations.

The package is divided into eight main components:

dberrors 	# unifies the database errors. Defines the 'Converter' interface and database Errors prototypes
errhandler	# handles is a mapping of database errors into resterrors. Defines 'ErrorHandler'
		that Handles provided 'dberrors.Error' and maps into 'resterrors.Error'
forms		# enables binding provided model to different form types.
handlers	# joins 'go-rest-sdk' packages to create model, web framework and database
		repository independent RESTful handlers.
refutils	# contains reflect encapsulations useful for other subpackages
repository	# defines database and models repositories. Defines 'Repository' interface.
response	# contains body for the RESTful API responses. Defines 'Responser' and
		'StatusResponser' interfaces.
resterrors	# defines RESTful response 'Errors', and their prototypes.

Directories

Path Synopsis
Package dberrors contains unified database Errors converted from third-party package errors.
Package dberrors contains unified database Errors converted from third-party package errors.
Package errhandler handles dberrors.Error conversion into resterrors.Error In order to automate handling database errors into proper resterror.Errors, errhandler package provide 'ErrorHandler' structure.
Package errhandler handles dberrors.Error conversion into resterrors.Error In order to automate handling database errors into proper resterror.Errors, errhandler package provide 'ErrorHandler' structure.
package forms contain structures and functions for model bindings REST API data models are being set to multiple form kinds over the lifetime of an application.
package forms contain structures and functions for model bindings REST API data models are being set to multiple form kinds over the lifetime of an application.
chi
mockrepo
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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