codegentemplate

package
v0.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

codegentemplate is a package related to codegentemplate data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeGenTemplate

type CodeGenTemplate struct {
	app.Model
	ID app.NullUUID `json:"id"         db:"m.id"              gorm:"column:id;primaryKey"`
	// AddField : DONT REMOVE THIS COMMENT
	CreatedAt app.NullDateTime `json:"created_at" db:"m.created_at"      gorm:"column:created_at"`
	UpdatedAt app.NullDateTime `json:"updated_at" db:"m.updated_at"      gorm:"column:updated_at"`
	DeletedAt app.NullDateTime `json:"deleted_at" db:"m.deleted_at,hide" gorm:"column:deleted_at"`
}

CodeGenTemplate is the main model of CodeGenTemplate data. It provides a convenient interface for app.ModelInterface

func (CodeGenTemplate) EndPoint

func (CodeGenTemplate) EndPoint() string

EndPoint returns the CodeGenTemplate end point, it used for cache key, etc.

func (*CodeGenTemplate) GetFields

func (m *CodeGenTemplate) GetFields() map[string]map[string]any

GetFields returns list of the field of the CodeGenTemplate data in the database, used for querying.

func (*CodeGenTemplate) GetFilters

func (m *CodeGenTemplate) GetFilters() []map[string]any

GetFilters returns the filter of the CodeGenTemplate data in the database, used for querying.

func (*CodeGenTemplate) GetOpenAPISchema added in v0.0.20

func (m *CodeGenTemplate) GetOpenAPISchema() map[string]any

GetOpenAPISchema returns the Open API Schema of the CodeGenTemplate in the open api documentation.

func (*CodeGenTemplate) GetRelations

func (m *CodeGenTemplate) GetRelations() map[string]map[string]any

GetRelations returns the relations of the CodeGenTemplate data in the database, used for querying.

func (*CodeGenTemplate) GetSchema

func (m *CodeGenTemplate) GetSchema() map[string]any

GetSchema returns the CodeGenTemplate schema, used for querying.

func (*CodeGenTemplate) GetSorts

func (m *CodeGenTemplate) GetSorts() []map[string]any

GetSorts returns the default sort of the CodeGenTemplate data in the database, used for querying.

func (CodeGenTemplate) OpenAPISchemaName

func (CodeGenTemplate) OpenAPISchemaName() string

OpenAPISchemaName returns the name of the CodeGenTemplate schema in the open api documentation.

func (CodeGenTemplate) TableAliasName

func (CodeGenTemplate) TableAliasName() string

TableAliasName returns the table alias name of the CodeGenTemplate table, used for querying.

func (CodeGenTemplate) TableName

func (CodeGenTemplate) TableName() string

TableName returns the name of the CodeGenTemplate table in the database.

func (CodeGenTemplate) TableVersion

func (CodeGenTemplate) TableVersion() string

TableVersion returns the versions of the CodeGenTemplate table in the database. Change this value with date format YY.MM.DDHHii when any table structure changes.

type CodeGenTemplateList added in v0.0.20

type CodeGenTemplateList struct {
	app.ListModel
}

func (*CodeGenTemplateList) GetOpenAPISchema added in v0.0.20

func (p *CodeGenTemplateList) GetOpenAPISchema() map[string]any

GetOpenAPISchema returns the Open API Schema of the CodeGenTemplateList in the open api documentation.

func (CodeGenTemplateList) OpenAPISchemaName added in v0.0.20

func (CodeGenTemplateList) OpenAPISchemaName() string

OpenAPISchemaName returns the name of the CodeGenTemplateList schema in the open api documentation.

type OpenAPIOperation

type OpenAPIOperation struct {
	app.OpenAPIOperation
}

OpenAPIOperation embed from app.OpenAPIOperation for simplicity, used for autogenerate open api document.

func OpenAPI

func OpenAPI() *OpenAPIOperation

OpenAPI is constructor for *openAPI, to autogenerate open api document.

func (*OpenAPIOperation) Base

func (o *OpenAPIOperation) Base()

Base is common detail of end_point open api document component.

func (*OpenAPIOperation) Create

func (o *OpenAPIOperation) Create() *OpenAPIOperation

Create is detail of `POST /api/v3/end_point` open api document component.

func (*OpenAPIOperation) DeleteByID

func (o *OpenAPIOperation) DeleteByID() *OpenAPIOperation

DeleteByID is detail of `DELETE /api/v3/end_point/{id}` open api document component.

func (*OpenAPIOperation) Get

Get is detail of `GET /api/v3/end_point` open api document component.

func (*OpenAPIOperation) GetByID

func (o *OpenAPIOperation) GetByID() *OpenAPIOperation

GetByID is detail of `GET /api/v3/end_point/{id}` open api document component.

