Documentation
¶
Index ¶
- func TransformSidebar(c *gin.Context, cfg conf.Config, source *html.Node, fromFile bool) ([]byte, error)
- type ActiveRoutes
- type AdminMode
- type ContextSwitcherLink
- type CreateNewMenuGroup
- type CreateNewMenuGroupItem
- type CurrentContext
- type CurrentMenuItem
- type CurrentMenuItemItem
- type FluffyExtraAttrs
- type GitlabSidebar
- type GitlabVersion
- type MergeRequestMenu
- type MergeRequestMenuItem
- type PurpleExtraAttrs
- type Search
- type SearchContext
- type Settings
- type ShortcutLink
- type Status
- type TabMenu
- type UserCounts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActiveRoutes ¶
type ActiveRoutes struct {
Controller string `json:"controller"`
}
type ContextSwitcherLink ¶
type CreateNewMenuGroup ¶
type CreateNewMenuGroup struct { Items []CreateNewMenuGroupItem `json:"items"` Name string `json:"name"` }
type CreateNewMenuGroupItem ¶
type CreateNewMenuGroupItem struct { Component interface{} `json:"component"` ExtraAttrs PurpleExtraAttrs `json:"extraAttrs"` Href string `json:"href"` Text string `json:"text"` }
type CurrentContext ¶
type CurrentContext struct { }
type CurrentMenuItem ¶
type CurrentMenuItem struct { ActiveRoutes *ActiveRoutes `json:"active_routes,omitempty"` Avatar interface{} `json:"avatar"` EntityID interface{} `json:"entity_id"` Icon string `json:"icon"` ID string `json:"id"` Link string `json:"link"` LinkClasses interface{} `json:"link_classes"` PillCount interface{} `json:"pill_count"` Title string `json:"title"` AvatarShape string `json:"avatar_shape,omitempty"` IsActive bool `json:"is_active,omitempty"` Items []CurrentMenuItemItem `json:"items,omitempty"` Separated bool `json:"separated,omitempty"` }
func BuildSidebarMenuFromFile ¶
func BuildSidebarMenuFromFile(c *gin.Context, cfg conf.Config) []CurrentMenuItem
func BuildSidebarMenuFromStruct ¶
func BuildSidebarMenuFromStruct(c *gin.Context, cfg conf.Config) []CurrentMenuItem
type CurrentMenuItemItem ¶
type CurrentMenuItemItem struct { Avatar interface{} `json:"avatar"` AvatarShape string `json:"avatar_shape,omitempty"` EntityID interface{} `json:"entity_id"` Icon interface{} `json:"icon"` ID string `json:"id"` IsActive bool `json:"is_active"` Link string `json:"link"` LinkClasses interface{} `json:"link_classes"` PillCount *int `json:"pill_count"` Title string `json:"title"` }
type FluffyExtraAttrs ¶
type GitlabSidebar ¶
type GitlabSidebar struct { AdminMode AdminMode `json:"admin_mode"` AdminURL string `json:"admin_url"` AvatarURL string `json:"avatar_url"` CanSignOut bool `json:"can_sign_out"` CanaryToggleCOMURL string `json:"canary_toggle_com_url"` ContextSwitcherLinks []ContextSwitcherLink `json:"context_switcher_links"` CreateNewMenuGroups []CreateNewMenuGroup `json:"create_new_menu_groups"` CurrentContext CurrentContext `json:"current_context"` CurrentContextHeader string `json:"current_context_header"` CurrentMenuItems []CurrentMenuItem `json:"current_menu_items"` DisplayWhatsNew bool `json:"display_whats_new"` GitlabCOMAndCanary bool `json:"gitlab_com_and_canary"` GitlabCOMButNotCanary bool `json:"gitlab_com_but_not_canary"` GitlabVersion GitlabVersion `json:"gitlab_version"` GitlabVersionCheck interface{} `json:"gitlab_version_check"` GroupsPath string `json:"groups_path"` HasLinkToProfile bool `json:"has_link_to_profile"` IsAdmin bool `json:"is_admin"` IsImpersonating bool `json:"is_impersonating"` IsLoggedIn bool `json:"is_logged_in"` IssuesDashboardPath string `json:"issues_dashboard_path"` LinkToProfile string `json:"link_to_profile"` LogoURL interface{} `json:"logo_url"` MergeRequestMenu []MergeRequestMenu `json:"merge_request_menu"` Name string `json:"name"` PanelType string `json:"panel_type"` PinnedItems []interface{} `json:"pinned_items"` ProjectsPath string `json:"projects_path"` Search Search `json:"search"` Settings Settings `json:"settings"` ShortcutLinks []ShortcutLink `json:"shortcut_links"` ShowVersionCheck bool `json:"show_version_check"` SignOutLink string `json:"sign_out_link"` Status Status `json:"status"` StopImpersonationPath string `json:"stop_impersonation_path"` SupportPath string `json:"support_path"` TodosDashboardPath string `json:"todos_dashboard_path"` TrackVisitsPath string `json:"track_visits_path"` UpdatePinsURL string `json:"update_pins_url"` UserCounts UserCounts `json:"user_counts"` Username string `json:"username"` WhatsNewMostRecentReleaseItemsCount int64 `json:"whats_new_most_recent_release_items_count"` WhatsNewVersionDigest string `json:"whats_new_version_digest"` }
type GitlabVersion ¶
type MergeRequestMenu ¶
type MergeRequestMenu struct { Items []MergeRequestMenuItem `json:"items"` Name string `json:"name"` }
type MergeRequestMenuItem ¶
type MergeRequestMenuItem struct { Count int64 `json:"count"` ExtraAttrs FluffyExtraAttrs `json:"extraAttrs"` Href string `json:"href"` Text string `json:"text"` UserCount string `json:"userCount"` }
type PurpleExtraAttrs ¶
type Search ¶
type Search struct { AutocompletePath string `json:"autocomplete_path"` IssuesPath string `json:"issues_path"` MrPath string `json:"mr_path"` SearchContext SearchContext `json:"search_context"` SearchPath string `json:"search_path"` }
type SearchContext ¶
type SearchContext struct {
ForSnippets interface{} `json:"for_snippets"`
}
type ShortcutLink ¶
type Status ¶
type Status struct { Availability string `json:"availability"` Busy interface{} `json:"busy"` CanUpdate bool `json:"can_update"` ClearAfter interface{} `json:"clear_after"` Customized interface{} `json:"customized"` Emoji interface{} `json:"emoji"` Message interface{} `json:"message"` MessageHTML interface{} `json:"message_html"` }
Click to show internal directories.
Click to hide internal directories.