Skip to main content

Posts

MVC pattern with user permission management API base framework in Go (Golang)

om_admin om_admin is a lightweight MVC pattern with control roles management API base framework in Go (Golang) for building fast, scalable and robust database-driven web applications. Features: Postgres, MySQL, SQLite and Foundation database support Modular (you can choose which components to use) Middleware support. All compatible Middleware works out of the box Gopher spirit (write golang, use all the golang libraries you like) Lightweight. Only MVC Multiple configuration files support (currently json, yaml, toml and hcl) Overview om is a lightweight MVC framework. It is based on the principles of simplicity, relevance and elegance. Simplicity. The design is simple, easy to understand, and doesn't introduce many layers between you and the standard library. It is a goal of the project that users should be able to understand the whole framework in a single day. Relevance. om doesn't assume anything. We focus on things that matter, this way we are able to ensure ...

Golang oAuth2 Google Example for Web and API

Introduction 👉 The oAuth2 protocol has almost become a standard for securing websites and API services. Developers no longer need to store and manage userIDs and passwords for their users. Offloading the authentication to OAuth2 providers such as Google, Facebook, Linkedin, Github keeps the authentication with username and password, within those providers rather than passing through the developer’s application. This reduces the risk that an application will leak user credentials and puts more control in the user's hands on for managing authentication with their accounts. I wanted to provide this capability in my own apps and went looking for a pattern to use in Go. Typically when I’m on a hunt like this I find bits and pieces that I stitch together into a reference pattern. For this oAuth pattern most of the result I found referenced back to a couple limited examples on the google site. Then it happened, I stumbled on a fantastic write-up and sample app that covers every main po...

Golang - MVC Pattern API Interactions with Firebase Database

Firebase Database interactions from Go: API. Developers can use this API to access the Firebase database from Go applications. It support realtime event listeners yet, but supports all the data update and query capabilities a typical server-side application would need. Listing shows how to initialize a Firebase app in Go, and store a value in the database. Store and sync data in Firebase with Golang : The Firebase Real time Database, by definition, is a cloud-hosted database. This Firebase NoSQL cloud database is trending as the new go-to data storage concept. With this, data is stored as JSON, and not in the traditional format. Also, Firebase performs real time data synchronisation to every client that is connected. How does it work? The Firebase Real time Database lets you build rich, collaborative applications by allowing secure access to the database directly from Server-side code. Since I am describing how to implement a client of Firebase with Golang, first, we...

RAID

Bug tracking and management template log for new startup and minor IT business. RAID is an acronym which should be at the forefront of your mind if you are a project manager or a program manager. RAID stands for Risks, Assumptions, Issues, and Dependencies. At the bottom of this article you’ll find a link to download a free RAID Log template. The RAID acronym can help you to remember to give appropriate attention to each area. In my own personal experience, I know that I have a tendency to give ample attention to risks and risk management but can overlook assumptions, so reminding myself of the RAID acronym daily, so as not to overlook any of these areas comes in very handy. Below you’ll find a quick recap of Risks, Assumptions, Issues, and Dependencies. Each has been covered before on Expert Program Management (especially Risks – I told you I was biased towards this area  ) and a link to that section has been provided if you need more detailed information. Risks  A ri...

How to Install Go 1.9 on Ubuntu

👇 Step 1 – Install Go Language Login to your Ubuntu system using ssh and upgrade to apply latest security updates there. $ sudo apt-get update $ sudo apt-get -y upgrade   Now download the Go language binary archive file using following link. $  wget https://dl.google.com/go/go1.9.4.linux-amd64.tar.gz Now extract the downloaded archive and install it to the desired location on the system.  Then I am installing it under /usr/local directory. You can also put this under the home directory (for shared hosting) or other location. $ sudo tar -xvf go1.9.4.linux-amd64.tar.gz $ sudo mv go /usr/local Step 2 – Setup Go Environment Now you need to setup Go language environment variables for your project. Commonly you need to set 3 environment variables as GOROOT, GOPATH and PATH. GOROOT is the location where Go package is installed on your system. $ export GOROOT=/usr/local/go GOPATH is the location of your work directory. For example my project directory is ~/go_pro...

Java String Tokens | Regex expression

Given a string,  , matching the regular expression  [A-Za-z !,?._'@]+ , split the string into  tokens . We define a token to be one or more consecutive English alphabetic letters. Then, print the number of tokens, followed by each token on a new line. Note:  You may find the  String.split  method helpful in completing this challenge. Input Format A single string,  . Constraints  is composed of  any  of the following: English alphabetic letters, blank spaces, exclamation points ( ! ), commas ( , ), question marks ( ? ), periods ( . ), underscores ( _ ), apostrophes ( ' ), and at symbols ( @ ). Output Format On the first line, print an integer,  , denoting the number of tokens in string   (they  do not  need to be unique). Next, print each of the   tokens on a new line in the same order as they appear in input string  . Sample Input He is a very...