redmine

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentDownload

type AttachmentDownload struct {
	Reader      io.Reader
	Name        string
	Caption     string
	ContentType string
}

type AttachmentUpload

type AttachmentUpload rdmn.AttachmentUploadObject

type IssueCreateData

type IssueCreateData struct {
	ProjectID   int64
	TrackerID   int64
	PriorityID  int64
	Subject     string
	Description string
	IsPrivate   bool
	Attachments []AttachmentUpload
}

type IssueUpdateData

type IssueUpdateData struct {
	Notes       string
	Attachments []AttachmentUpload
}

type Priority

type Priority struct {
	ID        int64             `json:"id"`
	Name      map[string]string `json:"name"`
	IsDefault bool              `json:"is_default"`
}

type Project

type Project struct {
	ID       int64
	Name     string
	Trackers []misc.IDName
}

type Redmine

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

Redmine it is a module context structure

func Init

func Init(host, key string) Redmine

Init initiates context to interact with Redmine

func (*Redmine) AttachmensUpload

func (r *Redmine) AttachmensUpload(userID int64, uploads []UploadData) ([]AttachmentUpload, error)

func (*Redmine) AttachmentsDownload

func (r *Redmine) AttachmentsDownload(downloads []int64) ([]AttachmentDownload, error)

func (*Redmine) IssueCreate

func (r *Redmine) IssueCreate(userID int64, issue IssueCreateData) (int64, error)

IssueCreate creates new issue in Redmine. New issue ID will be returned

func (*Redmine) IssueURL

func (r *Redmine) IssueURL(issueID int64) string

func (*Redmine) IssueUpdate

func (r *Redmine) IssueUpdate(userID, issueID int64, d IssueUpdateData) error

func (*Redmine) PrioritiesGet

func (r *Redmine) PrioritiesGet() ([]Priority, error)

PrioritiesGet gets active issue priorities from nxs-chat-redmine plugin (additional API method)

func (*Redmine) ProjectGetByIdentifier

func (r *Redmine) ProjectGetByIdentifier(identifier string) (Project, error)

func (*Redmine) ProjectsGet

func (r *Redmine) ProjectsGet() (map[int64]Project, error)

ProjectsGet gets all active project

func (*Redmine) UserAuthCheck

func (r *Redmine) UserAuthCheck(key string) (int64, error)

UserAuthCheck checks Redmine API key correct. Function returns User ID on success.

func (*Redmine) UserMembershipsGet

func (r *Redmine) UserMembershipsGet(id int64) ([]misc.IDName, error)

func (*Redmine) UsersGet

func (r *Redmine) UsersGet() (map[int64]User, error)

type UploadData

type UploadData struct {
	File io.Reader
	Name string
}

type User

type User struct {
	ID        int64
	Login     string
	FirstName string
	LastName  string
}

Jump to

Keyboard shortcuts

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