entity

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package entity provides DTOs for entity operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntitiesListRequest

type EntitiesListRequest struct {
	Page     int    `form:"page"`
	PageSize int    `form:"pageSize"`
	Type     string `form:"type"`
}

EntitiesListRequest represents a request to list entities

type EntitiesListResponse

type EntitiesListResponse struct {
	Items []EntityItem `json:"items"`
	Total int64        `json:"total"`
	Page  int          `json:"page"`
	Size  int          `json:"size"`
}

EntitiesListResponse represents the response for listing entities

type EntityCreateRequest

type EntityCreateRequest struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"`
}

EntityCreateRequest represents a request to create an entity

type EntityCreateResponse

type EntityCreateResponse struct {
	ID         string      `json:"id"`
	Type       string      `json:"type"`
	Data       interface{} `json:"data"`
	ProviderID string      `json:"providerId,omitempty"`
	Status     int         `json:"status"`
	CreatedAt  string      `json:"createdAt"`
	UpdatedAt  string      `json:"updatedAt"`
}

EntityCreateResponse represents the response for creating an entity

type EntityDeleteRequest

type EntityDeleteRequest struct {
	ID string `uri:"id"`
}

EntityDeleteRequest represents a request to delete an entity

type EntityDeleteResponse

type EntityDeleteResponse struct {
}

EntityDeleteResponse represents the response for deleting an entity

type EntityDetailRequest

type EntityDetailRequest struct {
	ID string `uri:"id"`
}

EntityDetailRequest represents a request to get entity details

type EntityDetailResponse

type EntityDetailResponse struct {
	ID         string      `json:"id"`
	Type       string      `json:"type"`
	Data       interface{} `json:"data"`
	ProviderID string      `json:"providerId,omitempty"`
	Status     int         `json:"status"`
	CreatedAt  string      `json:"createdAt"`
	UpdatedAt  string      `json:"updatedAt"`
}

EntityDetailResponse represents the response for getting entity details

type EntityFunction

type EntityFunction struct {
	Id        string `json:"id"`
	Operation string `json:"operation"` // create/read/update/delete/custom
	Name      string `json:"name"`
}

EntityFunction represents a function that can be performed on an entity

type EntityFunctionsRequest

type EntityFunctionsRequest struct {
	ID string `uri:"id"`
}

EntityFunctionsRequest represents a request to get entity functions

type EntityFunctionsResponse

type EntityFunctionsResponse struct {
	Items []EntityFunction `json:"items"`
}

EntityFunctionsResponse represents the response for getting entity functions

type EntityItem

type EntityItem struct {
	ID         string      `json:"id"`
	Type       string      `json:"type"`
	Data       interface{} `json:"data"`
	ProviderID string      `json:"providerId,omitempty"`
	Status     int         `json:"status"`
	CreatedAt  string      `json:"createdAt"`
	UpdatedAt  string      `json:"updatedAt"`
}

EntityItem represents a single entity in the list

type EntityPreviewRequest

type EntityPreviewRequest struct {
	ID string `uri:"id"`
}

EntityPreviewRequest represents a request to preview an entity

type EntityPreviewResponse

type EntityPreviewResponse struct {
	Data interface{} `json:"data"`
}

EntityPreviewResponse represents the response for previewing an entity

type EntityUpdateRequest

type EntityUpdateRequest struct {
	ID   string      `uri:"id"`
	Data interface{} `json:"data"`
}

EntityUpdateRequest represents a request to update an entity

type EntityUpdateResponse

type EntityUpdateResponse struct {
	ID         string      `json:"id"`
	Type       string      `json:"type"`
	Data       interface{} `json:"data"`
	ProviderID string      `json:"providerId,omitempty"`
	Status     int         `json:"status"`
	CreatedAt  string      `json:"createdAt"`
	UpdatedAt  string      `json:"updatedAt"`
}

EntityUpdateResponse represents the response for updating an entity

type EntityValidateRequest

type EntityValidateRequest struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"`
}

EntityValidateRequest represents a request to validate entity data

type EntityValidateResponse

type EntityValidateResponse struct {
	Valid bool `json:"valid"`
}

EntityValidateResponse represents the response for validating entity data

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) Create