func (*OpenAPIOperation) PartiallyUpdateByID

func (o *OpenAPIOperation) PartiallyUpdateByID() *OpenAPIOperation

PartiallyUpdateByID is detail of `PATCH /api/v3/end_point/{id}` open api document component.

func (*OpenAPIOperation) UpdateByID

func (o *OpenAPIOperation) UpdateByID() *OpenAPIOperation

UpdateByID is detail of `PUT /api/v3/end_point/{id}` open api document component.

type ParamCreate

type ParamCreate struct {
	UseCaseHandler
}

ParamCreate is the expected parameters for create a new CodeGenTemplate data.

type ParamDelete

type ParamDelete struct {
	UseCaseHandler
	Reason app.NullString `json:"reason" gorm:"-" validate:"required"`
}

ParamDelete is the expected parameters for delete the CodeGenTemplate data.

type ParamPartiallyUpdate

type ParamPartiallyUpdate struct {
	UseCaseHandler
	Reason app.NullString `json:"reason" gorm:"-" validate:"required"`
}

ParamPartiallyUpdate is the expected parameters for partially update the CodeGenTemplate data.

type ParamUpdate

type ParamUpdate struct {
	UseCaseHandler
	Reason app.NullString `json:"reason" gorm:"-" validate:"required"`
}

ParamUpdate is the expected parameters for update the CodeGenTemplate data.

type RESTAPIHandler

type RESTAPIHandler struct {
	UseCase UseCaseHandler
}

RESTAPIHandler provides a convenient interface for CodeGenTemplate REST API handler.

func REST

func REST() *RESTAPIHandler

REST returns a *RESTAPIHandler.

func (*RESTAPIHandler) Create

func (r *RESTAPIHandler) Create(c *fiber.Ctx) error

Create is the REST API handler for `POST /api/end_point`.

func (*RESTAPIHandler) DeleteByID

func (r *RESTAPIHandler) DeleteByID(c *fiber.Ctx) error

DeleteByID is the REST API handler for `DELETE /api/end_point/{id}`.

func (*RESTAPIHandler) Get

func (r *RESTAPIHandler) Get(c *fiber.Ctx) error

Get is the REST API handler for `GET /api/end_point`.

func (*RESTAPIHandler) GetByID

func (r *RESTAPIHandler) GetByID(c *fiber.Ctx) error

GetByID is the REST API handler for `GET /api/end_point/{id}`.

func (*RESTAPIHandler) PartiallyUpdateByID

func (r *RESTAPIHandler) PartiallyUpdateByID(c *fiber.Ctx) error

PartiallyUpdateByID is the REST API handler for `PATCH /api/end_point/{id}`.

func (*RESTAPIHandler) UpdateByID

func (r *RESTAPIHandler) UpdateByID(c *fiber.Ctx) error

UpdateByID is the REST API handler for `PUT /api/end_point/{id}`.

type UseCaseHandler

type UseCaseHandler struct {
	CodeGenTemplate

	// injectable dependencies
	Ctx   *app.Ctx   `json:"-" db:"-" gorm:"-"`
	Query url.Values `json:"-" db:"-" gorm:"-"`
}

UseCaseHandler provides a convenient interface for CodeGenTemplate use case, use UseCase to access UseCaseHandler.

func UseCase

func UseCase(ctx app.Ctx, query ...url.Values) UseCaseHandler

UseCase returns a UseCaseHandler for expected use case functional.

func (UseCaseHandler) Async

func (u UseCaseHandler) Async(ctx app.Ctx, query ...url.Values) UseCaseHandler

Async return UseCaseHandler with async process.

func (UseCaseHandler) Create

func (u UseCaseHandler) Create(p *ParamCreate) error

Create creates a new data CodeGenTemplate with specified parameters.

func (UseCaseHandler) DeleteByID

func (u UseCaseHandler) DeleteByID(id string, p *ParamDelete) error

DeleteByID deletes the CodeGenTemplate data for the specified ID.

func (UseCaseHandler) Get

func (u UseCaseHandler) Get() (app.ListModel, error)

Get returns the list of CodeGenTemplate data.

func (UseCaseHandler) GetByID

func (u UseCaseHandler) GetByID(id string) (CodeGenTemplate, error)

GetByID returns the CodeGenTemplate data for the specified ID.

func (UseCaseHandler) PartiallyUpdateByID

func (u UseCaseHandler) PartiallyUpdateByID(id string, p *ParamPartiallyUpdate) error

PartiallyUpdateByID updates the CodeGenTemplate data for the specified ID with specified parameters.

func (UseCaseHandler) UpdateByID

func (u UseCaseHandler) UpdateByID(id string, p *ParamUpdate) error

UpdateByID updates the CodeGenTemplate data for the specified ID with specified parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL