Categorygithub.com/galentuo/goframe
modulepackage
0.1.7
Repository: https://github.com/galentuo/goframe.git
Documentation: pkg.go.dev

# README

goframe

Go Report Card

Overview

goframe is a bare bones wrapper based on frame and glues together some useful features from different frameworks to act as a micro HTTP framework.

Install

go get -u github.com/galentuo/goframe

Usage

import "github.com/galentuo/goframe"

Examples

# Packages

No description provided by the author
No description provided by the author

# Functions

NewApp returns an instance of app.
NewConfig is used to create a new instance of Config Config reads the configs from config files or env variables.
NewContext is used to get an instance of the default implementation of goframe.Context.
NewError is used to define a new goframe error.
NewHTTPService creates a goframe HTTP Service; where `name` would be the default prefix of the Router.
NewRouter returns an instance of an implementation of Router interface.
NewServerContext is used to get an instance of the default implementation of goframe.ServerContext.

# Structs

MiddlewareStack manages the middleware stack for an app/Group.

# Interfaces

BackgroundService is a goframe Service used for running background workers.
Config is used to read the configs from config files or env variables.
Context is goframe implementation of context.
HTTPService is a goframe Service used for running a http server.
ResponseWriter interface is used by a goframe Handler to construct an HTTP response.
Router registers routes to be matched and dispatches a handler.
ServerContext is a goframe Context with more specific context related to a http server.
Service is the basic unit of a goframe app.

# Type aliases

Handler is the basis for a HTTPService Endpoint.
MiddlewareFunc defines the interface for a piece of goframe Middleware.