func (h *Handler) Create(c *gin.Context)

Create handles the request to create an entity

func (*Handler) Delete

func (h *Handler) Delete(c *gin.Context)

Delete handles the request to delete an entity

func (*Handler) Detail

func (h *Handler) Detail(c *gin.Context)

Detail handles the request to get entity details

func (*Handler) Get

func (h *Handler) Get(c *gin.Context)

Get alias for route compatibility

func (*Handler) List

func (h *Handler) List(c *gin.Context)

List handles the request to list entities

func (*Handler) Preview

func (h *Handler) Preview(c *gin.Context)

Preview handles the request to preview an entity

func (*Handler) Update

func (h *Handler) Update(c *gin.Context)

Update handles the request to update an entity

func (*Handler) Validate

func (h *Handler) Validate(c *gin.Context)

Validate handles the request to validate entity data

type OriginalEntitiesListRequest

type OriginalEntitiesListRequest struct {
	Page     int    `form:"page"`
	PageSize int    `form:"pageSize"`
	Type     string `form:"type"`
}

OriginalEntitiesListRequest is the original request type from types.go

type OriginalEntitiesListResponse

type OriginalEntitiesListResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

OriginalEntitiesListResponse is the original response type from types.go

type OriginalEntityCreateRequest

type OriginalEntityCreateRequest struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"`
}

OriginalEntityCreateRequest is the original request type from types.go

type OriginalEntityCreateResponse

type OriginalEntityCreateResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

OriginalEntityCreateResponse is the original response type from types.go

type OriginalEntityDeleteRequest

type OriginalEntityDeleteRequest struct {
	ID string `uri:"id"`
}

OriginalEntityDeleteRequest is the original request type from types.go

type OriginalEntityDeleteResponse

type OriginalEntityDeleteResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

OriginalEntityDeleteResponse is the original response type from types.go

type OriginalEntityDetailRequest

type OriginalEntityDetailRequest struct {
	ID string `uri:"id"`
}

OriginalEntityDetailRequest is the original request type from types.go

type OriginalEntityDetailResponse

type OriginalEntityDetailResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

OriginalEntityDetailResponse is the original response type from types.go

type OriginalEntityFunction

type OriginalEntityFunction struct {
	Id        string `json:"id"`
	Operation string `json:"operation"` // create/read/update/delete/custom
	Name      string `json:"name"`
}

OriginalEntityFunction is the original function type from types.go

type OriginalEntityFunctionsRequest

type OriginalEntityFunctionsRequest struct {
	ID string `uri:"id"`
}

OriginalEntityFunctionsRequest is the original request type from types.go

type OriginalEntityFunctionsResponse

type OriginalEntityFunctionsResponse struct {
	Items []OriginalEntityFunction `json:"items"`
}

OriginalEntityFunctionsResponse is the original response type from types.go

type OriginalEntityPreviewRequest

type OriginalEntityPreviewRequest struct {
	ID string `uri:"id"`
}

OriginalEntityPreviewRequest is the original request type from types.go

type OriginalEntityPreviewResponse

type OriginalEntityPreviewResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

OriginalEntityPreviewResponse is the original response type from types.go

type OriginalEntityUpdateRequest

type OriginalEntityUpdateRequest struct {
	ID   string      `uri:"id"`
	Data interface{} `json:"data"`
}

OriginalEntityUpdateRequest is the original request type from types.go

type OriginalEntityUpdateResponse

type OriginalEntityUpdateResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

OriginalEntityUpdateResponse is the original response type from types.go

type OriginalEntityValidateRequest

type OriginalEntityValidateRequest struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"`
}

OriginalEntityValidateRequest is the original request type from types.go

type OriginalEntityValidateResponse

type OriginalEntityValidateResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

OriginalEntityValidateResponse is the original response type from types.go

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) Create

Create creates a new entity

func (*Service) Delete

Delete deletes an entity

func (*Service) Detail

Detail returns the details of an entity

func (*Service) List

List returns the list of entities

func (*Service) Preview

Preview returns a preview of an entity

func (*Service) Update

Update updates an entity

func (*Service) Validate

Validate validates entity data

Jump to

Keyboard shortcuts

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