Documentation ¶
Index ¶
Constants ¶
View Source
const ( XRHIDENTITY = "x-rh-identity" LAST_VISITED_MAX = 10 IDENTITY_CTX_KEY = "identity" USER_CTX_KEY = "user" GET_ALL_PARAM = "getAll" // Used for searching ALL favorited pages DEFAULT_PARAM = "archived" // Used as default value for active favorited pages FAVORITE_PARAM = "favorite" )
View Source
const ProjectName = "chrome-service-backend"
Variables ¶
View Source
var ( ErrNotAuthorized = errors.New("not authorized") BaseTemplates models.BaseTemplates = models.BaseTemplates{ "landingPage": models.BaseDashboardTemplate{ Name: "landingPage", DisplayName: "Landing Page", TemplateConfig: models.TemplateConfig{ Sm: convertToJson(landingPageSm), Md: convertToJson(landingPageMd), Lg: convertToJson(landingPageLg), Xl: convertToJson(landingPageXl), }, }, } )
Functions ¶
Types ¶
type DecodedToken ¶
type DecodedToken struct { UserId string `json:"user_id"` OrgId string `json:"org_id"` AccountNumber string `json:"account_number"` }
func ParseJWTToken ¶
func ParseJWTToken(tokenString string) (DecodedToken, error)
Adaptation of chrome UI token parsing as we can't yse the JWT decode, because we do not have the decode key
type EntityResponse ¶
type EntityResponse[T interface{}] struct {
Data T `json:"data"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Errors []string `json:"errors"`
}
type ListResponse ¶
type ListResponse[T interface{}] struct { Data []T `json:"data"` Meta ListMeta `json:"meta"` }
Click to show internal directories.
Click to hide internal directories.