mirror of
				https://github.com/labstack/echo.git
				synced 2025-10-30 23:57:38 +02:00 
			
		
		
		
	
							
								
								
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| The MIT License (MIT) | ||||
|  | ||||
| Copyright (c) 2016 LabStack | ||||
| Copyright (c) 2017 LabStack | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| of this software and associated documentation files (the "Software"), to deal | ||||
|   | ||||
| @@ -6,6 +6,6 @@ googleAnalytics = "UA-85059636-2" | ||||
| [permalinks] | ||||
|   guide = "/guide/:filename" | ||||
|   middleware = "/middleware/:filename" | ||||
|   recipes = "/recipes/:filename" | ||||
|   examples = "/examples/:filename" | ||||
| [params] | ||||
|   description = "Echo is a high performance, extensible, minimalist web framework for Go (Golang)." | ||||
|   | ||||
							
								
								
									
										13
									
								
								website/content/examples.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								website/content/examples.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| +++ | ||||
| title = "Examples" | ||||
| description = "Echo examples" | ||||
| type = "examples" | ||||
| [menu.main] | ||||
|   name = "Examples" | ||||
|   pre = "<i class='fa fa-code'></i>" | ||||
|   weight = 2 | ||||
|   identifier = "examples" | ||||
|   url = "/examples" | ||||
| +++ | ||||
|  | ||||
| <script>location = '/examples/hello-world';</script> | ||||
| @@ -3,7 +3,7 @@ title = "Auto TLS Example" | ||||
| description = "Automatic TLS certificates from Let's Encrypt example for Echo" | ||||
| [menu.main] | ||||
|   name = "Auto TLS" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 2 | ||||
| +++ | ||||
| 
 | ||||
| @@ -4,7 +4,7 @@ description = "CORS example for Echo" | ||||
| [menu.main] | ||||
|   name = "CORS" | ||||
|   identifier = "middleware-cors" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 3 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "CRUD Example" | ||||
| description = "CRUD (Create, read, update and delete) example for Echo" | ||||
| [menu.main] | ||||
|   name = "CRUD" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 2 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "Embed Resources Example" | ||||
| description = "Embed resources example for Echo" | ||||
| [menu.main] | ||||
|   name = "Embed Resources" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 14 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "File Upload Example" | ||||
| description = "File upload example for Echo" | ||||
| [menu.main] | ||||
|   name = "File Upload" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 7 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "Google App Engine Example" | ||||
| description = "Google App Engine example for Echo" | ||||
| [menu.main] | ||||
|   name = "Google App Engine" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 12 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "Graceful Shutdown Example" | ||||
| description = "Graceful shutdown example for Echo" | ||||
| [menu.main] | ||||
|   name = "Graceful Shutdown" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 13 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "Hello World Example" | ||||
| description = "Hello world example for Echo" | ||||
| [menu.main] | ||||
|   name = "Hello World" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 1 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "HTTP/2 Example" | ||||
| description = "HTTP/2 example for Echo" | ||||
| [menu.main] | ||||
|   name = "HTTP/2" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 3 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "JSONP Example" | ||||
| description = "JSONP example for Echo" | ||||
| [menu.main] | ||||
|   name = "JSONP" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 6 | ||||
| +++ | ||||
| 
 | ||||
| @@ -4,7 +4,7 @@ description = "JWT example for Echo" | ||||
| [menu.main] | ||||
|   name = "JWT" | ||||
|   identifier = "recipe-jwt" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 11 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "Middleware Example" | ||||
| description = "Middleware example for Echo" | ||||
| [menu.main] | ||||
|   name = "Middleware" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 3 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "Streaming Response Example" | ||||
| description = "Streaming response example for Echo" | ||||
| [menu.main] | ||||
|   name = "Streaming Response" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 3 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "Subdomains Example" | ||||
| description = "Subdomains example for Echo" | ||||
| [menu.main] | ||||
|   name = "Subdomains" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 10 | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "Twitter Like API Example" | ||||
| description = "Twitter Like API example for Echo" | ||||
| [menu.main] | ||||
|   name = "Twitter" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 2  | ||||
| +++ | ||||
| 
 | ||||
