Directories ¶
Path | Synopsis |
---|---|
apis
|
|
example1
Sample program to show how to create a simple web api with different versions.
|
Sample program to show how to create a simple web api with different versions. |
example2
Sample program to show how to have a single route for the api but have access to either through configuration.
|
Sample program to show how to have a single route for the api but have access to either through configuration. |
example3
Sample program to show how to create a basic CRUD based web api for customers.
|
Sample program to show how to create a basic CRUD based web api for customers. |
example4
Sample program to show how to create a basic CRUD based web api for customers with a middleware component.
|
Sample program to show how to create a basic CRUD based web api for customers with a middleware component. |
auth
|
|
example1
Sample program to show how to apply basic authentication with the standard library for your web request.
|
Sample program to show how to apply basic authentication with the standard library for your web request. |
example2
Sample program to show how to apply basic authentication with the goth package for your web request.
|
Sample program to show how to apply basic authentication with the goth package for your web request. |
example3
Sample program to show how to use JWTs
|
Sample program to show how to use JWTs |
basics
|
|
example1
Sample program to show how to create a simple web service.
|
Sample program to show how to create a simple web service. |
example2
Sample program to show how to create and use your own mux.
|
Sample program to show how to create and use your own mux. |
example3
Sample program to show how to implement your own Handler.
|
Sample program to show how to implement your own Handler. |
example4
Sample program to show how to implement your own App Handler that can use any provided handler function.
|
Sample program to show how to implement your own App Handler that can use any provided handler function. |
example5
Sample program to show how to run the server using a goroutine and create goroutines to run multiple requests concurrently.
|
Sample program to show how to run the server using a goroutine and create goroutines to run multiple requests concurrently. |
consuming
|
|
example6
Sample program to how to use JWT for authentication.
|
Sample program to how to use JWT for authentication. |
exercises/exercise1
Call the GitHub API to get a list of repository contributors.
|
Call the GitHub API to get a list of repository contributors. |
exercises/template1
Call the GitHub API to get a list of repository contributors.
|
Call the GitHub API to get a list of repository contributors. |
context
|
|
example1
Sample program to show how to work with the Context package.
|
Sample program to show how to work with the Context package. |
example2
Sample program to show how to work with the Gorilla Context package.
|
Sample program to show how to work with the Gorilla Context package. |
middleware
|
|
example1
Sample program to show how to apply middleware.
|
Sample program to show how to apply middleware. |
example2
Sample program to show how to apply middleware using negroni.
|
Sample program to show how to apply middleware using negroni. |
muxers
|
|
example1
Sample program to show how to use the pat router.
|
Sample program to show how to use the pat router. |
example2
Sample program to show how to use the httprouter router.
|
Sample program to show how to use the httprouter router. |
example3
Sample program to show how to use the echo toolkit.
|
Sample program to show how to use the echo toolkit. |
posts
|
|
example1
Sample program to show how to handle different HTTP verbs.
|
Sample program to show how to handle different HTTP verbs. |
example2
Sample program to show how to handle forms using a single handler for the GET and POST calls.
|
Sample program to show how to handle forms using a single handler for the GET and POST calls. |
example3
Sample program to show how to decode forms into structs.
|
Sample program to show how to decode forms into structs. |
example4
Sample program to show how to handle the uploading of file content in a request.
|
Sample program to show how to handle the uploading of file content in a request. |
rest
|
|
example1
Sample program to show how to use a regex to handle REST based URL schemas and routes.
|
Sample program to show how to use a regex to handle REST based URL schemas and routes. |
serializers
|
|
example1
Sample program to show how to use the JSON encoder.
|
Sample program to show how to use the JSON encoder. |
example2
Sample program to show how to implement the json.Marshaler interface to dictate the marshaling.
|
Sample program to show how to implement the json.Marshaler interface to dictate the marshaling. |
example3
Sample program to show how to use the XML encoder.
|
Sample program to show how to use the XML encoder. |
example4
Sample program to show how to implement the xml.Marshaler interface to dictate the marshaling.
|
Sample program to show how to implement the xml.Marshaler interface to dictate the marshaling. |
example5
Sample program to show common JSON mistakes.
|
Sample program to show common JSON mistakes. |
sessions_cookies
|
|
example1
Sample program to show how to use sessions in your web app.
|
Sample program to show how to use sessions in your web app. |
example2
Sample program to show how to use a cookie in your web app.
|
Sample program to show how to use a cookie in your web app. |
shutdown
|
|
example1
This program shows how to launch a web server then shut it down gracefully.
|
This program shows how to launch a web server then shut it down gracefully. |
sockets
|
|
example1
Sample program on how to use the Google web socket package to bind HTTP requests.
|
Sample program on how to use the Google web socket package to bind HTTP requests. |
example2
Sample program on how to use the Gorilla web socket package to bind HTTP requests.
|
Sample program on how to use the Gorilla web socket package to bind HTTP requests. |
templates
|
|
example1
Sample program to show how to use create, parse and execute a simple template.
|
Sample program to show how to use create, parse and execute a simple template. |
example2
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
example3
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
example4
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
example5
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
example6
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
example7
Sample program to show how to serve up static files from a web application and deliver a home page.
|
Sample program to show how to serve up static files from a web application and deliver a home page. |
example8
Sample program to show how to bundle assets, static files, etc into web application and access these bundled resources.
|
Sample program to show how to bundle assets, static files, etc into web application and access these bundled resources. |
tls
|
|
example1
Sample program to show how to launch a server that uses TLS.
|
Sample program to show how to launch a server that uses TLS. |
Click to show internal directories.
Click to hide internal directories.