gitlab

package
v0.0.0-...-026089d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PullMethodHTTP = "http"
	PullMethodSSH  = "ssh"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(gitlabUrl string, gitlabToken string, p GitlabClientParam) (*gitlabClient, error)

Types

type GitlabClientParam

type GitlabClientParam struct {
	PullMethod         string
	IncludeCurrentUser bool
}

type GitlabFetcher

type GitlabFetcher interface {
	GroupFetcher
	UserFetcher
}

type Group

type Group struct {
	ID   int
	Name string
	// contains filtered or unexported fields
}

func NewGroupFromGitlabGroup

func NewGroupFromGitlabGroup(group *gitlab.Group) Group

func (*Group) InvalidateCache

func (g *Group) InvalidateCache()

type GroupContent

type GroupContent struct {
	Groups   map[string]*Group
	Projects map[string]*Project
}

type GroupFetcher

type GroupFetcher interface {
	FetchGroup(gid int) (*Group, error)
	FetchGroupContent(group *Group) (*GroupContent, error)
}

type Project

type Project struct {
	ID            int
	Name          string
	CloneURL      string
	DefaultBranch string
}

type Refresher

type Refresher interface {
	InvalidateCache()
}

type User

type User struct {
	ID   int
	Name string
	// contains filtered or unexported fields
}

func NewUserFromGitlabUser

func NewUserFromGitlabUser(user *gitlab.User) User

func (*User) InvalidateCache

func (u *User) InvalidateCache()

type UserContent

type UserContent struct {
	Projects map[string]*Project
}

type UserFetcher

type UserFetcher interface {
	FetchUser(uid int) (*User, error)
	FetchCurrentUser() (*User, error)
	FetchUserContent(user *User) (*UserContent, error)
}

Jump to

Keyboard shortcuts

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