aboutsummaryrefslogtreecommitdiffstats
path: root/golang/api/handlers/entities.go
diff options
context:
space:
mode:
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