Categorygithub.com/bear256/iris
modulepackage
4.2.5+incompatible
Repository: https://github.com/bear256/iris.git
Documentation: pkg.go.dev

# README


Build Status

https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg

Platforms

License

Built with GoLang


Releases

Examples

Practical Guide/Docs

Chat

The fastest backend web framework for Go.
Easy to learn, while it's highly customizable.
Ideally suited for both experienced and novice Developers.

Quick Look

package main

import "github.com/kataras/iris"

func main() {
	iris.Favicon("./favicon.ico")

	iris.Get("/", func(ctx *iris.Context) {
		ctx.Render("index.html")
	})

	iris.Get("/login", func(ctx *iris.Context) {
		ctx.Render("login.html", iris.Map{"Title": "Login Page"})
	})

	iris.Post("/login", func(ctx *iris.Context) {
		secret := ctx.PostValue("secret")
		ctx.Session().Set("secret", secret)

		ctx.Redirect("/user")
	})

	iris.Listen(":8080")
}

Installation

The only requirement is the Go Programming Language, at least v1.7.

$ go get -u github.com/kataras/iris/iris

If you have installation issues or you are connected to the Internet through China please, click here.

Docs & Community

If you'd like to discuss this package, or ask questions about it, feel free to

New website-docs & logo have been designed by the community*

Features

  • Focus on high performance
  • Robust routing, static, wildcard subdomains and routes.
  • Websocket API, Sessions support out of the box
  • Remote control through SSH
  • View system supporting 6+ template engines.*
  • Highly scalable response engines with pre-defined serializers
  • Live reload
  • Typescript integration + Online editor
  • OAuth, OAuth2 supporting 27+ API providers, JWT, BasicAuth
  • and many other surprises
NameDescriptionUsage
JSON JSON Serializer (Default)example 1,example 2, book section
JSONP JSONP Serializer (Default)example 1,example 2, book section
XML XML Serializer (Default)example 1,example 2, book section
Markdown Markdown Serializer (Default)example 1,example 2, book section
TextText Serializer (Default)example 1, book section
Binary Data Binary Data Serializer (Default)example 1, book section
HTML/Default Engine HTML Template Engine (Default)example , book section
Django Engine Django Template Engineexample , book section
Pug/Jade Engine Pug Template Engineexample , book section
Handlebars Engine Handlebars Template Engineexample , book section
Amber Engine Amber Template Engineexample , book section
Markdown Engine Markdown Template Engineexample , book section
Basicauth Middleware HTTP Basic authenticationexample 1, example 2, book section
JWT Middleware JSON Web Tokensexample , book section
Cors Middleware Cross Origin Resource Sharing W3 specificationhow to use
Secure Middleware Facilitates some quick security winsexample
I18n Middleware Simple internationalizationexample, book section
Recovery Middleware Safety recover the station from panicexample
Logger Middleware Logs every requestexample, book section
Editor PluginAlm-tools, a typescript online IDE/Editorbook section
Typescript PluginAuto-compile client-side typescript filesbook section
OAuth,OAuth2 PluginUser Authentication was never be easier, supports >27 providersexample, book section
Iris control PluginBasic (browser-based) control over your Iris stationexample, book section

FAQ

Explore these questions or navigate to the community chat.

Philosophy

The Iris philosophy is to provide robust tooling for HTTP, making it a great solution for single page applications, web sites, hybrids, or public HTTP APIs.

Iris does not force you to use any specific ORM or template engine. With support for the most used template engines, you can quickly craft the perfect application.

Iris is built on top of fasthttp (http basic layer), net/http middleware will not work by default on Iris, but you can convert any net/http middleware to Iris, see middleware repository to see how.

If for any personal reasons you think that Iris+fasthttp is not suitable for you, but you don't want to miss the unique features that Iris provides, you can take a look at the HTTP2 Q web framework.

Benchmarks

This Benchmark test aims to compare the whole HTTP request processing between Go web frameworks.

