Documentation ¶
Index ¶
- func CreateController(actualController extension.Controller, model extension.Model) extension.Controller
- func GetAPIEndpoints(c *gin.Context)
- type BaseController
- func (receiver *BaseController) Bind(c *gin.Context, resourceName string) (interface{}, error)
- func (receiver *BaseController) Create(c *gin.Context)
- func (receiver *BaseController) Delete(c *gin.Context)
- func (receiver *BaseController) DoAfterDBMigration(_ *gorm.DB) error
- func (receiver *BaseController) DoAfterRouterSetup(_ *gin.Engine) error
- func (receiver *BaseController) DoBeforeDBMigration(_ *gorm.DB) error
- func (receiver *BaseController) DoBeforeRouterSetup(_ *gin.Engine) error
- func (receiver *BaseController) GetModel() extension.Model
- func (receiver *BaseController) GetMulti(c *gin.Context)
- func (receiver *BaseController) GetOptions(c *gin.Context)
- func (receiver *BaseController) GetQueries(c *gin.Context) url.Values
- func (receiver *BaseController) GetResourceMultiURL() (string, error)
- func (receiver *BaseController) GetResourceName() (string, error)
- func (receiver *BaseController) GetResourceSingleURL() (string, error)
- func (receiver *BaseController) GetSingle(c *gin.Context)
- func (receiver *BaseController) OutputCreate(c *gin.Context, code int, result interface{})
- func (receiver *BaseController) OutputDelete(c *gin.Context, code int)
- func (receiver *BaseController) OutputError(c *gin.Context, code int, err error)
- func (receiver *BaseController) OutputGetMulti(c *gin.Context, code int, result interface{}, total int, ...)
- func (receiver *BaseController) OutputGetOptions(c *gin.Context, code int)
- func (receiver *BaseController) OutputGetSingle(c *gin.Context, code int, result interface{}, fields map[string]interface{})
- func (receiver *BaseController) OutputPatch(c *gin.Context, code int, result interface{})
- func (receiver *BaseController) OutputUpdate(c *gin.Context, code int, result interface{})
- func (receiver *BaseController) Patch(c *gin.Context)
- func (receiver *BaseController) Update(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateController ¶
func CreateController(actualController extension.Controller, model extension.Model) extension.Controller
CreateController creates a new instance of actual controller with BaseController
func GetAPIEndpoints ¶
GetAPIEndpoints returns endpoints of Clay API
Types ¶
type BaseController ¶
type BaseController struct {
// contains filtered or unexported fields
}
BaseController is the base class that all controller classes inherit
func (*BaseController) Bind ¶
func (receiver *BaseController) Bind(c *gin.Context, resourceName string) (interface{}, error)
Bind binds input data to a container instance
func (*BaseController) Create ¶
func (receiver *BaseController) Create(c *gin.Context)
Create corresponds HTTP POST message and handles a request for multi resource to create a new information
func (*BaseController) Delete ¶
func (receiver *BaseController) Delete(c *gin.Context)
Delete corresponds HTTP DELETE message and handles a request for a single resource to delete the specific information
func (*BaseController) DoAfterDBMigration ¶
func (receiver *BaseController) DoAfterDBMigration(_ *gorm.DB) error
DoAfterDBMigration execute initialization process after DB migration
func (*BaseController) DoAfterRouterSetup ¶
func (receiver *BaseController) DoAfterRouterSetup(_ *gin.Engine) error
DoAfterRouterSetup execute initialization process after Router initialization
func (*BaseController) DoBeforeDBMigration ¶
func (receiver *BaseController) DoBeforeDBMigration(_ *gorm.DB) error
DoBeforeDBMigration execute initialization process before DB migration
func (*BaseController) DoBeforeRouterSetup ¶
func (receiver *BaseController) DoBeforeRouterSetup(_ *gin.Engine) error
DoBeforeRouterSetup execute initialization process before Router initialization
func (*BaseController) GetModel ¶
func (receiver *BaseController) GetModel() extension.Model
GetModel returns its model
func (*BaseController) GetMulti ¶
func (receiver *BaseController) GetMulti(c *gin.Context)
GetMulti corresponds HTTP GET message and handles a request for multi resource to get the list of information
func (*BaseController) GetOptions ¶
func (receiver *BaseController) GetOptions(c *gin.Context)
GetOptions corresponds HTTP OPTIONS message and handles a request for multi resources to retrieve its supported options
func (*BaseController) GetQueries ¶
func (receiver *BaseController) GetQueries(c *gin.Context) url.Values
GetQueries returns query parameters
func (*BaseController) GetResourceMultiURL ¶
func (receiver *BaseController) GetResourceMultiURL() (string, error)
GetResourceMultiURL builds a resource url what represents multi resources based on the argument
func (*BaseController) GetResourceName ¶
func (receiver *BaseController) GetResourceName() (string, error)
GetResourceName returns its resource/table name in REST/DB
func (*BaseController) GetResourceSingleURL ¶
func (receiver *BaseController) GetResourceSingleURL() (string, error)
GetResourceSingleURL builds a resource url what represents a single resource based on the argument
func (*BaseController) GetSingle ¶
func (receiver *BaseController) GetSingle(c *gin.Context)
GetSingle corresponds HTTP GET message and handles a request for a single resource to get the information
func (*BaseController) OutputCreate ¶
func (receiver *BaseController) OutputCreate(c *gin.Context, code int, result interface{})
OutputCreate corresponds HTTP POST message and handles the output of a single result from logic classes
func (*BaseController) OutputDelete ¶
func (receiver *BaseController) OutputDelete(c *gin.Context, code int)
OutputDelete corresponds HTTP DELETE message and handles the code result from logic classes
func (*BaseController) OutputError ¶
func (receiver *BaseController) OutputError(c *gin.Context, code int, err error)
OutputError handles an error output
func (*BaseController) OutputGetMulti ¶
func (receiver *BaseController) OutputGetMulti(c *gin.Context, code int, result interface{}, total int, countBeforePagination int, fields map[string]interface{})
OutputGetMulti corresponds HTTP GET message and handles the output of multiple result from logic classes
func (*BaseController) OutputGetOptions ¶
func (receiver *BaseController) OutputGetOptions(c *gin.Context, code int)
OutputGetOptions corresponds HTTP OPTIONS message and handles the code result from logic classes, as well as OutputDelete
func (*BaseController) OutputGetSingle ¶
func (receiver *BaseController) OutputGetSingle(c *gin.Context, code int, result interface{}, fields map[string]interface{})
OutputGetSingle corresponds HTTP GET message and handles the output of a single result from logic classes
func (*BaseController) OutputPatch ¶
func (receiver *BaseController) OutputPatch(c *gin.Context, code int, result interface{})
OutputPatch corresponds HTTP PATCH message and handles the output of a single result from logic classes
func (*BaseController) OutputUpdate ¶
func (receiver *BaseController) OutputUpdate(c *gin.Context, code int, result interface{})
OutputUpdate corresponds HTTP PUT message and handles the output of a single result from logic classes
func (*BaseController) Patch ¶
func (receiver *BaseController) Patch(c *gin.Context)
Patch corresponds HTTP PATCH message and handles a request for a single resource to update partially the specific information
func (*BaseController) Update ¶
func (receiver *BaseController) Update(c *gin.Context)
Update corresponds HTTP PUT message and handles a request for a single resource to update the specific information
Source Files ¶
- base.go
- design.go
- ephemeral_binary_object.go
- ephemeral_binary_object_raw.go
- ephemeral_script.go
- ephemeral_script_execution.go
- ephemeral_script_raw.go
- ephemeral_template.go
- ephemeral_template_generation.go
- ephemeral_template_raw.go
- root.go
- template.go
- template_argument.go
- template_generation.go
- template_raw.go
- url_alias.go
- url_alias_definition.go
- user_defined_many_to_many_assiciation_child_model.go
- user_defined_many_to_many_assiciation_model.go
- user_defined_model.go
- user_defined_model_definition.go