gitlab

package
v0.12.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const BrandColor = "#fc6d26" // https://brandcolors.net/b/gitlab

BrandColor represents GitLab color

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Title                  string
	Description            string
	AuthorName             string
	AuthorAvatarURL        string
	AvatarURL              string
	CanTruncateDescription bool
	FooterTitle            string
	FooterURL              string
	FooterTime             *time.Time
	Color                  string
}

Page represents info of GitLab page

func (*Page) FormatFooter added in v0.6.0

func (p *Page) FormatFooter() string

FormatFooter returns formatted footer for slack

type URLParser

type URLParser struct {
	// contains filtered or unexported fields
}

URLParser represents GitLab URL parser

func NewGitlabURLParser

func NewGitlabURLParser(params *URLParserParams) (*URLParser, error)

NewGitlabURLParser create new URLParser instance

func (*URLParser) FetchURL

func (p *URLParser) FetchURL(url string) (*Page, error)

FetchURL fetch GitLab url

type URLParserParams

type URLParserParams struct {
	APIEndpoint     string
	BaseURL         string
	PrivateToken    string
	GitPandaVersion string
	IsDebugLogging  bool
	HTTPClient      *http.Client
}

URLParserParams represents parameters of NewGitlabURLParser

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL