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
package main
import (
"fmt"
"bytes"
)
func main() {
b := NewBoard()
fmt.Println(b.BoardRepresentation())
@eminetto
eminetto / board.go
Created July 20, 2019 18:58
board.go
package main
import (
"fmt"
"bytes"
)
func main() {
b := NewBoard()
fmt.Println(b.BoardRepresentation())
type Reader interface {
Find(id entity.ID) (*entity.User, error)
FindByEmail(email string) (*entity.User, error)
FindByChangePasswordHash(hash string) (*entity.User, error)
FindByValidationHash(hash string) (*entity.User, error)
FindByChallengeSubmissionHash(hash string) (*entity.User, error)
FindByNickname(nickname string) (*entity.User, error)
FindAll() ([]*entity.User, error)
}
type Repository interface {
Find(id entity.ID) (*entity.User, error)
FindByEmail(email string) (*entity.User, error)
FindByChangePasswordHash(hash string) (*entity.User, error)
FindByValidationHash(hash string) (*entity.User, error)
FindByChallengeSubmissionHash(hash string) (*entity.User, error)
FindByNickname(nickname string) (*entity.User, error)
FindAll() ([]*entity.User, error)
Update(user *entity.User) error
Store(user *entity.User) (entity.ID, error)
package chess
import "bytes"
type piece struct {
representation string
}
type location struct {
current *piece
package chess
type piece struct {
representation string
}
type location struct {
current *piece
}
package contact
import (
"strings"
"fmt"
)
type friends struct {
data []string
}
package contact
import "fmt"
type person struct {
name string
friends []string
}
type friend struct {
package ecommerce
import (
"strconv"
)
type order struct {
pid productID
cid customerID
}
package ecommerce
import (
"strconv"
)
type order struct {
pid productID
cid customerID
}