Documentation ¶
Index ¶
- Constants
- type Filter
- type FilterOperation
- type Http
- type HttpCookie
- type HttpQuery
- type HttpRequest
- type HttpSession
- type Operation
- type Pagination
- type Payload
- func (p *Payload) SetConfig(config *configuration.Config)
- func (p *Payload) SetDatabase(db *database.Db) error
- func (p *Payload) SetHistoryDb(db *redisdb.RedisDB) error
- func (p *Payload) SetHttp(engine *gin.Engine) error
- func (p *Payload) SetLogsDb(db *redisdb.RedisDB) error
- func (p *Payload) SetPermissionsDb(db *redisdb.RedisDB) error
- func (p *Payload) SetSessionsDb(db *redisdb.RedisDB) error
- func (p *Payload) Start() error
- type Services
- type SessionAuth
- type Sort
- type SortOrder
- type Started
- type TokenClaims
Constants ¶
View Source
const ( DEFAULT_PAGE = 0 DEFAULT_PAGE_SIZE = 20 DEFAULT_PAGE_ALL = false )
View Source
const ( SORT_ASC SortOrder = "asc" SORT_DESC SortOrder = "desc" DEFAULT_SORT_FIELD = "updated_at" DEFAULT_SORT_DIR = SORT_DESC )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterOperation ¶
type FilterOperation string
const ( FILTER_EQ FilterOperation = "eq" FILTER_NE FilterOperation = "ne" FILTER_GT FilterOperation = "gt" FILTER_GTE FilterOperation = "gte" FILTER_LT FilterOperation = "lt" FILTER_LTE FilterOperation = "lte" FILTER_BT FilterOperation = "bt" FILTER_SW FilterOperation = "sw" FILTER_EW FilterOperation = "ew" FILTER_CT FilterOperation = "ct" )
type Http ¶
type Http struct { Engine *gin.Engine Request *HttpRequest // contains filtered or unexported fields }
type HttpCookie ¶
type HttpCookie struct { UserSession *SessionAuth Ttl int // contains filtered or unexported fields }
func NewHttpCookie ¶
func NewHttpCookie(conf *configuration.ConfigCookie, ctx *gin.Context, permissionsDb *redisdb.RedisDB, sessionsDb *redisdb.RedisDB, method string, route string) *HttpCookie
func (*HttpCookie) Parse ¶
func (c *HttpCookie) Parse() error
func (*HttpCookie) SetCookie ¶
func (c *HttpCookie) SetCookie() error
func (*HttpCookie) SetEmptyCookie ¶
func (c *HttpCookie) SetEmptyCookie()
type HttpQuery ¶
type HttpQuery struct { Pagination *Pagination Sort *Sort Filter *Filter Related bool // contains filtered or unexported fields }
func NewHttpQuery ¶
type HttpRequest ¶
type HttpRequest struct { Session *HttpSession Query *HttpQuery ID uint // contains filtered or unexported fields }
func NewRequest ¶
func NewRequest(conf *configuration.Config, ctx *gin.Context, permissionsDb *redisdb.RedisDB, sessionsDb *redisdb.RedisDB) *HttpRequest
func (*HttpRequest) Bind ¶
func (h *HttpRequest) Bind(obj any) error
func (*HttpRequest) Parse ¶
func (h *HttpRequest) Parse() error
type HttpSession ¶
type HttpSession struct { Auth *HttpCookie // contains filtered or unexported fields }
func NewHttpSession ¶
func (*HttpSession) Parse ¶
func (h *HttpSession) Parse() error
type Pagination ¶
type Pagination struct { Page uint PageSize uint All bool // contains filtered or unexported fields }
func NewPagination ¶
func NewPagination(ctx *gin.Context) *Pagination
func (*Pagination) Parse ¶
func (p *Pagination) Parse() error
type Payload ¶
type Payload struct { Config *configuration.Config Services Services Http *Http // contains filtered or unexported fields }
func (*Payload) SetConfig ¶
func (p *Payload) SetConfig(config *configuration.Config)
type SessionAuth ¶
type SessionAuth struct { ID uint UserID uint OrganizationID uint Email string Name string Surname string AvatarUrl string }
func EmptySession ¶
func EmptySession() *SessionAuth
type TokenClaims ¶
type TokenClaims struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.