Documentation ¶
Index ¶
- func Bind[T any](c *gin.Context)
- func GetBoolArg(c *gin.Context, key string) (*bool, error)
- func GetData[T any](c *gin.Context) (*T, error)
- func GetDateTime(layout string, query string) (*int64, error)
- func GetIntArg(c *gin.Context, key string, min int, max int) (*int, error)
- func GetNPerPageValue(c *gin.Context) (int64, error)
- func IsProperObjectIDHex(hex string) error
- func RequireCustomerAuth(conns *mygrpc.GRPCConns) gin.HandlerFunc
- func RequireOwnerAuth(conns *mygrpc.GRPCConns) gin.HandlerFunc
- type AuthHeader
- type CancelRequest
- type Company
- type Customer
- type Employee
- type Order
- type Owner
- type Service
- type User
- type UserUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsProperObjectIDHex ¶
func RequireCustomerAuth ¶
func RequireCustomerAuth(conns *mygrpc.GRPCConns) gin.HandlerFunc
func RequireOwnerAuth ¶
func RequireOwnerAuth(conns *mygrpc.GRPCConns) gin.HandlerFunc
Types ¶
type AuthHeader ¶
type AuthHeader struct {
Auth string `header:"Authorization" binding:"required"`
}
type CancelRequest ¶
type CancelRequest struct {
OrderID string `json:"order_id" binding:"required"`
}
type Company ¶
type Company struct { Name *string `json:"name" binding:"omitempty,max=30"` Type *string `json:"type" binding:"omitempty,max=30"` Localisation *string `json:"localisation" binding:"omitempty,max=60"` ShortDescription *string `json:"short_description" binding:"omitempty,max=150"` LongDescription *string `json:"long_description" binding:"omitempty,max=300"` }
type Employee ¶
type Employee struct { Name *string `json:"name" binding:"omitempty,max=30"` Surname *string `json:"surname" binding:"omitempty,max=30"` WorkTimes *strtime.WorkTimesStr `json:"work_times" binding:"omitempty"` Competence []string `json:"competence" binding:"omitempty"` }
type Owner ¶
Click to show internal directories.
Click to hide internal directories.