Categorygithub.com/anunnamedproject/framework
modulepackage
0.0.0-20180324113736-a32ce643fc77
Repository: https://github.com/anunnamedproject/framework.git
Documentation: pkg.go.dev

# README

AnUnamedFramework written in Golang

Inspired by many web frameworks during the last 20 years of software development.

Parts of this framework are still a work in progress, feel free to open an issue or a pull request.

# Functions

AddFunc register a func in the view.
ConcatenateCSS returns concatenated CSS paths to []byte.
DecodeCookie decrypt and return the cookie id.
DefaultConfig initialize the Config with basic configuration settings.
EncodeCookie return a new encrypted cookie string.
GetSessionID return the cookie from http request.
GetTemplateFuncs returs the FuncMap with framework custom functions.
LoadConfig loads the configuration file from specified path and returns the Config object.
MinifyCSS returns the minified CSS string.
MinifyHTML returns a minified HTML version.
MinifyJS returns a compressed javascript using Google Closure Compiler.
Mode retreives the current mode.
New initialize the engine and return an Engine struct.
NewContext creates new context for the given w and r.
NewContextPool create a new pool.
NewEmail creates a new Email instance.
NewFileSessionProvider returns a new file session provider.
NewFlash returns a new FlashData.
NewGRPC instantiates a new gRPC server.
NewLogger create and return a new Logger instance.
NewResponseWriter creates a ResponseWriter that wraps an http.ResponseWriter.
NewRouter instantiate a new Router.
NewSession creates the session provider instance using the provided name as provider and add it to the available session providers.
NewSessionID return a new random cookie.
NewValidator returns a new Validator instance.
NewView returns a View with templates loaded from viewDir.
PrepareJSON instantiate the JSONData and unmarshal the data json, returns a JSONData struct.
RegisterController register the specified controller on framework.
RegisterGRPCService registers a new gRPC service.
RemoveCSSComments returns a CSS comments striped string.
RemoveHTMLComments removes the HTML comments from provided []byte, returns a []byte.
Run start listening on configured HTTP port.
RunGRPC start gRPC listening on configured port.
RunTLS start HTTPS listening on configured port.
ServerStreamInterceptor creates a single stream interceptor from a list of interceptors.
ServerUnaryInterceptor creates a single unary interceptor from a list of interceptors.
SetGoogleAnalytics sets the google analytics id (UA-XXXXXXX-X) you can get the analytics code on views: {{ template "google_analytics" .
SetMode change the current mode.
Use appends a new global middleware.
UseGRPCStreamInterceptor appends a new global gRPC stream interceptor.
UseGRPCUnaryInterceptor appends a new global gRPC unary interceptor.

# Constants

No description provided by the author
No description provided by the author
DebugMode - set the framework in debug mode.
No description provided by the author
No description provided by the author
ProductionMode - set the framework in production mode.
TestMode - set the framework in testing mode.
VERSION of the Framework.
No description provided by the author

# Variables

App contains a pointer to the framework instance.
Config is the framework global configuration.
DefaultErrorMessages contains the rule's default error messages.
Log is the framework global Logger.

# Structs

BaseController implements the Controller.
No description provided by the author
Current framework config parameters: author string cache string cache_config string compress_html bool compress_css bool compress_js bool database string database_conn string mode string name string port int grpc_port int grpc_cert string grpc_cert_key string session string session_config JSON smtp_server string smtp_auth string smtp_username string smtp_password string version string template_left string template_right string pprof string.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FlashData maintains data across requests.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
View implements the Renderer interface.

# Interfaces

Current framework config parameters: author string cache string cache_config string compress_html bool compress_css bool compress_js bool database string database_conn string mode string name string port int grpc_port int grpc_cert string grpc_cert_key string session string session_config JSON smtp_server string smtp_auth string smtp_username string smtp_password string version string template_left string template_right string pprof string.
Controller interface for controller.
No description provided by the author
No description provided by the author
Renderer is the interface for template rendering.
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

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