summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-09 21:46:39 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-09 21:46:39 -0700
commit526783fe258d20db0eb600dd63e36c6983f63837 (patch)
tree1df6f93be631598f1783fe2ff2c39b20cddce4de
parentf8be0451ce47aa1da98dcdba7266804f2cc5173e (diff)
downloadfatcat-526783fe258d20db0eb600dd63e36c6983f63837.tar.gz
fatcat-526783fe258d20db0eb600dd63e36c6983f63837.zip
move generated code
-rw-r--r--golang/Gopkg.lock20
-rw-r--r--golang/gen/models/creator_entity.go (renamed from golang/models/creator_entity.go)0
-rw-r--r--golang/gen/models/error.go (renamed from golang/models/error.go)0
-rw-r--r--golang/gen/restapi/configure_fatcat.go (renamed from golang/restapi/configure_fatcat.go)10
-rw-r--r--golang/gen/restapi/doc.go (renamed from golang/restapi/doc.go)0
-rw-r--r--golang/gen/restapi/embedded_spec.go (renamed from golang/restapi/embedded_spec.go)0
-rw-r--r--golang/gen/restapi/operations/fatcat_api.go (renamed from golang/restapi/operations/fatcat_api.go)0
-rw-r--r--golang/gen/restapi/operations/get_creator_id.go (renamed from golang/restapi/operations/get_creator_id.go)0
-rw-r--r--golang/gen/restapi/operations/get_creator_id_parameters.go (renamed from golang/restapi/operations/get_creator_id_parameters.go)0
-rw-r--r--golang/gen/restapi/operations/get_creator_id_responses.go (renamed from golang/restapi/operations/get_creator_id_responses.go)2
-rw-r--r--golang/gen/restapi/operations/get_creator_id_urlbuilder.go (renamed from golang/restapi/operations/get_creator_id_urlbuilder.go)0
-rw-r--r--golang/gen/restapi/operations/post_creator.go (renamed from golang/restapi/operations/post_creator.go)0
-rw-r--r--golang/gen/restapi/operations/post_creator_parameters.go (renamed from golang/restapi/operations/post_creator_parameters.go)2
-rw-r--r--golang/gen/restapi/operations/post_creator_responses.go (renamed from golang/restapi/operations/post_creator_responses.go)2
-rw-r--r--golang/gen/restapi/operations/post_creator_urlbuilder.go (renamed from golang/restapi/operations/post_creator_urlbuilder.go)0
-rw-r--r--golang/gen/restapi/server.go (renamed from golang/restapi/server.go)4
-rw-r--r--golang/gen/restapi/test.go13
17 files changed, 44 insertions, 9 deletions
diff --git a/golang/Gopkg.lock b/golang/Gopkg.lock
index cf86e7aa..049491d9 100644
--- a/golang/Gopkg.lock
+++ b/golang/Gopkg.lock
@@ -41,6 +41,12 @@
version = "v1.0-rc1"
[[projects]]
+ name = "github.com/davecgh/go-spew"
+ packages = ["spew"]
+ revision = "346938d642f2ec3594ed81d874461961cd0faa76"
+ version = "v1.1.0"
+
+[[projects]]
name = "github.com/docker/go-units"
packages = ["."]
revision = "47565b4f722fb6ceae66b95f853feed578a4a51c"
@@ -197,6 +203,12 @@
version = "v0.8.0"
[[projects]]
+ name = "github.com/pmezard/go-difflib"
+ packages = ["difflib"]
+ revision = "792786c7400a136282c1664665ae0a8db921c6c2"
+ version = "v1.0.0"
+
+[[projects]]
name = "github.com/sirupsen/logrus"
packages = ["."]
revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc"
@@ -236,6 +248,12 @@
version = "v1.0.2"
[[projects]]
+ name = "github.com/stretchr/testify"
+ packages = ["assert"]
+ revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71"
+ version = "v1.2.1"
+
+[[projects]]
name = "github.com/tylerb/graceful"
packages = ["."]
revision = "4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb"
@@ -311,6 +329,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "ca575bc9f4c9011b152d7815b930a1765b8e0da49ca551b346a1a2b4065516c4"
+ inputs-digest = "5d595b1536b9cb05d0ea9f9aa79e06d8b0851733059190260bbecf4d54108542"
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/golang/models/creator_entity.go b/golang/gen/models/creator_entity.go
index d094376a..d094376a 100644
--- a/golang/models/creator_entity.go
+++ b/golang/gen/models/creator_entity.go
diff --git a/golang/models/error.go b/golang/gen/models/error.go
index d8c11da2..d8c11da2 100644
--- a/golang/models/error.go
+++ b/golang/gen/models/error.go
diff --git a/golang/restapi/configure_fatcat.go b/golang/gen/restapi/configure_fatcat.go
index 7398ad26..8cba2ba3 100644
--- a/golang/restapi/configure_fatcat.go
+++ b/golang/gen/restapi/configure_fatcat.go
@@ -6,6 +6,7 @@ import (
"crypto/tls"
"net/http"
+ log "github.com/sirupsen/logrus"
errors "github.com/go-openapi/errors"
runtime "github.com/go-openapi/runtime"
middleware "github.com/go-openapi/runtime/middleware"
@@ -30,18 +31,21 @@ func configureAPI(api *operations.FatcatAPI) http.Handler {
// Set your custom logger if needed. Default one is log.Printf
// Expected interface func(string, ...interface{})
- //
- // Example:
- // api.Logger = log.Printf
+ api.Logger = log.Printf
api.JSONConsumer = runtime.JSONConsumer()
api.JSONProducer = runtime.JSONProducer()
api.GetCreatorIDHandler = operations.GetCreatorIDHandlerFunc(func(params operations.GetCreatorIDParams) middleware.Responder {
+ // "get or 404" using params.ID. join creator_ident and creator_rev.
+ // populate result data
+ // return that
return middleware.NotImplemented("operation .GetCreatorID has not yet been implemented")
})
api.PostCreatorHandler = operations.PostCreatorHandlerFunc(func(params operations.PostCreatorParams) middleware.Responder {
+ // get-or-create editgroup based on current editor (session)
+ // insert new rev, ident, and edit
return middleware.NotImplemented("operation .PostCreator has not yet been implemented")
})
diff --git a/golang/restapi/doc.go b/golang/gen/restapi/doc.go
index e18461a8..e18461a8 100644
--- a/golang/restapi/doc.go
+++ b/golang/gen/restapi/doc.go
diff --git a/golang/restapi/embedded_spec.go b/golang/gen/restapi/embedded_spec.go
index 6a6cf356..6a6cf356 100644
--- a/golang/restapi/embedded_spec.go
+++ b/golang/gen/restapi/embedded_spec.go
diff --git a/golang/restapi/operations/fatcat_api.go b/golang/gen/restapi/operations/fatcat_api.go
index 7b60b34f..7b60b34f 100644
--- a/golang/restapi/operations/fatcat_api.go
+++ b/golang/gen/restapi/operations/fatcat_api.go
diff --git a/golang/restapi/operations/get_creator_id.go b/golang/gen/restapi/operations/get_creator_id.go
index 90185374..90185374 100644
--- a/golang/restapi/operations/get_creator_id.go
+++ b/golang/gen/restapi/operations/get_creator_id.go
diff --git a/golang/restapi/operations/get_creator_id_parameters.go b/golang/gen/restapi/operations/get_creator_id_parameters.go
index f1e338b6..f1e338b6 100644
--- a/golang/restapi/operations/get_creator_id_parameters.go
+++ b/golang/gen/restapi/operations/get_creator_id_parameters.go
diff --git a/golang/restapi/operations/get_creator_id_responses.go b/golang/gen/restapi/operations/get_creator_id_responses.go
index e5712fd1..4c1cee1b 100644
--- a/golang/restapi/operations/get_creator_id_responses.go
+++ b/golang/gen/restapi/operations/get_creator_id_responses.go
@@ -10,7 +10,7 @@ import (
"github.com/go-openapi/runtime"
- models "git.archive.org/bnewbold/fatcat/golang/models"
+ models "git.archive.org/bnewbold/fatcat/golang/gen/models"
)
// GetCreatorIDOKCode is the HTTP code returned for type GetCreatorIDOK
diff --git a/golang/restapi/operations/get_creator_id_urlbuilder.go b/golang/gen/restapi/operations/get_creator_id_urlbuilder.go
index 8f23373f..8f23373f 100644
--- a/golang/restapi/operations/get_creator_id_urlbuilder.go
+++ b/golang/gen/restapi/operations/get_creator_id_urlbuilder.go
diff --git a/golang/restapi/operations/post_creator.go b/golang/gen/restapi/operations/post_creator.go
index b33694f1..b33694f1 100644
--- a/golang/restapi/operations/post_creator.go
+++ b/golang/gen/restapi/operations/post_creator.go
diff --git a/golang/restapi/operations/post_creator_parameters.go b/golang/gen/restapi/operations/post_creator_parameters.go
index af5e3cd2..f35cf2d5 100644
--- a/golang/restapi/operations/post_creator_parameters.go
+++ b/golang/gen/restapi/operations/post_creator_parameters.go
@@ -12,7 +12,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
- models "git.archive.org/bnewbold/fatcat/golang/models"
+ models "git.archive.org/bnewbold/fatcat/golang/gen/models"
)
// NewPostCreatorParams creates a new PostCreatorParams object
diff --git a/golang/restapi/operations/post_creator_responses.go b/golang/gen/restapi/operations/post_creator_responses.go
index 372771ac..8f8ea571 100644
--- a/golang/restapi/operations/post_creator_responses.go
+++ b/golang/gen/restapi/operations/post_creator_responses.go
@@ -10,7 +10,7 @@ import (
"github.com/go-openapi/runtime"
- models "git.archive.org/bnewbold/fatcat/golang/models"
+ models "git.archive.org/bnewbold/fatcat/golang/gen/models"
)
// PostCreatorCreatedCode is the HTTP code returned for type PostCreatorCreated
diff --git a/golang/restapi/operations/post_creator_urlbuilder.go b/golang/gen/restapi/operations/post_creator_urlbuilder.go
index 901edeb6..901edeb6 100644
--- a/golang/restapi/operations/post_creator_urlbuilder.go
+++ b/golang/gen/restapi/operations/post_creator_urlbuilder.go
diff --git a/golang/restapi/server.go b/golang/gen/restapi/server.go
index 6fb4f3b9..2147f3f6 100644
--- a/golang/restapi/server.go
+++ b/golang/gen/restapi/server.go
@@ -7,6 +7,7 @@ import (
"crypto/x509"
"errors"
"io/ioutil"
+ "log"
"net"
"net/http"
"os"
@@ -19,9 +20,8 @@ import (
"github.com/go-openapi/swag"
flags "github.com/jessevdk/go-flags"
graceful "github.com/tylerb/graceful"
- log "github.com/sirupsen/logrus" // manual hack for now (bnewbold)
- "git.archive.org/bnewbold/fatcat/golang/restapi/operations"
+ "git.archive.org/bnewbold/fatcat/golang/gen/restapi/operations"
)
const (
diff --git a/golang/gen/restapi/test.go b/golang/gen/restapi/test.go
new file mode 100644
index 00000000..f45b33c5
--- /dev/null
+++ b/golang/gen/restapi/test.go
@@ -0,0 +1,13 @@
+
+package restapi
+
+import (
+ "testing"
+ "github.com/stretchr/testify/assert"
+)
+
+func TestSomething(t *testing.T) {
+
+ assert.True(t, true, "True is true!")
+
+}