| @@ -3,7 +3,7 @@ title = "WebSocket Example" | ||||
| description = "WebSocket example for Echo" | ||||
| [menu.main] | ||||
|   name = "WebSocket" | ||||
|   parent = "recipes" | ||||
|   parent = "examples" | ||||
|   weight = 5 | ||||
| +++ | ||||
| 
 | ||||
| @@ -1,6 +1,6 @@ | ||||
| +++ | ||||
| title = "Guide" | ||||
| description = "Guide" | ||||
| description = "Echo guide" | ||||
| type = "guide" | ||||
| [menu.main] | ||||
|   name = "Guide" | ||||
|   | ||||
| @@ -42,7 +42,7 @@ description = "Migration" | ||||
| - Dropped support for `fasthttp` | ||||
| - Dropped deprecated API | ||||
| - Moved `Logger` interface to root level | ||||
| - Moved website and recipes to the main repo | ||||
| - Moved website and examples to the main repo | ||||
| - Updated docs and fixed numerous issues | ||||
|  | ||||
| ## [Recipes](/recipes/hello-world) | ||||
| ## [Examples](/examples/hello-world) | ||||
|   | ||||
| @@ -129,7 +129,7 @@ func(c echo.Context) error { | ||||
| Go type into JSON and send it as JSONP payload constructed using a callback, with | ||||
| status code. | ||||
|  | ||||
| [*Example*](/recipes/jsonp) | ||||
| [*Example*](/examples/jsonp) | ||||
|  | ||||
| ## Send XML | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| +++ | ||||
| title = "Middleware" | ||||
| description = "Middleware" | ||||
| description = "Echo middleware" | ||||
| type = "middleware" | ||||
| [menu.main] | ||||
|   name = "Middleware" | ||||
| @@ -105,4 +105,4 @@ e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{ | ||||
|  | ||||
| Example above skips Logger middleware when request host starts with localhost. | ||||
|  | ||||
| ## [Writing Custom Middleware]({{< ref "recipes/middleware.md">}}) | ||||
| ## [Writing Custom Middleware]({{< ref "examples/middleware.md">}}) | ||||
|   | ||||
| @@ -80,4 +80,4 @@ DefaultJWTConfig = JWTConfig{ | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ## [Recipe]({{< ref "recipes/jwt.md">}}) | ||||
| ## [Recipe]({{< ref "examples/jwt.md">}}) | ||||
|   | ||||
| @@ -1,13 +0,0 @@ | ||||
| +++ | ||||
| title = "Recipes" | ||||
| description = "Recipes" | ||||
| type = "recipes" | ||||
| [menu.main] | ||||
|   name = "Recipes" | ||||
|   pre = "<i class='fa fa-code'></i>" | ||||
|   weight = 2 | ||||
|   identifier = "recipes" | ||||
|   url = "/recipes" | ||||
| +++ | ||||
|  | ||||
| <script>location = "/recipes/hello-world";</script> | ||||
| @@ -1,12 +1,11 @@ | ||||
| {{ partial "head.html" . }} | ||||
| <body> | ||||
|   <link rel="stylesheet" href="https://cdn.labstack.com/styles/docs.css"> | ||||
| <body class="docs"> | ||||
| 	{{ partial "topnav.html" . }} | ||||
|   <div class="w3-container w3-content"> | ||||
|     {{ partial "sidenav.html" . }} | ||||
|     <div class="main"> | ||||
|       {{ partial "ad.html" }} | ||||
|       <div class="w3-row-padding"> | ||||
|       <div class="w3-row"> | ||||
|         <div class="w3-col s12 m10 l10"> | ||||
|           {{ partial "notice.html" }} | ||||
|           <article class="content"> | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <footer class="w3-container w3-content w3-padding-48 w3-center footer"> | ||||
|   <p> | ||||
|     <strong>Echo</strong> by <a href="https://labstack.com">LabStack</a> © 2016 LabStack. All Rights Reserved. | ||||
|     <strong>Echo</strong> by <a href="https://labstack.com">LabStack</a> © 2017 LabStack. All Rights Reserved. | ||||
|   </p> | ||||
|   <p> | ||||
|     <a class="icon" href="https://labstack.com/blog"> | ||||
| @@ -30,5 +30,3 @@ docsearch({ | ||||
| </script> | ||||
| <script src="https://cdn.labstack.com/scripts/prism.js"></script> | ||||
| <script src="https://cdn.labstack.com/scripts/base.js"></script> | ||||
| <script src="https://cdn.labstack.com/scripts/docs.js"></script> | ||||
| <script src="/scripts/main.js"></script> | ||||
|   | ||||
| @@ -21,12 +21,10 @@ | ||||
|     {{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }} | ||||
|   </title> | ||||
|   <link rel="stylesheet" href="https://unpkg.com/font-awesome@4.6.3/css/font-awesome.min.css"> | ||||
|   <link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"> | ||||
|   <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css">--> | ||||
|   <link rel="stylesheet" href="https://cdn.labstack.com/styles/w3.css"> | ||||
|   <link rel="stylesheet" href="https://cdn.labstack.com/styles/prism.css"> | ||||
|   <link rel="stylesheet" href="https://cdn.labstack.com/styles/base.css"> | ||||
|   <link rel="stylesheet" href="https://cdn.labstack.com/styles/ad.css"> | ||||
|   <link rel="stylesheet" href="/styles/main.css"> | ||||
|   <script> | ||||
|     (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||||
|     (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| <div class="w3-panel w3-pale-green w3-leftbar w3-border-green"> | ||||
| <!--<div class="w3-panel w3-pale-green w3-leftbar w3-border-green"> | ||||
|   <h3> | ||||
|     Check out our new project <a href="https://armor.labstack.com">Armor</a> | ||||
|   </h3> | ||||
|   <p> | ||||
|     Uncomplicated, modern HTTP server, supports HTTP/2 and auto TLS | ||||
|   </p> | ||||
| </div> | ||||
| </div>--> | ||||
|   | ||||
| @@ -1,20 +1,19 @@ | ||||
| <nav class="w3-sidenav w3-border-right collapse"> | ||||
|   <span class="w3-closenav w3-xxlarge hide-large" onclick="closeSidenav()">×</span> | ||||
| <nav class="w3-sidenav w3-border-right"> | ||||
|   <button class="w3-btn w3-white w3-border w3-border-theme w3-round-xlarge" onclick="location.href='/support-echo';"> | ||||
|     <i class="fa fa-heart" aria-hidden="true"></i> Support Echo | ||||
|   </button> | ||||
|   {{ $currentNode := . }} | ||||
|   <div class="menu hide-large"> | ||||
|   <div class="menu"> | ||||
|     {{ range .Site.Menus.main }} | ||||
|       <a{{ if or ($currentNode.HasMenuCurrent "main" .) ($currentNode.IsMenuCurrent "main" .) }} class="active"{{ end }} href="{{ .URL }}"> | ||||
|         <div class="w3-xlarge w3-padding-top">{{ .Name }}</div> | ||||
|         {{ .Name }} | ||||
|       </a> | ||||
|     {{ end }} | ||||
|   </div> | ||||
|   <div class="sub-menu"> | ||||
|     {{ if .IsPage }} | ||||
|       {{ range where .Site.Menus.main "Identifier" .Type }} | ||||
|         <div class="w3-xlarge w3-padding-top">{{ .Pre }} {{ .Name }}</div> | ||||
|         <h3>{{ .Pre }} {{ .Name }}</h3> | ||||
|         {{ range .Children }} | ||||
|           <a{{ if $currentNode.IsMenuCurrent "main" . }} class="active"{{ end }} href="{{ .URL }}"> | ||||
|             {{ .Name }} | ||||
|   | ||||
| @@ -11,6 +11,8 @@ | ||||
|         <a{{ if or ($currentNode.HasMenuCurrent "main" .) ($currentNode.IsMenuCurrent "main" .) }} class="active"{{ end }} href="{{ .URL }}">{{ .Name }}</a> | ||||
|       {{ end }} | ||||
|     </span> | ||||
|     <span class="w3-xxlarge hide-large" onclick="openSidenav()">☰</span> | ||||
|     <button class="hamburger hide-large" onclick="toggleSidenav()"> | ||||
|       <span></span> | ||||
|     </button> | ||||
|   </nav> | ||||
| </div> | ||||
|   | ||||
| @@ -1 +0,0 @@ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user