Benchmark Wizzard July 21, 2016- Processing Time Horizontal Graph

The results have been updated on July 21, 2016

Testing

Community should write third-party or iris base tests to the iris-contrib/tests repository. I recommend writing your API tests using this new library, httpexpect which supports Iris and fasthttp now, after my request here.

Versioning

Current: v4.2.5

Iris is an active project

Read more about Semantic Versioning 2.0.0

Todo

  • Use of the standard log.Logger instead of the iris-contrib/logger(colorful logger), make these changes to all middleware, examples and plugins.
  • Implement, even, a better way to manage configuration/options, devs will be able to set their own custom options inside there. I'm thinking of something the last days, but it will have breaking changes.
  • Implement an internal updater, as requested here.

Iris is a Community-Driven Project, waiting for your suggestions and feature requests!

I, as the author of this package, am working full time on this package, no time to any other job, so if you're willing to donate and you can afford it please click here, thank you!

People

The big thanks goes to all people who help building this framework with feature-requests & bug reports!

The author of Iris is @kataras.

Contributing

If you are interested in contributing to the Iris project, please see the document CONTRIBUTING.

License

This project is licensed under the Apache License, Version 2.0.

License can be found here.

# Packages

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

# Functions

AddServer same as .Servers.Add(ServerConfiguration) AddServer starts a server which listens to this station Note that the view engine's functions {{ url }} and {{ urlpath }} will return the first's registered server's scheme (http/https) this is useful mostly when you want to have two or more listening ports ( two or more servers ) for the same station receives one parameter which is the ServerConfiguration for the new server returns the new standalone server( you can close this server by the returning reference) If you need only one server you can use the blocking-funcs: .Listen/ListenTLS/ListenUNIX/ListenTo this is a NOT A BLOCKING version, the main .Listen/ListenTLS/ListenUNIX/ListenTo should be always executed LAST, so this function goes before the main .Listen/ListenTLS/ListenUNIX/ListenTo.
Any registers a route for ALL of the http methods (Get,Post,Put,Head,Patch,Options,Connect,Delete).
API converts & registers a custom struct to the router receives two parameters first is the request path (string) second is the custom struct (interface{}) which can be anything that has a *iris.Context as field.
CheckForUpdates will try to search for newer version of Iris based on the https://github.com/kataras/iris/releases If a newer version found then the app will ask the he dev/user if want to update the 'x' version if 'y' is pressed then the updater will try to install the latest version the updater, will notify the dev/user that the update is finished and should restart the App manually.
Close terminates all the registered servers and returns an error if any if you want to panic on this error use the iris.Must(iris.Close()).
Connect registers a route for the Connect http method.
DecodeFasthttpURL returns the path decoded as url useful when you want to pass something to a database and be valid to retrieve it via context.Param use it only for special cases, when the default behavior doesn't suits you.
DecodeURL returns the uri parameter as url (string) useful when you want to pass something to a database and be valid to retrieve it via context.Param use it only for special cases, when the default behavior doesn't suits you.
DefaultConfiguration returns the default configuration for an Iris station, fills the main Configuration.
DefaultServerConfiguration returns the default configs for the server.
DefaultSessionsConfiguration the default configs for Sessions.
DefaultTesterConfiguration returns the default configuration for a tester the ListeningAddr is used as virtual only when no running server is founded.
DefaultWebsocketConfiguration returns the default config for iris-ws websocket package.
Delete registers a route for the Delete http method.
Done registers Handler 'middleware' the only difference from .Use is that it should be used BEFORE any party route registered or AFTER ALL party's routes have been registered.
DoneFunc registers HandlerFunc 'middleware' the only difference from .Use is that it should be used BEFORE any party route registered or AFTER ALL party's routes have been registered.
EmitError fires a custom http error handler to the client if no custom error defined with this statuscode, then iris creates one, and once at runtime.
Favicon serves static favicon accepts 2 parameters, second is optional favPath (string), declare the system directory path of the __.ico requestPath (string), it's the route's path, by default this is the "/favicon.ico" because some browsers tries to get this by default first, you can declare your own path if you have more than one favicon (desktop, mobile and so on) this func will add a route for you which will static serve the /yuorpath/yourfile.ico to the /yourfile.ico (nothing special that you can't handle by yourself) Note that you have to call it on every favicon you have to serve automatically (dekstop, mobile and so on) panics on error.
Get registers a route for the Get http method.
Go starts the iris station, listens to all registered servers, and prepare only if Virtual.
Handle registers a route to the server's router if empty method is passed then registers handler(s) for all methods, same as .Any, but returns nil as result.
HandleFunc registers and returns a route with a method string, path string and a handler registedPath is the relative url path.
Head registers a route for the Head http method.
Listen starts the standalone http server which listens to the addr parameter which as the form of host:port It panics on error if you need a func to return an error, use the ListenTo.
ListenTLS Starts a https server with certificates, if you use this method the requests of the form of 'http://' will fail only https:// connections are allowed which listens to the addr parameter which as the form of host:port It panics on error if you need a func to return an error, use the ListenTo ex: iris.ListenTLS(":8080","yourfile.cert","yourfile.key").
ListenTLSAuto starts a server listening at the specific nat address using key & certification taken from the letsencrypt.org 's servers it also starts a second 'http' server to redirect all 'http://$ADDR_HOSTNAME:80' to the' https://$ADDR' Notes: if you don't want the last feature you should use this method: iris.ListenTo(iris.ServerConfiguration{ListeningAddr: "mydomain.com:443", AutoTLS: true}) it's a blocking function Limit : https://github.com/iris-contrib/letsencrypt/blob/master/lets.go#L142 example: https://github.com/iris-contrib/examples/blob/master/letsencyrpt/main.go.
ListenTo listens to a server but accepts the full server's configuration returns an error, you're responsible to handle that ex: ris.ListenTo(iris.ServerConfiguration{ListeningAddr:":8080"}) ex2: err := iris.ListenTo(iris.OptionServerListeningAddr(":8080")) or use the iris.Must(iris.ListenTo(iris.ServerConfiguration{ListeningAddr:":8080"})) it's a blocking func.
ListenUNIX starts the process of listening to the new requests using a 'socket file', this works only on unix It panics on error if you need a func to return an error, use the ListenTo ex: iris.ListenUNIX(":8080", Mode: os.FileMode).
ListenVirtual is useful only when you want to test Iris, it doesn't starts the server but it configures and returns it initializes the whole framework but server doesn't listens to a specific net.Listener it is not blocking the app.
Lookup returns a registed route by its name.
Lookups returns all registed routes.
Must panics on error, it panics on registed iris' logger.
New creates and returns a new Iris instance.
NewLoggerHandler is a basic Logger middleware/Handler (not an Entry Parser).
NewSSHServer returns a new empty SSHServer.
NewTester Prepares and returns a new test framework based on the api is useful when you need to have more than one test framework for the same iris insttance, otherwise you can use the iris.Tester(t *testing.T)/variable.Tester(t *testing.T).
NewWebsocketServer returns an empty WebsocketServer, nothing special here.
OnError registers a custom http error handler.
Options registers a route for the Options http method.
ParseParams receives a string and returns PathParameters (slice of PathParameter) received string must have this form: key1=value1,key2=value2...
Party is just a group joiner of routes which have the same prefix and share same middleware(s) also.
Patch registers a route for the Patch http method.
Path used to check arguments with the route's named parameters and return the correct url if parse failed returns empty string.
Post
Post registers a route for the Post http method.
Put registers a route for the Put http method.
RouteConflicts checks for route's middleware conflicts.
SerializeToString returns the string of a serializer, does not render it to the client returns empty string on error.
ServerParseAddr parses the listening addr and returns this.
Set sets an option aka configuration field to the default iris instance.
Static registers a route which serves a system directory this doesn't generates an index page which list all files no compression is used also, for these features look at StaticFS func accepts three parameters first parameter is the request url path (string) second parameter is the system directory (string) third parameter is the level (int) of stripSlashes * stripSlashes = 0, original path: "/foo/bar", result: "/foo/bar" * stripSlashes = 1, original path: "/foo/bar", result: "/bar" * stripSlashes = 2, original path: "/foo/bar", result: "".
StaticContent serves bytes, memory cached, on the reqPath a good example of this is how the websocket server uses that to auto-register the /iris-ws.js.
StaticFS registers a route which serves a system directory this is the fastest method to serve static files generates an index page which list all files if you use this method it will generate compressed files also think this function as small fileserver with http accepts three parameters first parameter is the request url path (string) second parameter is the system directory (string) third parameter is the level (int) of stripSlashes * stripSlashes = 0, original path: "/foo/bar", result: "/foo/bar" * stripSlashes = 1, original path: "/foo/bar", result: "/bar" * stripSlashes = 2, original path: "/foo/bar", result: "".
StaticHandler returns a Handler to serve static system directory Accepts 5 parameters first is the systemPath (string) Path to the root directory to serve files from.
StaticServe serves a directory as web resource it's the simpliest form of the Static* functions Almost same usage as StaticWeb accepts only one required parameter which is the systemPath ( the same path will be used to register the GET&HEAD routes) if second parameter is empty, otherwise the requestPath is the second parameter it uses gzip compression (compression on each request, no file cache).
StaticWeb same as Static but if index.html exists and request uri is '/' then display the index.html's contents accepts three parameters first parameter is the request url path (string) second parameter is the system directory (string) third parameter is the level (int) of stripSlashes * stripSlashes = 0, original path: "/foo/bar", result: "/foo/bar" * stripSlashes = 1, original path: "/foo/bar", result: "/bar" * stripSlashes = 2, original path: "/foo/bar", result: "" * if you don't know what to put on stripSlashes just 1.
StatusText returns a text for the HTTP status code.
TemplateSourceString executes a template source(raw string contents) from the first template engines which supports raw parsing returns its result as string, useful when you want it for sending rich e-mails returns empty string on error.
TemplateString executes a template from the default template engine and returns its result as string, useful when you want it for sending rich e-mails returns empty string on error.
Tester returns the test framework for this default insance.
ToHandler converts an httapi.Handler or http.HandlerFunc to an iris.Handler.
ToHandlerFastHTTP converts an fasthttp.RequestHandler to an iris.Handler.
ToHandlerFunc converts an http.Handler or http.HandlerFunc to an iris.HandlerFunc.
Trace registers a route for the Trace http method.
URL returns the subdomain+ host + Path(...optional named parameters if route is dynamic) returns an empty string if parse is failed.
Use registers Handler middleware.
UseFunc registers HandlerFunc middleware.
UseGlobal registers Handler middleware to the beginning, prepends them instead of append Use it when you want to add a global middleware to all parties, to all routes in all subdomains It can be called after other, (but before .Listen of course).
UseGlobalFunc registers HandlerFunc middleware to the beginning, prepends them instead of append Use it when you want to add a global middleware to all parties, to all routes in all subdomains It can be called after other, (but before .Listen of course).
UseSerializer accepts a Serializer and the key or content type on which the developer wants to register this serializer the gzip and charset are automatically supported by Iris, by passing the iris.RenderOptions{} map on the context.Render context.Render renders this response or a template engine if no response engine with the 'key' found with these engines you can inject the context.JSON,Text,Data,JSONP,XML also to do that just register with UseSerializer(mySerializer,"application/json") and so on look at the https://github.com/kataras/go-serializer for examples if more than one serializer with the same key/content type exists then the results will be appended to the final request's body this allows the developer to be able to create 'middleware' responses engines Note: if you pass an engine which contains a dot('.') as key, then the engine will not be registered.
UseSessionDB registers a session database, you can register more than one accepts a session database which implements a Load(sid string) map[string]interface{} and an Update(sid string, newValues map[string]interface{}) the only reason that a session database will be useful for you is when you want to keep the session's values/data after the app restart a session database doesn't have write access to the session, it doesn't accept the context, so forget 'cookie database' for sessions, I will never allow that, for your protection.
UseTemplate adds a template engine to the iris view system it does not build/load them yet.

# Constants

All is the string which the Emmiter use to send a message to all.
Broadcast is the string which the Emmiter use to send a message to all except this websocket.Connection, same as 'NotMe'.
Default values for base Iris conf.
DefaultCookieLength is the default Session Manager's CookieLength, which is 32.
DefaultCookieName the secret cookie's name for sessions.
Default values for base Iris conf.
Default values for base Iris conf.
Default values for base Iris conf.
DefaultMaxMessageSize 1024.
DefaultMaxRequestBodySize is 8MB.
DefaultPingPeriod (DefaultPongTimeout * 9) / 10.
DefaultPongTimeout 60 * time.Second.
Per-connection buffer size for requests' reading.
DefaultServerHostname returns the default hostname which is 0.0.0.0.
DefaultServerName the response header of the 'Server' value when writes to the client.
DefaultServerPort returns the default port which is 8080.
DefaultSessionGcDuration is the default Session Manager's GCDuration , which is 2 hours.
Per-connection buffer size for responses' writing.
DefaultWriteTimeout 15 * time.Second.
MethodConnect "CONNECT".
MethodDelete "DELETE".
MethodGet "GET".
MethodHead "HEAD".
MethodOptions "OPTIONS".
MethodPatch "PATCH".
MethodPost "POST".
MethodPut "PUT".
MethodTrace "TRACE".
NoLayout to disable layout for a particular template file.
NotMe is the string which the Emmiter use to send a message to all except this websocket.Connection.
StatusAccepted http status '202'.
StatusBadGateway http status '502'.
StatusBadRequest http status '400'.
StatusConflict http status '409'.
StatusContinue http status '100'.
StatusCreated http status '201'.
StatusExpectationFailed http status '417'.
StatusForbidden http status '403'.
StatusFound http status '302'.
StatusGatewayTimeout http status '504'.
StatusGone http status '410'.
StatusHTTPVersionNotSupported http status '505'.
StatusInternalServerError http status '500'.
StatusLengthRequired http status '411'.
StatusMethodNotAllowed http status '405'.
StatusMovedPermanently http status '301'.
StatusMultipleChoices http status '300'.
StatusNetworkAuthenticationRequired http status '511'.
StatusNoContent http status '204'.
StatusNonAuthoritativeInfo http status '203'.
StatusNotAcceptable http status '406'.
StatusNotFound http status '404'.
StatusNotImplemented http status '501'.
StatusNotModified http status '304'.
StatusOK http status '200'.
StatusPartialContent http status '206'.
StatusPaymentRequired http status '402'.
StatusPreconditionFailed http status '412'.
StatusPreconditionRequired http status '428'.
StatusProxyAuthRequired http status '407'.
StatusRequestedRangeNotSatisfiable http status '416'.
StatusRequestEntityTooLarge http status '413'.
StatusRequestHeaderFieldsTooLarge http status '431'.
StatusRequestTimeout http status '408'.
StatusRequestURITooLong http status '414'.
StatusResetContent http status '205'.
StatusSeeOther http status '303'.
StatusServiceUnavailable http status '503'.
StatusSwitchingProtocols http status '101'.
StatusTeapot http status '418'.
StatusTemporaryRedirect http status '307'.
StatusTooManyRequests http status '429'.
StatusUnauthorized http status '401'.
StatusUnavailableForLegalReasons http status '451'.
StatusUnsupportedMediaType http status '415'.
StatusUseProxy http status '305'.
TemplateLayoutContextKey is the name of the user values which can be used to set a template layout from a middleware and override the parent's.
Version is the current version of the Iris web framework.

# Variables

AllMethods "GET", "POST", "PUT", "DELETE", "CONNECT", "HEAD", "PATCH", "OPTIONS", "TRACE".
Available is a channel type of bool, fired to true when the server is opened and all plugins ran never fires false, if the .Close called then the channel is re-allocating.
CompressedFileSuffix is the suffix to add to the name of cached compressed file when using the .StaticFS function.
Default entry, use it with iris.$anyPublicFunc.
CookieExpireNever the default cookie's life for sessions, unlimited (23 years).
Default entry, use it with iris.$anyPublicFunc.
DefaultLoggerOut is the default logger's output.
DefaultServerAddr the default server addr which is: 0.0.0.0:8080.
DefaultSSHKeyPath used if SSH.KeyPath is empty.
DefaultTimeFormat default time format for any kind of datetime parsing.
if you want colors in your console then you should use this https://github.com/iris-contrib/logger instead.
OptionCharset character encoding for various rendering used for templates and the rest of the responses Default is "UTF-8".
OptionCheckForUpdates will try to search for newer version of Iris based on the https://github.com/kataras/iris/releases If a newer version found then the app will ask the he dev/user if want to update the 'x' version if 'y' is pressed then the updater will try to install the latest version the updater, will notify the dev/user that the update is finished and should restart the App manually.
OptionDisableBanner outputs the iris banner at startup Default is false.
OptionDisablePathCorrection corrects and redirects the requested path to the registed path for example, if /home/ path is requested but no handler for this Route found, then the Router checks if /home handler exists, if yes, (permant)redirects the client to the correct path /home Default is false.
OptionDisablePathEscape when is false then its escapes the path, the named parameters (if any).
OptionDisableTemplateEngines set to true to disable loading the default template engine (html/template) and disallow the use of iris.UseEngine Default is false.
OptionGzip enables gzip compression on your Render actions, this includes any type of render, templates and pure/raw content If you don't want to enable it globaly, you could just use the third parameter on context.Render("myfileOrResponse", structBinding{}, iris.RenderOptions{"gzip": true}) Default is false.
OptionIsDevelopment iris will act like a developer, for example If true then re-builds the templates on each request Default is false.
OptionLoggerOut is the destination for output Default is os.Stdout.
OptionLoggerPreffix is the logger's prefix to write at beginning of each line Default is [IRIS].
OptionOther are the custom, dynamic options, can be empty this fill used only by you to set any app's options you want for each of an Iris instance.
OptionProfilePath a the route path, set it to enable http pprof tool Default is empty, if you set it to a $path, these routes will handled:.
AutoTLS enable to get certifications from the Letsencrypt when this configuration field is true, the CertFile & KeyFile are empty, no need to provide a key.
Options for ServerConfiguration.
Options for ServerConfiguration.
Options for ServerConfiguration.
OptionServerMaxRequestBodySize Maximum request body size.
Mode this is for unix only.
OptionServerName the server's name, defaults to "iris".
Per-connection buffer size for requests' reading.
Maximum duration for reading the full request (including body).
RedirectTo, defaults to empty, set it in order to override the station's handler and redirect all requests to this address which is of form(HOST:PORT or :PORT) NOTE: the http status is 'StatusMovedPermanently', means one-time-redirect(the browser remembers the new addr and goes to the new address without need to request something from this server which means that if you want to change this address you have to clear your browser's cache in order this to be able to change to the new addr.
OptionServerVirtual If this server is not really listens to a real host, it mostly used in order to achieve testing without system modifications.
OptionServerVListeningAddr, can be used for both virtual = true or false, if it's setted to not empty, then the server's Host() will return this addr instead of the ListeningAddr.
OptionServerVScheme if setted to not empty value then all template's helper funcs prepends that as the url scheme instead of the real scheme server's .Scheme returns VScheme if not empty && differs from real scheme Default is empty "".
Per-connection buffer size for responses' writing.
Maximum duration for writing the full response (including body).
OptionSessionsCookie string, the session's client cookie name, for example: "qsessionid".
OptionSessionsCookieLength the length of the sessionid's cookie's value, let it to 0 if you don't want to change it Defaults to 32.
OptionSessionsDecodeCookie set it to true to decode the cookie key with base64 URLEncoding Defaults to false.
OptionSessionsDisableSubdomainPersistence set it to true in order dissallow your q subdomains to have access to the session cookie defaults to false.
OptionSessionsExpires the duration of which the cookie must expires (created_time.Add(Expires)).
OptionSessionsGcDuration every how much duration(GcDuration) the memory should be clear for unused cookies (GcDuration) for example: time.Duration(2)*time.Hour.
OptionTesterDebug if true then debug messages from the httpexpect will be shown when a test runs Default is false.
OptionTesterExplicitURL If true then the url (should) be prepended manually, useful when want to test subdomains Default is false.
OptionTesterListeningAddr is the virtual server's listening addr (host) Default is "iris-go.com:1993".
OptionTimeFormat time format for any kind of datetime parsing.
OptionWebsocketBinaryMessages set it to true in order to denotes binary data messages instead of utf-8 text see https://github.com/kataras/iris/issues/387#issuecomment-243006022 for more defaults to false.
OptionWebsocketEndpoint is the path which the websocket server will listen for clients/connections Default value is empty string, if you don't set it the Websocket server is disabled.
OptionWebsocketMaxMessageSize max message size allowed from connection Default value is 1024.
OptionWebsocketPingPeriod send ping messages to the connection with this period.
OptionWebsocketPongTimeout allowed to read the next pong message from the connection Default value is 60 * time.Second.
OptionWebsocketReadBufferSize is the buffer size for the underline reader.
OptionWebsocketWriteBufferSize is the buffer size for the underline writer.
OptionWebsocketWriteTimeout time allowed to write a message to the connection.
Default entry, use it with iris.$anyPublicFunc.
Default entry, use it with iris.$anyPublicFunc.
Look ssh.go for this field's configuration example: https://github.com/iris-contrib/examples/blob/master/ssh/main.go.
SSHBanner is the banner goes on top of the 'ssh help message' it can be changed, defaults is the Iris's banner.
StaticCacheDuration expiration duration for INACTIVE file handlers, it's a global configuration field to all iris instances.
Default entry, use it with iris.$anyPublicFunc.

# Structs

Command contains the registered SSH commands contains a Name which is the payload string Description which is the description of the command shows to the admin/user Action is the particular command's handler.
Configuration the whole configuration for an iris instance ($instance.Config) or global iris instance (iris.Config) these can be passed via options also, look at the top of this file(configuration.go) Configuration is also implements the OptionSet so it's a valid option itself, this is briliant enough.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ServerConfiguration is the configuration which is used inside iris' server(s) for listening to.
No description provided by the author
SSHServer : Simple SSH interface for Iris web framework, does not implements the most secure options and code, but its should works use it at your own risk.
TesterConfiguration configuration used inside main config field 'Tester'.
WebsocketConfiguration the config contains options for the Websocket main config field.
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ----------------------------------MuxAPI implementation------------------------------ ------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------.
OptionServerSettter server configuration option setter.
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
WebsocketConnection is the front-end API that you will use to communicate with the client side.

# Type aliases

Action the command's handler.
Commands the SSH Commands, it's just a type of []Command.
No description provided by the author
No description provided by the author
No description provided by the author
OptionServerSet is the func which implements the OptionServerSettter, this is used widely.
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
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ----------------------------------MuxAPI implementation------------------------------ ------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------.
SessionsConfiguration the configuration for sessions has 6 fields first is the cookieName, the session's name (string) ["mysessionsecretcookieid"] second enable if you want to decode the cookie's key also third is the time which the client's cookie expires forth is the cookie length (sessionid) int, defaults to 32, do not change if you don't have any reason to do fifth is the gcDuration (time.Duration) when this time passes it removes the unused sessions from the memory until the user come back sixth is the DisableSubdomainPersistence which you can set it to true in order dissallow your q subdomains to have access to the session cook.
Users SSH.Users field, it's just map[string][]byte (username:password).