gopagure

package module
v0.0.0-...-fc0aef5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

README

GoPagure

This is a Go API client for Pagure.

View the docs at https://godoc.org/pagure.io/gopagure.git

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Comment       string
	DateCreated   string `json:"date_created"`
	EditedOn      string `json:"edited_on"`
	Editor        User
	ID            int
	Notifications bool
	Parent        Project
	User          User
}

type Issue

type Issue struct {
	Assignee    User
	Blocks      []string
	Comments    []Comment
	Content     string
	DateCreated string `json:"date_created"`
	Depends     []int
	ID          int
	Private     bool
	Status      string
	Tags        []string
	Title       string
	User        User
}

type Pagure

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

func CreateAnonymousInstance

func CreateAnonymousInstance(instanceURL string) (Pagure, error)

CreateAnonymousInstance provides an anonymous session to a Pagure instance

func CreateInstance

func CreateInstance(instanceURL string, project string, apikey string) (Pagure, error)

CreateInstance provides an authenitcated session to a Pagure instance, for a particular project

func (*Pagure) IssueComment

func (p *Pagure) IssueComment(issue int, comment string) error

IssueComment comments on the issue

func (*Pagure) IssueCommentInfo

func (p *Pagure) IssueCommentInfo(issue int, comment int) (Comment, error)

func (*Pagure) IssueCreate

func (p *Pagure) IssueCreate(title string, content string, private bool) error

IssueCreate opens a new issue for on this project session, on the pagure instance

func (*Pagure) IssueInfo

func (p *Pagure) IssueInfo(issue int) (Issue, error)

func (*Pagure) IssueList

func (p *Pagure) IssueList(status string,
	tags string,
	assignee string,
	author string) ([]Issue, error)

IssueList fetches the issues for this project session, on the pagure instance. - `status` is the status of the issue (string can be empty) - `tags` for issue groups (string can be empty) - `assignee` is who issue is assigned to (string can be empty) - `author` of the issue (string can be empty)

func (*Pagure) ProjectCreate

func (p *Pagure) ProjectCreate(projectname string,
	description string,
	namespace string,
	url string,
	avatarEmail string,
	createReadme bool) error

ProjectCreate establishes a new project on the pagure instance

func (*Pagure) ProjectList

func (p *Pagure) ProjectList(tags string,
	pattern string,
	username string,
	fork bool) ([]Project, error)

ProjectList fetches projects from the pagure instance that match provided criteria. - `tags` is the git tag (string can be empty) - `pattern` is the project name pattern (string can be empty) - `username` is the user that owns the proejct (string can be empty) - `fork` is whether to include forks of original projects in the list

func (*Pagure) ProjectListTags

func (p *Pagure) ProjectListTags() ([]string, error)

ProjectListTags fetches the tags/releases for the project

func (*Pagure) PullRequestClose

func (p *Pagure) PullRequestClose(id int) error

func (*Pagure) PullRequestComment

func (p *Pagure) PullRequestComment(id int,
	comment string,
	commit string,
	filename string,
	row int,
	treeID string) error

func (*Pagure) PullRequestFlag

func (p *Pagure) PullRequestFlag(id int,
	username string,
	percent int,
	comment string,
	url string,
	uid string,
	commit string) error

func (*Pagure) PullRequestInfo

func (p *Pagure) PullRequestInfo(id int) (PullRequest, error)

func (*Pagure) PullRequestList

func (p *Pagure) PullRequestList(status string,
	assignee string,
	author string) ([]PullRequest, error)

func (*Pagure) PullRequestMerge

func (p *Pagure) PullRequestMerge(id int) error

func (*Pagure) UserInfo

func (p *Pagure) UserInfo(username string) (UserInfo, error)

UserInfo fetches the information on the provided username

func (*Pagure) UserList

func (p *Pagure) UserList(pattern string) ([]string, error)

UserList fetches the of users that matches the provided pattern

func (*Pagure) UserListGroups

func (p *Pagure) UserListGroups(pattern string) ([]string, error)

UserListGroups fetches the groups that match the provided pattern

type PagureError

type PagureError struct {
	Internal bool
	What     string
}

func (*PagureError) Error

func (e *PagureError) Error() string

Error reports the error message (and satisfies the error interface)

type Project

type Project struct {
	DateCreated string `json:"date_created"`
	Description string
	ID          int
	Name        string
	Parent      *Project
	User        User
}

type PullRequest

type PullRequest struct {
	Assignee    User
	Branch      string
	BranchFrom  string `json:"branch_from"`
	ClosedAt    string `json:"closed_at"`
	ClosedBy    User   `json:"closed_by"`
	Comments    []Comment
	CommitStart string `json:"commit_start"`
	CommitStop  string `json:"commit_stop"`
	DateCreated string `json:"date_created"`
	ID          int
	Project     Project
	RepoFrom    Project `json:"repo_from"`
	Status      string
	Title       string
	UID         string
	UpdatedOn   string `json:"updated_on"`
	User        User
}

type User

type User struct {
	Fullname string
	Name     string
}

type UserInfo

type UserInfo struct {
	Forks []Project
	Repos []Project
	User  User
}

Directories

Path Synopsis
Package gopagure/webhooks provides helper functions for parsing Pagure webhook requests.
Package gopagure/webhooks provides helper functions for parsing Pagure webhook requests.

Jump to

Keyboard shortcuts

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