aboutsummaryrefslogtreecommitdiffstats
path: root/golang/api/handlers/entities.go
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-10 20:09:05 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-10 20:09:05 -0700
commite63d2b6c2bc7c7ecf5e57e4e25267113f8a1ed51 (patch)
tree4e08097208ddb26b50d9bed9cdf6fffef97fd8a2 /golang/api/handlers/entities.go
parent63dc69bbcdbee264383b919f9a8a3b1a83358be7 (diff)
downloadfatcat-e63d2b6c2bc7c7ecf5e57e4e25267113f8a1ed51.tar.gz
fatcat-e63d2b6c2bc7c7ecf5e57e4e25267113f8a1ed51.zip
cleanups
Diffstat (limited to 'golang/api/handlers/entities.go')
-rw-r--r--golang/api/handlers/entities.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/golang/api/handlers/entities.go b/golang/api/handlers/entities.go
index a2fb7db8..9e184d92 100644
--- a/golang/api/handlers/entities.go
+++ b/golang/api/handlers/entities.go
@@ -44,14 +44,13 @@ func (ci *CreatorIdent) State() string {
}
}
+////
func NewGetCreatorIDHandler(db *pg.DB) operations.GetCreatorIDHandler {
return &getCreatorID{db: db}
}
-
type getCreatorID struct {
db *pg.DB
}
-
func (d *getCreatorID) Handle(params operations.GetCreatorIDParams) middleware.Responder {
// "get or 404" using params.ID. join creator_ident and creator_rev.
// populate result data
@@ -75,28 +74,26 @@ func (d *getCreatorID) Handle(params operations.GetCreatorIDParams) middleware.R
return operations.NewGetCreatorIDOK().WithPayload(api_entity)
}
+////
func NewGetCreatorLookupHandler(db *pg.DB) operations.GetCreatorLookupHandler {
return &getCreatorLookup{db: db}
}
-
type getCreatorLookup struct {
db *pg.DB
}
-
func (d *getCreatorLookup) Handle(params operations.GetCreatorLookupParams) middleware.Responder {
// get-or-create editgroup based on current editor (session)
// insert new rev, ident, and edit
return middleware.NotImplemented("operation .GetCreatorLookup has not yet been implemented")
}
+////
func NewPostCreatorHandler(db *pg.DB) operations.PostCreatorHandler {
return &postCreator{db: db}
}
-
type postCreator struct {
db *pg.DB
}
-
func (d *postCreator) Handle(params operations.PostCreatorParams) middleware.Responder {
// get-or-create editgroup based on current editor (session)
// insert new rev, ident, and edit