Socket
Socket
Sign inDemoInstall

gopkg.in/kataras/iris.v12

Package Overview
Dependencies
100
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gopkg.in/kataras/iris.v12

Package iris is a web framework which provides efficient and well-designed tools with robust set of features to create your awesome and high-performance web application powered by unlimited potentials and portability. Source code and other details for the project are available at GitHub: Looking for further support? Note: This package is under active development status. Each month a new version is releasing to adapt the latest web trends and technologies. Iris is a very pluggable ecosystem, router can be customized by adapting a 'RouterBuilderPolicy && RouterReversionPolicy'. With the power of Iris' router adaptors, developers are able to use any third-party router's path features without any implications to the rest of their API. A Developer is able to select between two out-of-the-box powerful routers: Httprouter, it's a custom version of https://github.comjulienschmidt/httprouter, which is edited to support iris' subdomains, reverse routing, custom http errors and a lot features, it should be a bit faster than the original too because of iris' Context. It uses `/mypath/:firstParameter/path/:secondParameter` and `/mypath/*wildcardParamName` . Gorilla Mux, it's the https://github.com/gorilla/mux which supports subdomains, custom http errors, reverse routing, pattern matching via regex and the rest of the iris' features. It uses `/mypath/{firstParameter:any-regex-valid-here}/path/{secondParameter}` and `/mypath/{wildcardParamName:.*}` Example code: Run All HTTP methods are supported, users can register handlers for same paths on different methods. The first parameter is the HTTP Method, second parameter is the request path of the route, third variadic parameter should contains one or more iris.Handler/HandlerFunc executed by the registered order when a user requests for that specific resouce path from the server. Example code: In order to make things easier for the user, Iris provides functions for all HTTP Methods. The first parameter is the request path of the route, second variadic parameter should contains one or more iris.HandlerFunc executed by the registered order when a user requests for that specific resouce path from the server. Example code: Path Parameters' syntax depends on the selected router. This is the only difference between the routers, the registered path form, the API remains the same for both. Example `gorillamux` code: Example `httprouter` code: A set of routes that are being groupped by path prefix can (optionally) share the same middleware handlers and template layout. A group can have a nested group too. `.Party` is being used to group routes, developers can declare an unlimited number of (nested) groups. Example code: With iris users are able to register their own handlers for http statuses like 404 not found, 500 internal server error and so on. Example code: Custom http errors can be also be registered to a specific group of routes. Example code: Static Files Example code: Middleware is just a concept of ordered chain of handlers. Middleware can be registered globally, per-party, per-subdomain and per-route. Example code: Let's convert the https://github.com/rs/cors net/http external middleware which returns a `next form` handler. Example code: Iris supports 5 template engines out-of-the-box, developers can still use any external golang template engine, as `context.ResponseWriter` is an `io.Writer`. All of these five template engines have common features with common API, like Layout, Template Funcs, Party-specific layout, partial rendering and more. Example code: View engine supports bundled(https://github.com/jteeuwen/go-bindata) template files too. go-bindata gives you two functions, asset and assetNames, these can be setted to each of the template engines using the `.Binary` func. Example code: A real example can be found here: https://github.com/kataras/iris/tree/v6/_examples/intermediate/view/embedding-templates-into-app. Enable auto-reloading of templates on each request. Useful while developers are in dev mode as they no neeed to restart their app on every template edit. Example code: Each one of these template engines has different options located here: https://github.com/kataras/iris/tree/v6/adaptors/view . But you should have a basic idea of the framework by now, we just scratched the surface. If you enjoy what you just saw and want to learn more, please follow the below links: * Examples: https://github.com/iris-contrib/examples * Adaptors: https://github.com/kataras/iris/tree/v6/adaptors * Middleware: https://github.com/kataras/iris/tree/v6/middleware and * https://github.com/iris-contrib/middleware Package iris is a web framework which provides efficient and well-designed tools with robust set of features to create your awesome and high-performance web application powered by unlimited potentials and portability For view engines, render engines, sessions, websockets, subdomains, automatic-TLS, context support with 50+ handy http functions, dynamic subdomains, router & routes, parties of subdomains & routes, access control, typescript compiler, basicauth,internalization, logging, and much more, please visit https://godoc.org/gopkg.in/kataras/iris.v6


Version published

Readme

Source

Iris Web Framework

build status view examples chat donate

Iris is a fast, simple yet fully featured and very efficient web framework for Go.

It provides a beautifully expressive and easy to use foundation for your next website or API.

Learn what others saying about Iris and star this open-source project to support its potentials.

Benchmarks: Jul 18, 2020 at 10:46am (UTC)

package main

import "github.com/kataras/iris/v12"

func main() {
  app := iris.New()
  app.Use(iris.Compression)

  app.Get("/", func(ctx iris.Context) {
    ctx.HTML("Hello <strong>%s</strong>!", "World")
  })

  app.Listen(":8080")
}

As one Go developer once said, Iris got you covered all-round and standing strong over the years.

Some of the features Iris offers:

  • HTTP/2 (Push, even Embedded data)
  • Middleware (Accesslog, Basicauth, CORS, gRPC, Anti-Bot hCaptcha, JWT, MethodOverride, ModRevision, Monitor, PPROF, Ratelimit, Anti-Bot reCaptcha, Recovery, RequestID, Rewrite)
  • API Versioning
  • Model-View-Controller
  • Websockets
  • gRPC
  • Auto-HTTPS
  • Builtin support for ngrok to put your app on the internet, the fastest way
  • Unique Router with dynamic path as parameter with standard types like :uuid, :string, :int... and the ability to create your own
  • Compression
  • View Engines (HTML, Django, Handlebars, Pug/Jade and more)
  • Create your own File Server and host your own WebDAV server
  • Cache
  • Localization (i18n, sitemap)
  • Sessions
  • Rich Responses (HTML, Text, Markdown, XML, YAML, Binary, JSON, JSONP, Protocol Buffers, MessagePack, Content Negotiation, Streaming, Server-Sent Events and more)
  • Response Compression (gzip, deflate, brotli, snappy, s2)
  • Rich Requests (Bind URL Query, Headers, Form, Text, XML, YAML, Binary, JSON, Validation, Protocol Buffers, MessagePack and more)
  • Dependency Injection (MVC, Handlers, API Routers)
  • Testing Suite
  • And the most important... you get fast answers and support from the 1st day until now - that's six full years!

👑 Supporters

With your help, we can improve Open Source web development for everyone!

getsentry github lensesio thepunterbot tstangenberg cuong48d rubyangxg draFWM gf3 trading-peter AlbinoGeek basilarchia sumjoe simpleittools xiaozhuai Remydeme celsosz linxcoder jnelle TechMaster janwebdev altafino jakoubek alekperos day0ng hengestone thomasfr CetinBasoz International Juanses SometimesMage ansrivas ekobayong lexrus li3p madhu72 se77en vincent-li sascha11110 clichi2002 derReineke Sirisap22 primadi agoncecelia antonio-pedrazzini chrisliang12 zyu hobysmith clacroix njeff3 ixalender mubariz-ahmed Cesar DavidShaw th31nitiate stgrosshh rodrigoghm Didainius DmarshalTU IwateKyle Little-YangYang Major2828 MatejLach amritpal042 andrefiorot boomhut coderperu cshum dtrifonov geordee guanting112 iantuan ichenhe angelaahhu anhxuanpham annieruci antoniejiao artman328 b2cbd baoch254 icibiri jewe11er jfloresremar jingtianfeng kilarusravankumar leandrobraga lfbos lpintes macropas marcmmx mark2b miguel-devs mihado mmckeen75 narven odas0r olaf-lexemo pitexplore pr123 rsousacode sankethpb saz59 shadowfiga siriushaha bastengao skurtz97 srinivasganti syrm tuhao1020 wahyuief xvalen xytis ElNovi IpastorSan KKP4 Lernakow ernestocolombo francisstephan pixelheresy rcapraro beytullahakyuz bjoroen blackHoleNgc1277 bunnycodego carlos-enginner soiestad thanasolykos ukitzmann DanielKirkwood aprinslo1 colinf kyoukhana spazzymoto victorgrey ArishSultan ehayun chrismalek civicwar cnzhangquan danlanxiaohei dfaugusto dkzhang dloprodu donam-givita dph0899 ec0629 edwindna2 ekofedriyanto eli-yip eljefedelrodeodeljefe fenriz07 ffelipelimao frenchmajesty gastropulgite geGao123 globalflea gloudx gnosthi goten002 guanzi008 kukaki oshirokazuhide t6tg 15189573255 AnatolyUA AwsIT BlackHole1 FernandoLangOFC Flammable-Duck Hongjian0619 JoeD Jude-X Kartoffelbot KevinZhouRafael KrishManohar Laotanling Longf99999 Lyansun MihaiPopescu1985 Mohammed8960 NA Neulhan NguyenPhuoc Oka00 PaddyFrenchman RainerGevers Ramblestsad SamuelNeves Scorpio69t Serissa4000 TianJIANG Ubun1 XinYoungCN YukinaMochizuki a112121788 acdias aeonsthorn agent3bood alessandromarotta algoflows hdezoscar93 hieungm hieunmg homerious CSRaghunandan hzxd iuliancarnaru iysaleh jackptoke jackysywk jeff2go jeremiahyan joelywz kamolcu kana99 kattaprasanth keeio GeorgeFourikis keymanye khasanovrs kkdaypenny knavels kohakuhubo korowiov kostasvk lafayetteDan leki75 L-M-Sherlock claudemuller edsongley lemuelroberto liheyuan lingyingtan linuxluigi lipatti maikelcoke marek-kuticka marman-hp mattbowen maxgozou mizzlespot mnievesco mo3lyana motogo mtrense mukunhao mulyawansentosa evan grassshrimp nasoma ngseiyu nikharsaxena nronzel onlysumitg ozfive paulxu21 pesquive petros9282 phil535 pitt134 qiepeipei qiuzhanghua rapita rbondi relaera remopavithran rfunix rhernandez-itemsoft rikoriswandha hazmi-e205 jtgoral ky2s lauweliam risallaw robivictor rubiagatra rxrw saleebm sbenimeli sebyno seun-otosho solohiroshi su1gen sukiejosh svirmi terjelafton thiennguyen93 unixedia vadgun valsorym vguhesan vpiduri vrocadev vuhoanglam walter-wang wixregiga xPoppa yesudeep ymonk yonson2 yusong-offx zhenggangpku SergeShin - BelmonduS Diewald cty4ka martinjanda martinlindhe mdamschen netbaalzovf oliverjosefzimmer talebisinan valkuere lfaynman ArturWierzbicki Supersherm5 aaxx crashCoder derekslenk dochoaj evillgenius75 gog200921 mauricedcastro mwiater sj671 statik supersherm5 thejones letmestudy mblandr midhubalan ndimorle rosales-stephanie shyyawn vcruzato wangbl11 wofka72 yoru74 xsokev oleang michalsz michaelsmanley Curtman SridarDhandapani opusmagna ShahramMebashar b4zz4r bobmcallan fangli galois-tnp geoshan juanxme nguyentamvinhlong pomland-94 tejzpr theantichris tuxaanand raphael-brand willypuzzle malcolm-white-dti HieuLsw carlosmoran092 yangxianglong

📖 Learning Iris

Installation

The only requirement is the Go Programming Language.

Create a new project
$ mkdir myapp
$ cd myapp
$ go mod init myapp
$ go get github.com/kataras/iris/v12@latest # or @v
Install on existing project
$ cd myapp
$ go get github.com/kataras/iris/v12@latest

Run

$ go mod tidy -compat=1.21 # -compat="1.21" for windows.
$ go run .

Iris contains extensive and thorough documentation making it easy to get started with the framework.

For a more detailed technical documentation you can head over to our godocs. And for executable code you can always visit the ./_examples repository's subdirectory.

Do you like to read while traveling?

Book cover

follow author on twitter

follow Iris web framework on twitter

follow Iris web framework on facebook

You can request a PDF and online access of the Iris E-Book (New Edition, future v12.2.0+) today and be participated in the development of Iris.

🙌 Contributing

We'd love to see your contribution to the Iris Web Framework! For more information about contributing to the Iris project please check the CONTRIBUTING.md file.

List of all Contributors

🛡 Security Vulnerabilities

If you discover a security vulnerability within Iris, please send an e-mail to iris-go@outlook.com. All security vulnerabilities will be promptly addressed.

📝 License

This project is licensed under the BSD 3-clause license, just like the Go project itself.

The project name "Iris" was inspired by the Greek mythology.

FAQs

Last updated on 18 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc