Skip to content

Instantly share code, notes, and snippets.

View bykof's full-sized avatar
:electron:
Let's go to java and have a brainfuck

Michael Bykovski bykof

:electron:
Let's go to java and have a brainfuck
View GitHub Profile
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "DOCUMENTATION",
"description": "",
"termsOfService": "YOUR_TERMS_OF_SERVICE_URL",
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
// domain/product_api.go
package domain
type ProductAPI interface {
ProductList() (domain.ProductList, error)
}
package main
import (
"example.com/dingo_example"
"example.com/dingo_example/interfaces"
"flamingo.me/dingo"
"log"
)
func main() {
package infrastructure
import (
"encoding/json"
"example.com/dingo_example/domain"
"fmt"
"io/ioutil"
"net/http"
)
package interfaces
import (
"example.com/dingo_example/infrastructure"
"log"
)
type AppController struct {
productAPI infrastructure.ProductAPI
}
package dingo_example
import (
"example.com/dingo_example/infrastructure"
"example.com/dingo_example/interfaces"
"flamingo.me/dingo"
)
const ProductApiUrl = "https://my-product-api.com"
package dingo_example
import (
"example.com/dingo_example/infrastructure"
"example.com/dingo_example/interfaces"
)
const ProductApi = "https://my-product-api.com"
func main() {
package interfaces
import (
"example.com/dingo_example/infrastructure"
"log"
)
type AppController struct {
productAPI infrastructure.ProductAPI
}
package infrastructure
import (
"encoding/json"
"example.com/dingo_example/domain"
"fmt"
"io/ioutil"
"net/http"
)
// domain/product_list.go
package domain
type ProductList []Product