gitlab

package
v0.0.0-...-77082db Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SearchResultsPerPage = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigReader

type ConfigReader interface {
	ReadToken() string
	ReadUrl() string
}

type GitLab

type GitLab struct {
	Config ConfigReader
}

func (GitLab) BrowseFileUrl

func (receiver GitLab) BrowseFileUrl(repositoryUrl string, branchName string, filePath string) string

func (GitLab) DownloadFileUrl

func (receiver GitLab) DownloadFileUrl(projectId int, filePath string, ref string) string

func (GitLab) GetProject

func (receiver GitLab) GetProject(projectId int) (ProjectResult, error)

func (GitLab) GetProjectRepositoryBranches

func (receiver GitLab) GetProjectRepositoryBranches(projectId int, branch string) (ProjectRepositoryBranch, error)

func (GitLab) GetSpec

func (receiver GitLab) GetSpec(specUrl string) (OpenAPISpec, error)

func (GitLab) Search

func (receiver GitLab) Search() ([]SearchQueryResult, error)

type InfoSpec

type InfoSpec struct {
	Title       string `yaml:"title"`
	Description string `yaml:"description"`
}

type OpenAPISpec

type OpenAPISpec struct {
	OpenAPIVersion string   `yaml:"openapi"`
	Info           InfoSpec `yaml:"info"`
}

type ProjectRepositoryBranch

type ProjectRepositoryBranch struct {
	Commit ProjectRepositoryBranchCommit `json:"commit"`
}

type ProjectRepositoryBranchCommit

type ProjectRepositoryBranchCommit struct {
	Id string `json:"id"`
}

type ProjectResult

type ProjectResult struct {
	WebUrl            string `json:"web_url"`
	DefaultBranch     string `json:"default_branch"`
	NameWithNamespace string `json:"name_with_namespace"`
	Visibility        string `json:"visibility"`
}

type SearchQueryResult

type SearchQueryResult struct {
	Basename  string `json:"basename"`
	Data      string `json:"data"`
	Path      string `json:"path"`
	FileName  string `json:"filename"`
	Id        string `json:"id"`
	Ref       string `json:"ref"`
	StartLine int    `json:"startline"`
	ProjectId int    `json:"project_id"`
}

Jump to

Keyboard shortcuts

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