Documentation ¶
Index ¶
- Constants
- type ErrorResponse
- type Filter
- type Pagination
- func (p *Pagination) GetFilters() []Filter
- func (p *Pagination) GetLimit() int64
- func (p *Pagination) GetNext() string
- func (p *Pagination) GetOffset() int64
- func (p *Pagination) GetOrder() enums.SortOrder
- func (p *Pagination) GetPrev() string
- func (p *Pagination) GetSearch() string
- func (p *Pagination) GetSort() string
- type PaginationConfig
- type UserClaims
Constants ¶
const ContentLanguageKey contextKey = "contentLanguage"
ContentLanguageKey is a context key used to store the content language. It is used to retrieve the content language from the context.
const CountryCodeKey contextKey = "countryCode"
CountryCodeKey is a context key used to store the country code. It is used to retrieve the country code from the context.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Status int `json:"status"` // The HTTP status code of the error response. Message string `json:"message"` // The error message. Errors []string `json:"errors"` // A list of specific error messages. }
ErrorResponse represents an error response returned by the API. @name ErrorResponse @field:status "The HTTP status code of the error response." @field:message "The error message." @field:errors "A list of specific error messages."
type Pagination ¶
type Pagination struct { Offset int64 Limit int64 Search string Sort string Order enums.SortOrder Next string Prev string Filters []Filter }
func (*Pagination) GetFilters ¶
func (p *Pagination) GetFilters() []Filter
func (*Pagination) GetLimit ¶
func (p *Pagination) GetLimit() int64
func (*Pagination) GetNext ¶
func (p *Pagination) GetNext() string
func (*Pagination) GetOffset ¶
func (p *Pagination) GetOffset() int64
func (*Pagination) GetOrder ¶
func (p *Pagination) GetOrder() enums.SortOrder
func (*Pagination) GetPrev ¶
func (p *Pagination) GetPrev() string
func (*Pagination) GetSearch ¶
func (p *Pagination) GetSearch() string
func (*Pagination) GetSort ¶
func (p *Pagination) GetSort() string
type PaginationConfig ¶
type PaginationConfig struct { Pagination *Pagination WithLimit bool }
func NewPaginationConfig ¶
func NewPaginationConfig(pagination *Pagination) *PaginationConfig
type UserClaims ¶
type UserClaims struct { ID string `json:"id"` Name string `json:"name"` LastName string `json:"lastName"` ProfilePicture string `json:"profilePicture"` DepartmentID string `json:"departmentId"` OrganizationID string `json:"organizationId"` Email string `json:"email"` Roles []enums.Role `json:"roles"` IsConfirmed bool `json:"isConfirmed"` IsBlocked bool `json:"isBlocked"` jwt.StandardClaims }
UserClaims represents the claims of a user in the system.
func (*UserClaims) IsAdmin ¶
func (uc *UserClaims) IsAdmin() bool
IsAdmin checks if the user has the admin role.
func (*UserClaims) IsAuthor ¶
func (uc *UserClaims) IsAuthor() bool
IsAuthor checks if the user has the author role.
func (*UserClaims) IsCoordinatorRRHH ¶
func (uc *UserClaims) IsCoordinatorRRHH() bool
IsCoordinatorRRHH checks if the user has the coordinator_rrhh role.
func (*UserClaims) IsDirectorRRHH ¶
func (uc *UserClaims) IsDirectorRRHH() bool
IsDirectorRRHH checks if the user has the director_rrhh role.
func (*UserClaims) IsEditor ¶
func (uc *UserClaims) IsEditor() bool
IsEditor checks if the user has the editor role.
func (*UserClaims) IsUser ¶
func (uc *UserClaims) IsUser() bool
IsUser checks if the user has the user role.