Skip to content

Instantly share code, notes, and snippets.

View eminetto's full-sized avatar
:octocat:
always learning

Elton Minetto eminetto

:octocat:
always learning
View GitHub Profile
View UserController.php
<?php
namespace Admin\Controller;
use Zend\View\Model\ViewModel;
use Core\Controller\ActionController;
use Admin\Model\User;
use Admin\Form\User as UserForm;
use Doctrine\ORM\EntityManager;
@eminetto
eminetto / rfc.md
Created May 15, 2021 15:42
Template de RFC
View rfc.md

Título

Descrição do problema

Devemos explicar o problema claramente e identificar detalhes adicionais que a equipe precise saber. Devemos aqui descrever o contexto, o que foi feito até agora e o estado atual.

A descrição também serve como uma trilha à qual podemos voltar no futuro para entender o raciocínio que tínhamos na época e ver quais restrições e requisitos mudaram.

Possíveis abordagens

View gist:70c8597ca7340abc90c424f718a9ca56
├── README.md
├── go.mod
├── go.sum
├── cmd
│ ├── api
│ │ └── main.go
│ └── appctl
│ └── main.go
├── config
│ ├── config.go
View gist:98105765bc27e71cb48f87bef388eb53
├── cmd
│ ├── api
│ │ └── main.go
│ └── appctl
│ └── main.go
View gist:1aef43eca2b3426931e8598a0ba70519
├── book
│ ├── book.go
│ ├── service.go
│ ├── service_test.go
│ ├── mock
│ │ ├── use_case.go
│ │ ├── repository.go
│ ├── postgres
│ │ ├── book_storage.go
│ │ ├── book_storage_test.go
@eminetto
eminetto / rfc.md
Created May 22, 2021 13:04
Template of RFCs
View rfc.md

Title

Problem description

We must explain the problem clearly and identify additional details that the team needs to know. We must here describe the context, what we did so far, and the current state.

The description also serves as a trail that we can go back to in the future to understand the reasoning we had at the time and see what restrictions and requirements have changed.

Possible approaches

@eminetto
eminetto / eleicao.go
Created October 2, 2022 21:50
eleicao.go
View eleicao.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
)
@eminetto
eminetto / eleicao_color.go
Created October 2, 2022 22:15
eleicao_color.go
View eleicao_color.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
"github.com/charmbracelet/lipgloss"
@eminetto
eminetto / service_test.go
Created September 28, 2022 11:56
service_test.go
View service_test.go
package service_test
import (
"testing"
"github.com/PicPay/example"
)
func TestFindAll(t *testing.T) {
s := example.NewService()
all, err := s.FindAll()
@eminetto
eminetto / service.go
Created September 28, 2022 11:55
service.go
View service.go
package service
//NewService create new service
func NewService() *Service {
return &Service{}
}
//FindAll
func (s *Service) FindAll() ([]*entity.Privilege, error) {
acl := s.getDefaultPrivileges()