Let’s Build a Go version of Laravel: Part Two

Let’s Build a Go version of Laravel: Part Two

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 103 lectures (8h 3m) | 2.91 GB

The followup to “Let’s Build a Go Version of Laravel,” with support for remote file systems, Social Auth, and more.

This is the follow up to “Let’s Build a Go Version of Laravel,” and is intended for students who have already taken that course!

In the first part of this series, we built a re-usable Go module that gave us a lot of functionality, including html, json, and xml response types, support for Go templates and Jet templates to render pages, multiple database support, sessions, and more. This time around, we’ll improve our Celeritas package and add the following functionality:

  • Add support for remote file systems, including Amazon S3 buckets, Minio, sFTP, and WebDAV
  • Add support for Social Authentication using GitHub and Google (and you can add as many more as you like)
  • Add support for improved testing, including a Go version of Laravel’s Dusk package, which takes a browser screen shot when testing functionality that renders a web page
  • Add support for “maintenance mode” using Remote Procedure Calls (RPC)
  • Improve our database migrations to support both raw SQL and soda’s Fizz file format
  • Implement file upload functionality (with support for local and remote file systems)
  • Separate logic and routes for web and API
  • Make it easy for users to create tests by pre-populating stub test files and the appropriate setup_test.go files for their projects

By the time that you have completed this course, you will not only have a solid understanding of each of the things listed above, but also a reusable code base that will help you jump start your next project.

What you’ll learn

  • How to implement and use Remote Procedure Calls (RPC) in Go
  • How to upload files safely in Go
  • How to integrate AWS S3 Buckets in a Go application
  • How to integrate an FTP/SFTP filesystem in Go
  • How to implement social authentication in Go
Table of Contents

Introduction
1 Introduction
2 About me
3 Asking for help
4 Installing Go
5 Installing an IDE

Project Setup
6 Setting up the project
7 Making sure everything worked

Setting up our remote file systems
8 What were going to create
9 Setting up our remote file systems using Docker
10 Configuring Minio
11 Configuring sFTP
12 Setting up a type for file systems

File systems Minio
13 Getting started with Minio connecting and the Put function
14 Implementing the List function in Minio
15 Implementing the Delete function in Minio
16 Implementing the Get function in Minio
17 Creating stub filesystems for the other three types
18 Adding filesystems to Celeritas
19 Trying out our Minio filesystem
20 Creating a handler to list the remote file system
21 Connecting the handler to a route and trying things out
22 Creating handlers to display the upload form
23 Creating the handler to process the file upload
24 Creating the delete handler

File systems sFTP
25 Implementing the Put function for sFTP
26 Implementing the List function for sFTP
27 Implementing the Delete function for sFTP
28 Implementing the Get function for sFTP
29 Connecting Celeritas to our sFTP file system
30 Updating our ListFS handler to support sFTP
31 Updating our PostUploadToFS handler to support sFTP
32 Updating our DeleteFromFS handler to support sFTP
33 Cleaning up the Get function to avoid resource leaks

File systems WebDAV
34 Implementing the Put function for WebDAV
35 Implementing the List function for WebDAV
36 Implementing the Delete function for WebDAV
37 Implementing the Get function for WebDAV
38 Testing things out

File systems Amazon S3 Buckets
39 Implementing the List function for S3 file systems
40 Implementing the Put function for S3 file systems
41 Implementing the Delete function for S3 file systems
42 Implementing the Get function for S3 buckets
43 Connecting Celeritas to our S3 file system
44 Creating an S3 compatible bucket on Linode
45 Updating our handlers for S3 buckets
46 Trying things out

Building a File System Agnostic File Uploader
47 What well build
48 Adding file systems to the Celeritas type
49 Creating the file uploader
50 Limiting upload by mime type
51 Adding the mime type and file size limitations to the Celeritas config type
52 Setting up handlers and routes to try things out
53 Trying things out

Improving our Migrations package
54 Pop vs SQL
55 Getting started with Pop functions for our migrations code in Celeritas
56 Implementing the CreatePopMigration function to create up and down migrations
57 Implementing the RunPopMigrations function
58 Implementing the PopMigrateDown function
59 Implementing the PopMigrateReset function
60 Making changes in the Celeritas CLI for our pop migrations
61 Trying out our new make migration command
62 Ensuring the database is connected before allowing people to make migrations
63 Creating a databaseyml file and running migrations
64 Trying out the migrate command
65 Updating the make auth command for our Pop integration
66 Trying out make auth

Social Authentication with OAuth2
67 Social Authentication or Single Sign On an Overview
68 Getting started with Goth and Social Authentication
69 Setting up authentication routes
70 Initializing social sign on
71 Implementing the SocialLogin handler
72 Implementing the SocialCallback handler
73 Connecting our social authentication handlers to routes
74 Setting up GitHub for social authentication
75 Trying out the GitHub login functionality
76 Logging out
77 Really logging out
78 Trying the socialLogout function
79 Adding support for Google login
80 Updating the authhandlersgo file for Google to enable login
81 Trying out login with Google
82 Adding the case for logging out of Google in socialLogout
83 Trying things out

RPC Graceful Shutdown and additional changes
84 Separating Web and API routes
85 Getting started with Maintenance Mode functionality using RPC
86 Starting RPC
87 Adding maintenance mode middleware
88 Updating the CLI for maintenance mode
89 Testing the maintenance mode functionality
90 Graceful Shutdown

Testing
91 Adding a simple setuptestgo file to handlers
92 Adding two functions to our setuptestgo file
93 Adding and running a sample test
94 Adding some additional tests
95 Implementing Laravel Dusk like screen captures
96 Writing the screen capture function
97 Trying out the screen capture function
98 Writing additional helper functions for testing

Final changes to the Celeritas CLI application
99 Updating our templates in the CLI and making some changes to the myapp
100 Creating our skeleton app
101 Additional updates to the skeleton application and the celeritas project
102 Trying out the celeritas new project command
103 Trying things out

Homepage