controllers

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPageSize    = 0
	DefaultCurrentPage = 1
)

TODO: Migrate To Environment / ConfigFile / DataBase

Variables

This section is empty.

Functions

func FillBasicUserLoginInfo

func FillBasicUserLoginInfo(user *foundation.User) error

func FillFullRequest

func FillFullRequest(request *services.ServiceRequest) error

func FillParams

func FillParams(c *gin.Context, request *services.ServiceRequest) error

func GetResponseError

func GetResponseError(c *gin.Context, err error) error

func NewFoundationBaseRequestFromServiceRequest

func NewFoundationBaseRequestFromServiceRequest(request *services.ServiceRequest) (*foundation.BaseRequest, error)

func NewResponse

func NewResponse(c *gin.Context, response foundation.BaseResponse)

func NewResponseWithError

func NewResponseWithError(c *gin.Context, code int, err string)

func NewResponseWithErrorResponse

func NewResponseWithErrorResponse(c *gin.Context, response foundation.BaseResponse)

func NewResponseWithHttpError

func NewResponseWithHttpError(c *gin.Context, httpError *HttpError)

func NewResponseWithModel

func NewResponseWithModel(c *gin.Context, model interface{})

func NewResponseWithModelAndError

func NewResponseWithModelAndError(c *gin.Context, model interface{}, error string)

func NewResponseWithStr

func NewResponseWithStr(c *gin.Context, response string)

func ParseModel

func ParseModel(c *gin.Context, model interface{}) error

Types

type CheckedAllDirector

type CheckedAllDirector struct {
	SelectedRows   []*primitive.ObjectID `json:"selectedRows"`
	UnselectedRows []*primitive.ObjectID `json:"unselectedRows"`
	CheckedAll     bool                  `json:"checkedAll"`
}

type ControllerRequest

type ControllerRequest struct {
	Order       map[string]interface{}
	SearchTerms []string
}

func (*ControllerRequest) ToRaw

func (m *ControllerRequest) ToRaw() []byte

type HttpError

type HttpError struct {
	Code    int
	Message string
}

func GetBasicRequestAndCheckIntegrity

func GetBasicRequestAndCheckIntegrity(c *gin.Context, model interface{}) (*services.ServiceRequest, *HttpError)

func GetBasicStaffRequestAndCheckIntegrity

func GetBasicStaffRequestAndCheckIntegrity(c *gin.Context, model interface{}) (*services.ServiceRequest, *HttpError)

func ManageModels

func ManageModels(c *gin.Context, request *services.ServiceRequest) *HttpError

func NewFoundationRequestFromContextAndModel

func NewFoundationRequestFromContextAndModel(c *gin.Context, model foundation.RepositoryModel) (*foundation.BaseRequest, *HttpError)

func NewHttpError

func NewHttpError(code int, message string) *HttpError

Jump to

Keyboard shortcuts

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