gitlab

package
v0.0.0-...-98ec3a1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GIT

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

TODO: init repo TODO: bind project

func New

func New(config *define.Config) (*GIT, error)

func (*GIT) AddGroupMember

func (g *GIT) AddGroupMember(ctx context.Context, gid, userID int) error

func (*GIT) AddSSHKeyForUser

func (g *GIT) AddSSHKeyForUser(ctx context.Context, userID int, title, key string) error

func (*GIT) CreateFile

func (g *GIT) CreateFile(ctx context.Context, pid int, fullName, content, branch, commit string) error

func (*GIT) CreateGroup

func (g *GIT) CreateGroup(ctx context.Context, name, path string) (*define.Group, error)

func (*GIT) CreateProject

func (g *GIT) CreateProject(ctx context.Context, name string, namespaceID int) (*define.Project, error)

func (*GIT) CreateUser

func (g *GIT) CreateUser(ctx context.Context, email, password, username, name string, skipConfirmation bool) (*define.User, error)

func (*GIT) CreateUserToken

func (g *GIT) CreateUserToken(ctx context.Context, uid int) (string, error)

func (*GIT) DeleteSSHKeyFromUser

func (g *GIT) DeleteSSHKeyFromUser(ctx context.Context, userID, keyID int) error

func (*GIT) GetGroupByID

func (g *GIT) GetGroupByID(ctx context.Context, gid int) (*define.Group, error)

func (*GIT) GetGroupByName

func (g *GIT) GetGroupByName(ctx context.Context, name string) (*define.Group, error)

func (*GIT) GetGroupProjects

func (g *GIT) GetGroupProjects(ctx context.Context, gid interface{}) ([]*define.Project, error)

func (*GIT) GetProjectByID

func (g *GIT) GetProjectByID(ctx context.Context, id int) (*define.Project, error)

func (*GIT) GetProjectByName

func (g *GIT) GetProjectByName(ctx context.Context, name string) (*define.Project, error)

func (*GIT) GetUser

func (g *GIT) GetUser(ctx context.Context, username string) (*define.User, error)

func (*GIT) ListGroup

func (g *GIT) ListGroup(ctx context.Context) ([]*define.Group, error)

func (*GIT) ListSSHKey

func (g *GIT) ListSSHKey(ctx context.Context, userID int) ([]*define.SSHKey, error)

func (*GIT) RemoveGroupMember

func (g *GIT) RemoveGroupMember(ctx context.Context, gid, userID int) error

Jump to

Keyboard shortcuts

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