Documentation ¶
Overview ¶
Package apis for common interfaces MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package stores for all sgbd operation MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package interfaces for common interfaces MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package business for business interface MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package business for business interface MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package interfaces for common interfaces MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package apis for common apis MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package apis for all exposed api MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package business for business interface MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package engine for all sgbd operation MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package engine for all sgbd operation MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package apis for all exposed api MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Variables
- func Call(params ...interface{}) []reflect.Value
- type API
- func (p *API) Declare(data APIMethod, intf interface{}) error
- func (p *API) GenericDeleteByID(id string, toDelete models.IPersistent) (interface{}, error)
- func (p *API) GenericGetAll(toGet models.IPersistent, toGets models.IPersistents) ([]models.IPersistent, error)
- func (p *API) GenericGetByID(id string, toGet models.IPersistent) (models.IPersistent, error)
- func (p *API) GenericLinkDeleteByID(assoc models.IEdgeBean) (interface{}, error)
- func (p *API) GenericLinkGetAll(id string, links []models.IEdgeBean, targetType IAPI) ([]models.IPersistent, error)
- func (p *API) GenericLinkPostByID(assoc models.IEdgeBean) (interface{}, error)
- func (p *API) GenericLinkPutByID(assoc models.IEdgeBean) (interface{}, error)
- func (p *API) GenericPatchByID(id string, body string, toPatch models.IPersistent) (interface{}, error)
- func (p *API) GenericPost(body string, toCreate models.IPersistent) (interface{}, error)
- func (p *API) GenericPutByID(id string, body string, toUpdate models.IPersistent) (models.IPersistent, error)
- func (p *API) GetAll() ([]models.IPersistent, error)
- func (p *API) GetAllLinks(id string, targetType IAPI) ([]models.IPersistent, error)
- func (p *API) GetByID(id string) (models.IPersistent, error)
- func (p *API) GetFactories() models.IPersistents
- func (p *API) GetFactory() models.IPersistent
- func (p *API) HandlerDeleteByID(id string) (interface{}, error)
- func (p *API) HandlerFilter(body map[string]string) (models.IPersistents, error)
- func (p *API) HandlerLinkDeleteByID(src string, dst string, body string, targetType IAPI, instance string) (interface{}, error)
- func (p *API) HandlerLinkPostByID(src string, dst string, body string, targetType IAPI) (models.IPersistent, error)
- func (p *API) HandlerLinkPutByID(src string, dst string, body string, targetType IAPI, instance string) (models.IPersistent, error)
- func (p *API) HandlerLinkStaticDeleteByID() func(c IHttpContext, targetType IAPI)
- func (p *API) HandlerLinkStaticGetAll() func(c IHttpContext, targetType IAPI)
- func (p *API) HandlerLinkStaticGetByID() func(c IHttpContext, targetType IAPI)
- func (p *API) HandlerLinkStaticPostByID() func(c IHttpContext, targetType IAPI)
- func (p *API) HandlerLinkStaticPutByID() func(c IHttpContext, targetType IAPI)
- func (p *API) HandlerPatchByID(id string, body string) (interface{}, error)
- func (p *API) HandlerPost(body string) (interface{}, error)
- func (p *API) HandlerPutByID(id string, body string) (models.IPersistent, error)
- func (p *API) HandlerStaticDeleteByID() func(c IHttpContext)
- func (p *API) HandlerStaticGetAll() func(c IHttpContext)
- func (p *API) HandlerStaticGetByID() func(c IHttpContext)
- func (p *API) HandlerStaticPatchByID() func(c IHttpContext)
- func (p *API) HandlerStaticPost() func(c IHttpContext)
- func (p *API) HandlerStaticPostByID() func(c IHttpContext)
- func (p *API) HandlerStaticPutByID() func(c IHttpContext)
- func (p *API) Init() error
- func (p *API) LoadAllLinks(name string, factory func() models.IPersistent, targetType IAPI) (interface{}, int, error)
- func (p *API) PostConstruct(name string) error
- func (p *API) ScanHandler(swagger ISwaggerService, ptr interface{})
- func (p *API) Validate(name string) error
- func (p *API) XTotalCount(c IHttpContext, count int)
- type APIManager
- type APIMethod
- type CrudHandler
- type Graph
- func (p *Graph) All() ([]IQuad, error)
- func (p *Graph) Clear() error
- func (p *Graph) CreateLink(data models.IEdgeBean) error
- func (p *Graph) DeleteLink(toDelete models.IEdgeBean) error
- func (p *Graph) Export() (map[string][]map[string]interface{}, error)
- func (p *Graph) GetAllLink(model string, id string, array *[]models.IEdgeBean, targetType string) error
- func (p *Graph) GetLink(entity models.IEdgeBean) error
- func (p *Graph) Init() error
- func (p *Graph) New(dbpath string) IGraphStore
- func (p *Graph) PostConstruct(name string) error
- func (p *Graph) QueryGizmo(text string, tag string) ([]models.IEdgeBean, error)
- func (p *Graph) Statistics() ([]IStats, error)
- func (p *Graph) TruncateLink(entity models.IPersistent) error
- func (p *Graph) UpdateLink(data models.IEdgeBean) error
- func (p *Graph) Validate(name string) error
- type GraphCrudBusiness
- func (p *GraphCrudBusiness) All() ([]IQuad, error)
- func (p *GraphCrudBusiness) Clear() error
- func (p *GraphCrudBusiness) CreateLink(toCreate models.IEdgeBean) (models.IEdgeBean, error)
- func (p *GraphCrudBusiness) DeleteLink(toDelete models.IEdgeBean) (models.IEdgeBean, error)
- func (p *GraphCrudBusiness) Export() (map[string][]map[string]interface{}, error)
- func (p *GraphCrudBusiness) GetAllLink(model string, id string, toGets []models.IEdgeBean, targetType string) ([]models.IEdgeBean, error)
- func (p *GraphCrudBusiness) Init() error
- func (p *GraphCrudBusiness) New() ILinkBusiness
- func (p *GraphCrudBusiness) PatchLink(toPatch models.IEdgeBean) (models.IEdgeBean, error)
- func (p *GraphCrudBusiness) PostConstruct(name string) error
- func (p *GraphCrudBusiness) Statistics() ([]IStats, error)
- func (p *GraphCrudBusiness) TruncateLink(toTruncate models.IPersistent) (models.IPersistent, error)
- func (p *GraphCrudBusiness) UpdateLink(toUpdate models.IEdgeBean) (models.IEdgeBean, error)
- func (p *GraphCrudBusiness) Validate(name string) error
- type IAPI
- type IAPIManager
- type ICrudBusiness
- type IDataStore
- type IGraphStore
- type IHttpContext
- type ILinkBusiness
- type INode
- type IQuad
- type IRouter
- type IStats
- type ISwaggerService
- type Node
- type SqlCrudBusiness
- func (p *SqlCrudBusiness) Clear(excp []string) error
- func (p *SqlCrudBusiness) Create(toCreate models.IPersistent) (models.IPersistent, error)
- func (p *SqlCrudBusiness) Delete(toDelete models.IPersistent) (models.IPersistent, error)
- func (p *SqlCrudBusiness) Get(toGet models.IPersistent) (models.IPersistent, error)
- func (p *SqlCrudBusiness) GetAll(toGet models.IPersistent, toGets models.IPersistents) (models.IPersistents, error)
- func (p *SqlCrudBusiness) Init() error
- func (p *SqlCrudBusiness) New() ICrudBusiness
- func (p *SqlCrudBusiness) Patch(toPatch models.IPersistent) (models.IPersistent, error)
- func (p *SqlCrudBusiness) PostConstruct(name string) error
- func (p *SqlCrudBusiness) Statistics() ([]IStats, error)
- func (p *SqlCrudBusiness) Truncate(toTruncate models.IPersistent) (models.IPersistent, error)
- func (p *SqlCrudBusiness) Update(toUpdate models.IPersistent) (models.IPersistent, error)
- func (p *SqlCrudBusiness) Validate(name string) error
- type Store
- func (p *Store) Clear(excp []string) error
- func (p *Store) Create(entity models.IPersistent) error
- func (p *Store) Delete(id string, entity models.IPersistent) error
- func (p *Store) Get(id string, entity models.IPersistent) error
- func (p *Store) GetAll(entity models.IPersistent, array models.IPersistents) error
- func (p *Store) Init() error
- func (p *Store) New(dbpath string) IDataStore
- func (p *Store) PostConstruct(name string) error
- func (p *Store) Statistics() ([]IStats, error)
- func (p *Store) Truncate(entity models.IPersistent) error
- func (p *Store) Update(id string, entity models.IPersistent) error
- func (p *Store) Validate(name string) error
- type StoreStats
- type SwaggerService
- func (p *SwaggerService) AddDefinition(name string, ptr interface{}) string
- func (p *SwaggerService) AddPaths(tags string, route string, method string, summary string, description string, ...)
- func (p *SwaggerService) AddSchemes()
- func (p *SwaggerService) AddTags()
- func (p *SwaggerService) BasePath(base string) string
- func (p *SwaggerService) Init() error
- func (p *SwaggerService) New() ISwaggerService
- func (p *SwaggerService) PostConstruct(name string) error
- func (p *SwaggerService) SwaggerModel() *models.SwaggerModel
- func (p *SwaggerService) Validate(name string) error
- func (p *SwaggerService) Version(vers string) string
Constants ¶
This section is empty.
Variables ¶
var ( // Tables Fix tables names Tables = []string{"Node"} )
Functions ¶
Types ¶
type API ¶
type API struct { *winter.Bean // Router with injection mecanism Router IRouter `@autowired:"router"` // SqlCrudBusiness with injection mecanism SQLCrudBusiness ICrudBusiness `@autowired:"sql-crud-business"` // GraphBusiness with injection mecanism GraphBusiness ILinkBusiness `@autowired:"graph-crud-business"` // Factory Factory func() models.IPersistent Factories func() models.IPersistents HandlerTasks func(name string, body string) (interface{}, int, error) HandlerTasksByID func(id string, name string, body string) (interface{}, int, error) // Adapters GetByIDListener []func(models.IPersistent) models.IPersistent PutByIDListener []func(models.IPersistent) models.IPersistent // contains filtered or unexported fields }
API base class
func (*API) GenericDeleteByID ¶
func (p *API) GenericDeleteByID(id string, toDelete models.IPersistent) (interface{}, error)
GenericDeleteByID default method
func (*API) GenericGetAll ¶
func (p *API) GenericGetAll(toGet models.IPersistent, toGets models.IPersistents) ([]models.IPersistent, error)
GenericGetAll default method
func (*API) GenericGetByID ¶
func (p *API) GenericGetByID(id string, toGet models.IPersistent) (models.IPersistent, error)
GenericGetByID default method
func (*API) GenericLinkDeleteByID ¶
GenericLinkDeleteByID default method
func (*API) GenericLinkGetAll ¶
func (p *API) GenericLinkGetAll(id string, links []models.IEdgeBean, targetType IAPI) ([]models.IPersistent, error)
GenericLinkGetAll default method
func (*API) GenericLinkPostByID ¶
GenericLinkPutByID default method
func (*API) GenericLinkPutByID ¶
GenericLinkPutByID default method
func (*API) GenericPatchByID ¶
func (p *API) GenericPatchByID(id string, body string, toPatch models.IPersistent) (interface{}, error)
GenericPatchByID default method
func (*API) GenericPost ¶
func (p *API) GenericPost(body string, toCreate models.IPersistent) (interface{}, error)
GenericPost adefault method
func (*API) GenericPutByID ¶
func (p *API) GenericPutByID(id string, body string, toUpdate models.IPersistent) (models.IPersistent, error)
GenericPutByID default method
func (*API) GetAllLinks ¶
GetAllLinks get all
func (*API) GetByID ¶
func (p *API) GetByID(id string) (models.IPersistent, error)
GetByID get by id
func (*API) GetFactories ¶
func (p *API) GetFactories() models.IPersistents
GetFactories return a bean list
func (*API) GetFactory ¶
func (p *API) GetFactory() models.IPersistent
GetFactory return on new bean
func (*API) HandlerDeleteByID ¶
HandlerDeleteByID delete by id
func (*API) HandlerFilter ¶
HandlerFilter task handler for filter
func (*API) HandlerLinkDeleteByID ¶
func (p *API) HandlerLinkDeleteByID(src string, dst string, body string, targetType IAPI, instance string) (interface{}, error)
HandlerLinkDeleteByID update by id
func (*API) HandlerLinkPostByID ¶
func (p *API) HandlerLinkPostByID(src string, dst string, body string, targetType IAPI) (models.IPersistent, error)
HandlerLinkPostByID update by id
func (*API) HandlerLinkPutByID ¶
func (p *API) HandlerLinkPutByID(src string, dst string, body string, targetType IAPI, instance string) (models.IPersistent, error)
HandlerLinkPutByID update by id
func (*API) HandlerLinkStaticDeleteByID ¶
func (p *API) HandlerLinkStaticDeleteByID() func(c IHttpContext, targetType IAPI)
HandlerLinkStaticDeleteByID is the DELETE by ID handler
func (*API) HandlerLinkStaticGetAll ¶
func (p *API) HandlerLinkStaticGetAll() func(c IHttpContext, targetType IAPI)
HandlerLinkStaticGetAll is the GET by ID handler
func (*API) HandlerLinkStaticGetByID ¶
func (p *API) HandlerLinkStaticGetByID() func(c IHttpContext, targetType IAPI)
HandlerLinkStaticGetByID is the GET by ID handler
func (*API) HandlerLinkStaticPostByID ¶
func (p *API) HandlerLinkStaticPostByID() func(c IHttpContext, targetType IAPI)
HandlerLinkStaticPostByID is the PUT by ID handler
func (*API) HandlerLinkStaticPutByID ¶
func (p *API) HandlerLinkStaticPutByID() func(c IHttpContext, targetType IAPI)
HandlerLinkStaticPutByID is the PUT by ID handler
func (*API) HandlerPatchByID ¶
HandlerPatchByID pach by id
func (*API) HandlerPost ¶
HandlerPost create handler
func (*API) HandlerPutByID ¶
HandlerPutByID update by id
func (*API) HandlerStaticDeleteByID ¶
func (p *API) HandlerStaticDeleteByID() func(c IHttpContext)
HandlerStaticDeleteByID is the DELETE by ID handler
func (*API) HandlerStaticGetAll ¶
func (p *API) HandlerStaticGetAll() func(c IHttpContext)
HandlerStaticGetAll is the GET by ID handler
func (*API) HandlerStaticGetByID ¶
func (p *API) HandlerStaticGetByID() func(c IHttpContext)
HandlerStaticGetByID is the GET by ID handler
func (*API) HandlerStaticPatchByID ¶
func (p *API) HandlerStaticPatchByID() func(c IHttpContext)
HandlerStaticPatchByID is the PATCH by ID handler
func (*API) HandlerStaticPost ¶
func (p *API) HandlerStaticPost() func(c IHttpContext)
HandlerStaticPost is the POST handler
func (*API) HandlerStaticPostByID ¶
func (p *API) HandlerStaticPostByID() func(c IHttpContext)
HandlerStaticPostByID is the POST handler
func (*API) HandlerStaticPutByID ¶
func (p *API) HandlerStaticPutByID() func(c IHttpContext)
HandlerStaticPutByID is the PUT by ID handler
func (*API) LoadAllLinks ¶
func (p *API) LoadAllLinks(name string, factory func() models.IPersistent, targetType IAPI) (interface{}, int, error)
LoadAllLinks read all views and all data
func (*API) ScanHandler ¶
func (p *API) ScanHandler(swagger ISwaggerService, ptr interface{})
ScanHandler this API
func (*API) XTotalCount ¶
func (p *API) XTotalCount(c IHttpContext, count int)
XTotalCount handle X-Total-Count
type APIManager ¶
type APIManager struct { *winter.Service // Inject Router IRouter `@autowired:"router"` // contains filtered or unexported fields }
APIManager interface
func (*APIManager) Validate ¶
func (m *APIManager) Validate(name string) error
Validate Init this manager
type APIMethod ¶
type APIMethod struct {
// contains filtered or unexported fields
}
APIMethod single structure to modelise api declaration
type CrudHandler ¶
CrudHandler single structure to modelise api declaration
type Graph ¶
type Graph struct { // members *winter.Service // Db path DbPath string // contains filtered or unexported fields }
Graph internal members
func (*Graph) CreateLink ¶
CreateLink in graph db
func (*Graph) DeleteLink ¶
DeleteLink this persistent bean
func (*Graph) GetAllLink ¶
func (p *Graph) GetAllLink(model string, id string, array *[]models.IEdgeBean, targetType string) error
GetAllLink this persistent bean
func (*Graph) PostConstruct ¶
PostConstruct this bean
func (*Graph) QueryGizmo ¶
QueryGizmo query gizmo
func (*Graph) Statistics ¶
Statistics some statistics
func (*Graph) TruncateLink ¶
func (p *Graph) TruncateLink(entity models.IPersistent) error
TruncateLink method
func (*Graph) UpdateLink ¶
UpdateLink in graph db
type GraphCrudBusiness ¶
type GraphCrudBusiness struct { *winter.Service // Store with injection mecanism Store IGraphStore `@autowired:"cayley-manager"` }
GraphCrudBusiness internal members
func (*GraphCrudBusiness) All ¶
func (p *GraphCrudBusiness) All() ([]IQuad, error)
Statistics some statistics
func (*GraphCrudBusiness) CreateLink ¶
CreateLink retrieve this link
func (*GraphCrudBusiness) DeleteLink ¶
DeleteLink a bean
func (*GraphCrudBusiness) Export ¶
func (p *GraphCrudBusiness) Export() (map[string][]map[string]interface{}, error)
Export some values
func (*GraphCrudBusiness) GetAllLink ¶
func (p *GraphCrudBusiness) GetAllLink(model string, id string, toGets []models.IEdgeBean, targetType string) ([]models.IEdgeBean, error)
GetAllLink retrieve this bean by its id
func (*GraphCrudBusiness) PostConstruct ¶
func (p *GraphCrudBusiness) PostConstruct(name string) error
PostConstruct this bean
func (*GraphCrudBusiness) Statistics ¶
func (p *GraphCrudBusiness) Statistics() ([]IStats, error)
Statistics some statistics
func (*GraphCrudBusiness) TruncateLink ¶
func (p *GraphCrudBusiness) TruncateLink(toTruncate models.IPersistent) (models.IPersistent, error)
TruncateLink a bean
func (*GraphCrudBusiness) UpdateLink ¶
UpdateLink retrieve this link
func (*GraphCrudBusiness) Validate ¶
func (p *GraphCrudBusiness) Validate(name string) error
Validate this bean
type IAPI ¶
type IAPI interface { winter.IBean Declare(APIMethod, interface{}) error // Data handled by this API GetFactory() models.IPersistent GetFactories() models.IPersistents // All GetAll() ([]models.IPersistent, error) // Links GetAllLinks(id string, targetType IAPI) ([]models.IPersistent, error) LoadAllLinks(name string, factory func() models.IPersistent, targetType IAPI) (interface{}, int, error) }
IAPI all package methods
type IAPIManager ¶
IAPIManager interface
type ICrudBusiness ¶
type ICrudBusiness interface { winter.IBean // Relationnal data GetAll(models.IPersistent, models.IPersistents) (models.IPersistents, error) Get(models.IPersistent) (models.IPersistent, error) Create(models.IPersistent) (models.IPersistent, error) Update(models.IPersistent) (models.IPersistent, error) Delete(models.IPersistent) (models.IPersistent, error) Patch(models.IPersistent) (models.IPersistent, error) Clear([]string) error Statistics() ([]IStats, error) }
ICrudBusiness interface
type IDataStore ¶
type IDataStore interface { winter.IBean Create(entity models.IPersistent) error Update(id string, entity models.IPersistent) error Delete(id string, entity models.IPersistent) error Truncate(entity models.IPersistent) error Get(id string, entity models.IPersistent) error GetAll(entity models.IPersistent, array models.IPersistents) error Clear([]string) error Statistics() ([]IStats, error) }
IDataStore interface
type IGraphStore ¶
type IGraphStore interface { winter.IBean CreateLink(data models.IEdgeBean) error UpdateLink(data models.IEdgeBean) error DeleteLink(entity models.IEdgeBean) error TruncateLink(entity models.IPersistent) error GetLink(entity models.IEdgeBean) error GetAllLink(model string, id string, collection *[]models.IEdgeBean, targetType string) error Clear() error All() ([]IQuad, error) Statistics() ([]IStats, error) Export() (map[string][]map[string]interface{}, error) }
IGraphStore interface
type IHttpContext ¶
type IHttpContext interface { Header(key, value string) IndentedJSON(code int, obj interface{}) String(code int, format string, values ...interface{}) Status(code int) Param(key string) string Query(key string) string GetQuery(key string) (string, bool) GetRawData() ([]byte, error) }
IHttpContext map GIN context
type ILinkBusiness ¶
type ILinkBusiness interface { winter.IBean // Linked nodes CreateLink(toCreate models.IEdgeBean) (models.IEdgeBean, error) UpdateLink(toUpdate models.IEdgeBean) (models.IEdgeBean, error) DeleteLink(toCreate models.IEdgeBean) (models.IEdgeBean, error) PatchLink(toPatch models.IEdgeBean) (models.IEdgeBean, error) GetAllLink(model string, id string, toGets []models.IEdgeBean, targetType string) ([]models.IEdgeBean, error) // Models admin Clear() error All() ([]IQuad, error) Statistics() ([]IStats, error) Export() (map[string][]map[string]interface{}, error) }
ILinkBusiness interface
type IQuad ¶
type IQuad interface { SubjectID() string Subject() string PredicateID() string Predicate() string ObjectID() string Object() string Label() string }
IQuad model
type IRouter ¶
type IRouter interface { winter.IService // Http boot HTTP(port int) error // Https boot HTTPS(port int, certFile string, keyFile string) error // Swagger SwaggerModel() func(*gin.Context) // HandleFunc HandleFunc(path string, f func(c IHttpContext), method string, content string) // HandleFunc HandleFuncLink(path string, f func(c IHttpContext, target IAPI), method string, content string, target IAPI) // HandleFuncString declare a string handler HandleFuncString(path string, f func() (string, error), method string, content string) // HandleRequest declare a string handler HandleRequest(path string, f http.Handler, method string) // HandleFuncStringWithId declare a string handler HandleFuncStringWithId(path string, f func(string) (string, error), method string, content string) }
IRouter Test all package methods
type ISwaggerService ¶
type ISwaggerService interface { winter.IService // Swagger SwaggerModel() *models.SwaggerModel Version(string) string BasePath(string) string // swagger method AddPaths(tags string, route string, method string, sumary string, description string, args map[string]interface{}, params map[string]interface{}, in []interface{}, out map[string]interface{}) }
ISwaggerService Test all package methods
type Node ¶
type Node struct { // Base component *API // internal members Name string // mounts Crud interface{} `@crud:"/api/nodes"` Link INode `@autowired:"NodeBean" @link:"/api/nodes" @href:"nodes"` // Swagger with injection mecanism Swagger ISwaggerService `@autowired:"swagger"` }
Node internal members
type SqlCrudBusiness ¶
type SqlCrudBusiness struct { // members *winter.Service // Store with injection mecanism Store IDataStore `@autowired:"sqllite-manager"` }
SqlCrudBusiness internal members
func (*SqlCrudBusiness) Clear ¶
func (p *SqlCrudBusiness) Clear(excp []string) error
Clear this bean
func (*SqlCrudBusiness) Create ¶
func (p *SqlCrudBusiness) Create(toCreate models.IPersistent) (models.IPersistent, error)
Create create a new persistent bean
func (*SqlCrudBusiness) Delete ¶
func (p *SqlCrudBusiness) Delete(toDelete models.IPersistent) (models.IPersistent, error)
Delete a bean
func (*SqlCrudBusiness) Get ¶
func (p *SqlCrudBusiness) Get(toGet models.IPersistent) (models.IPersistent, error)
Get retrieve this bean by its id
func (*SqlCrudBusiness) GetAll ¶
func (p *SqlCrudBusiness) GetAll(toGet models.IPersistent, toGets models.IPersistents) (models.IPersistents, error)
GetAll retrieve this bean by its id
func (*SqlCrudBusiness) Patch ¶
func (p *SqlCrudBusiness) Patch(toPatch models.IPersistent) (models.IPersistent, error)
Patch a bean
func (*SqlCrudBusiness) PostConstruct ¶
func (p *SqlCrudBusiness) PostConstruct(name string) error
PostConstruct this bean
func (*SqlCrudBusiness) Statistics ¶
func (p *SqlCrudBusiness) Statistics() ([]IStats, error)
Statistics some statistics
func (*SqlCrudBusiness) Truncate ¶
func (p *SqlCrudBusiness) Truncate(toTruncate models.IPersistent) (models.IPersistent, error)
Delete a bean
func (*SqlCrudBusiness) Update ¶
func (p *SqlCrudBusiness) Update(toUpdate models.IPersistent) (models.IPersistent, error)
Update an existing bean
func (*SqlCrudBusiness) Validate ¶
func (p *SqlCrudBusiness) Validate(name string) error
Validate this bean
type Store ¶
type Store struct { *winter.Service // Tables Tables []string // Db path DbPath string // Manager with injection mecanism APIManager IAPIManager `@autowired:"APIManager"` // contains filtered or unexported fields }
Store internal members
func (*Store) Create ¶
func (p *Store) Create(entity models.IPersistent) error
Create this persistent bean n store
func (*Store) Delete ¶
func (p *Store) Delete(id string, entity models.IPersistent) error
Delete this persistent bean
func (*Store) Get ¶
func (p *Store) Get(id string, entity models.IPersistent) error
Get this persistent bean
func (*Store) GetAll ¶
func (p *Store) GetAll(entity models.IPersistent, array models.IPersistents) error
GetAll this persistent bean
func (*Store) PostConstruct ¶
PostConstruct this bean
func (*Store) Statistics ¶
Statistics some statistics
type StoreStats ¶
StoreStats statss
type SwaggerService ¶
type SwaggerService struct { // members *winter.Service // swagger model Swagger *models.SwaggerModel }
SwaggerService internal members
func (*SwaggerService) AddDefinition ¶
func (p *SwaggerService) AddDefinition(name string, ptr interface{}) string
AddDefinition method
func (*SwaggerService) AddPaths ¶
func (p *SwaggerService) AddPaths(tags string, route string, method string, summary string, description string, args map[string]interface{}, query map[string]interface{}, in []interface{}, out map[string]interface{})
AddPaths method
func (*SwaggerService) BasePath ¶
func (p *SwaggerService) BasePath(base string) string
BasePath method
func (*SwaggerService) PostConstruct ¶
func (p *SwaggerService) PostConstruct(name string) error
PostConstruct Init this API
func (*SwaggerService) SwaggerModel ¶
func (p *SwaggerService) SwaggerModel() *models.SwaggerModel
SwaggerModel method
func (*SwaggerService) Validate ¶
func (p *SwaggerService) Validate(name string) error
Validate Init this API
func (*SwaggerService) Version ¶
func (p *SwaggerService) Version(vers string) string
Version method