Help us shape the future of Go! Take the 2026 Go Developer Survey

redmine

package module
v0.0.0-...-85281d9 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

README

redmine

A go package that can be used to access the Redmine API (v2.2.3)

$ go get github.com/woli/redmine

Usage example:
package main

import (
	"fmt"
	"github.com/woli/redmine"
	"net/http"
)

func main() {
	auth := &redmine.ApiKeyAuth{"<apikey>"}
	s, _ := redmine.New("<baseurl>", auth, http.DefaultClient)

	feed, err := s.Issues.List().Do()
	if err != nil {
		panic(err)
	} else {
		fmt.Printf("TotalCount:%v Limit:%v Offset:%v\n", feed.TotalCount, feed.Limit, feed.Offset)
		for _, issue := range feed.Issues {
			fmt.Printf("%+v\n", issue)
		}
	}
	
	// Example adding an issue
	assignedTo := redmine.Name{
		Id: 1, // Map these to real users
	}
	status := redmine.Name{
		Id: 3, // Resolved
	}
	currentVersion := redmine.Name{
		Id: 1, // some release id
	}
	projectName := redmine.Name{
		Id: 1, // some project id
	}
	author := redmine.Name{
		Id: 1, // some user
	}
	tracker := redmine.Name{
		Id: 2, // feature
	}
	newIssue := redmine.Issue{
		DoneRatio:    100,
		Status:       &status,
		AssignedTo:   &assignedTo,
		Author:       &author,
		Tracker:      &tracker,
		Project:      &projectName,
		FixedVersion: &currentVersion,
		Subject:      "blah test",
		Description:  "blah description",
	}

	customField := redmine.CustomField{
		Id:    3,
		Name:  "FW Version",
		Value: "1234",
	}

	newIssue.CustomFields = append(newIssue.CustomFields, &customField)
	_, _ = s.Issues.Insert(&newIssue).Do()
	
	// Example adding a comment to an issue
	
	
	issue, err := s.Issues.Get(6897).Journals(true).Do()
	if err == nil {
		issue.Notes = "Some new note and comment"
		err = s.Issues.Update(issue).Do()
		if err == nil {
			fmt.Println("this worked")
		}
	}
}

Documentation

Overview

Package redmine provides access to the Redmine API.

See http://www.redmine.org/projects/redmine/wiki/Rest_api

Redmine Version: 2.2.3

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiKeyAuth

type ApiKeyAuth struct {
	ApiKey string
}

func (*ApiKeyAuth) SetAuth

func (a *ApiKeyAuth) SetAuth(req *http.Request)

type Attachment

type Attachment struct {
	Id          int    `json:"id"`
	Description string `json:"description"`
	Filename    string `json:"filename"`
	ContentType string `json:"content_type"`
	Filesize    int    `json:"filesize"`
	ContentUrl  string `json:"content_url"`
	Author      *Name  `json:"author"`
	CreatedOn   string `json:"created_on"`
}

type AttachmentsGetCall

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

func (*AttachmentsGetCall) Do

func (c *AttachmentsGetCall) Do() (*Attachment, error)

type AttachmentsService

type AttachmentsService service

func (*AttachmentsService) Get

func (r *AttachmentsService) Get(attachmentId int) *AttachmentsGetCall

type Authenticator

type Authenticator interface {
	SetAuth(req *http.Request)
}

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

func (*BasicAuth) SetAuth

func (a *BasicAuth) SetAuth(req *http.Request)

type CustomField

type CustomField struct {
	Id    int    `json:"id"`
	Name  string `json:"name"`
	Value string `json:"value"`
}

type DocumentCategoriesListCall

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

func (*DocumentCategoriesListCall) Do

type DocumentCategoriesService

type DocumentCategoriesService service

func (*DocumentCategoriesService) List

type Enumeration

type Enumeration struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	IsDefault bool   `json:"is_default"`
}

type Enumerations

type Enumerations struct {
	DocumentCategories  *DocumentCategoriesService
	IssuePriorities     *IssuePrioritiesService
	TimeEntryActivities *TimeEntryActivitiesService
}

type Group

type Group struct {
	Id           int                `json:"id"`
	Name         string             `json:"name"`
	Users        []*Name            `json:"users"`
	Memberships  []*GroupMembership `json:"memberships"`
	CustomFields []*CustomField     `json:"custom_fields"`
}

type GroupMembership

type GroupMembership struct {
	Id      int     `json:"id"`
	Project *Name   `json:"project"`
	Roles   []*Name `json:"roles"`
}

type GroupsAddUserCall

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

func (*GroupsAddUserCall) Do

func (c *GroupsAddUserCall) Do() error

type GroupsDeleteCall

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

func (*GroupsDeleteCall) Do

func (c *GroupsDeleteCall) Do() error

type GroupsGetCall

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

func (*GroupsGetCall) Do

func (c *GroupsGetCall) Do() (*Group, error)

func (*GroupsGetCall) Memberships

func (c *GroupsGetCall) Memberships(memberships bool) *GroupsGetCall

func (*GroupsGetCall) Users

func (c *GroupsGetCall) Users(users bool) *GroupsGetCall

type GroupsInsertCall

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

func (*GroupsInsertCall) Do

func (c *GroupsInsertCall) Do() (*Group, error)

type GroupsListCall

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

func (*GroupsListCall) Do

func (c *GroupsListCall) Do() ([]*Group, error)

type GroupsRemoveUserCall

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

func (*GroupsRemoveUserCall) Do

func (c *GroupsRemoveUserCall) Do() error

type GroupsService

type GroupsService service

func (*GroupsService) AddUser

func (r *GroupsService) AddUser(groupId, userId int) *GroupsAddUserCall

func (*GroupsService) Delete

func (r *GroupsService) Delete(groupId int) *GroupsDeleteCall

func (*GroupsService) Get

func (r *GroupsService) Get(groupId int) *GroupsGetCall

func (*GroupsService) Insert

func (r *GroupsService) Insert(group *Group) *GroupsInsertCall

func (*GroupsService) List

func (r *GroupsService) List() *GroupsListCall

func (*GroupsService) RemoveUser

func (r *GroupsService) RemoveUser(groupId, userId int) *GroupsRemoveUserCall

func (*GroupsService) Update

func (r *GroupsService) Update(group *Group) *GroupsUpdateCall

type GroupsUpdateCall

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

func (*GroupsUpdateCall) Do

func (c *GroupsUpdateCall) Do() error

type Id

type Id struct {
	Id int `json:"id"`
}

type Issue

type Issue struct {
	Id             int               `json:"id"`
	DoneRatio      int               `json:"done_ratio"`
	Priority       *Name             `json:"priority"`
	Status         *Name             `json:"status"`
	Subject        string            `json:"subject"`
	Notes          string            `json:"notes"`
	FixedVersion   *Name             `json:"fixed_version"`
	UpdatedOn      string            `json:"updated_on"`
	Project        *Name             `json:"project"`
	Tracker        *Name             `json:"tracker"`
	Author         *Name             `json:"author"`
	CreatedOn      string            `json:"created_on"`
	StartDate      string            `json:"start_date"`
	DueDate        string            `json:"due_date"`
	SpentHours     float64           `json:"spent_hours"`
	EstimatedHours float64           `json:"estimated_hours"`
	Parent         *Id               `json:"parent"`
	AssignedTo     *Name             `json:"assigned_to"`
	Description    string            `json:"description"`
	Category       *Name             `json:"category"`
	CustomFields   []*CustomField    `json:"custom_fields"`
	Relations      []*IssueRelation  `json:"relations"`
	Children       []*IssueChild     `json:"children"`
	Attachments    []*Attachment     `json:"attachments"`
	Journals       []*IssueJournal   `json:"journals"`
	Changesets     []*IssueChangeset `json:"changesets"`
}

type IssueCategoriesDeleteCall

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

func (*IssueCategoriesDeleteCall) Do

func (*IssueCategoriesDeleteCall) ReassignTo

type IssueCategoriesGetCall

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

func (*IssueCategoriesGetCall) Do

type IssueCategoriesInsertCall

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

func (*IssueCategoriesInsertCall) Do

type IssueCategoriesListCall

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

func (*IssueCategoriesListCall) Do

type IssueCategoriesService

type IssueCategoriesService service

func (*IssueCategoriesService) Delete

func (r *IssueCategoriesService) Delete(issueCategoryId int) *IssueCategoriesDeleteCall

func (*IssueCategoriesService) Get

func (r *IssueCategoriesService) Get(issueCategoryId int) *IssueCategoriesGetCall

func (*IssueCategoriesService) Insert

func (*IssueCategoriesService) List

func (*IssueCategoriesService) Update

type IssueCategoriesUpdateCall

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

func (*IssueCategoriesUpdateCall) Do

type IssueCategory

type IssueCategory struct {
	Id         int    `json:"id"`
	Name       string `json:"name"`
	Project    *Name  `json:"project"`
	AssignedTo *Name  `json:"assigned_to"`
}

type IssueChangeset

type IssueChangeset struct {
	Comments    string `json:"comments"`
	Revision    string `json:"revision"`
	CommittedOn string `json:"committed_on"`
	User        *Name  `json:"user"`
}

type IssueChild

type IssueChild struct {
	Id      int    `json:"id"`
	Subject string `json:"subject"`
	Tracker *Name  `json:"tracker"`
}

type IssueFeed

type IssueFeed struct {
	Issues     []*Issue `json:"issues"`
	TotalCount int      `json:"total_count"`
	Limit      int      `json:"limit"`
	Offset     int      `json:"offset"`
}

type IssueJournal

type IssueJournal struct {
	Id        int                   `json:"id"`
	User      *Name                 `json:"user"`
	Details   []*IssueJournalDetail `json:"details"`
	Notes     string                `json:"notes"`
	CreatedOn string                `json:"created_on"`
}

type IssueJournalDetail

type IssueJournalDetail struct {
	Name     string `json:"name"`
	Property string `json:"property"`
	NewValue string `json:"new_value"`
}

type IssuePrioritiesListCall

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

func (*IssuePrioritiesListCall) Do

type IssuePrioritiesService

type IssuePrioritiesService service

func (*IssuePrioritiesService) List

type IssueRelation

type IssueRelation struct {
	Id           int    `json:"id"`
	IssueId      int    `json:"issue_id"`
	IssueToId    int    `json:"issue_to_id"`
	RelationType string `json:"relation_type"`
	Delay        Nint   `json:"delay"`
}

type IssueStatus

type IssueStatus struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	IsDefault bool   `json:"is_default"`
	IsClosed  bool   `json:"is_closed"`
}

type IssueStatusesListCall

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

func (*IssueStatusesListCall) Do

func (c *IssueStatusesListCall) Do() ([]*IssueStatus, error)

type IssueStatusesService

type IssueStatusesService service

func (*IssueStatusesService) List

type IssuesDeleteCall

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

func (*IssuesDeleteCall) Do

func (c *IssuesDeleteCall) Do() error

type IssuesGetCall

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

func (*IssuesGetCall) Attachments

func (c *IssuesGetCall) Attachments(attachments bool) *IssuesGetCall

func (*IssuesGetCall) Changesets

func (c *IssuesGetCall) Changesets(changesets bool) *IssuesGetCall

func (*IssuesGetCall) Children

func (c *IssuesGetCall) Children(children bool) *IssuesGetCall

func (*IssuesGetCall) Do

func (c *IssuesGetCall) Do() (*Issue, error)

func (*IssuesGetCall) Journals

func (c *IssuesGetCall) Journals(journals bool) *IssuesGetCall

func (*IssuesGetCall) Relations

func (c *IssuesGetCall) Relations(relations bool) *IssuesGetCall

type IssuesInsertCall

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

func (*IssuesInsertCall) Do

func (c *IssuesInsertCall) Do() (*Issue, error)

type IssuesListCall

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

func (*IssuesListCall) Do

func (c *IssuesListCall) Do() (*IssueFeed, error)

func (*IssuesListCall) Filter

func (c *IssuesListCall) Filter(key, value string) *IssuesListCall

func (*IssuesListCall) Limit

func (c *IssuesListCall) Limit(limit int) *IssuesListCall

func (*IssuesListCall) Offset

func (c *IssuesListCall) Offset(offset int) *IssuesListCall

func (*IssuesListCall) Sort

func (c *IssuesListCall) Sort(sort string) *IssuesListCall

type IssuesService

type IssuesService service

func (*IssuesService) Delete

func (r *IssuesService) Delete(issueId int) *IssuesDeleteCall

func (*IssuesService) Get

func (r *IssuesService) Get(issueId int) *IssuesGetCall

func (*IssuesService) Insert

func (r *IssuesService) Insert(issue *Issue, uploads ...*Upload) *IssuesInsertCall

func (*IssuesService) List

func (r *IssuesService) List() *IssuesListCall

func (*IssuesService) Update

func (r *IssuesService) Update(issue *Issue, uploads ...*Upload) *IssuesUpdateCall

type IssuesUpdateCall

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

func (*IssuesUpdateCall) Do

func (c *IssuesUpdateCall) Do() error

type Membership

type Membership struct {
	Id      int               `json:"id"`
	Project *Name             `json:"project"`
	User    *Name             `json:"user"`
	Group   *Name             `json:"group"`
	Roles   []*MembershipRole `json:"roles"`
}

type MembershipFeed

type MembershipFeed struct {
	Memberships []*Membership `json:"memberships"`
	TotalCount  int           `json:"total_count"`
	Limit       int           `json:"limit"`
	Offset      int           `json:"offset"`
}

type MembershipRole

type MembershipRole struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	Inherited bool   `json:"inherited"`
}

type MembershipsDeleteCall

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

func (*MembershipsDeleteCall) Do

func (c *MembershipsDeleteCall) Do() error

type MembershipsGetCall

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

func (*MembershipsGetCall) Do

func (c *MembershipsGetCall) Do() (*Membership, error)

type MembershipsInsertCall

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

func (*MembershipsInsertCall) Do

type MembershipsListCall

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

func (*MembershipsListCall) Do

func (*MembershipsListCall) Limit

func (c *MembershipsListCall) Limit(limit int) *MembershipsListCall

func (*MembershipsListCall) Offset

func (c *MembershipsListCall) Offset(offset int) *MembershipsListCall

type MembershipsService

type MembershipsService service

func (*MembershipsService) Delete

func (r *MembershipsService) Delete(membershipId int) *MembershipsDeleteCall

func (*MembershipsService) Get

func (r *MembershipsService) Get(membershipId int) *MembershipsGetCall

func (*MembershipsService) Insert

func (r *MembershipsService) Insert(membership *Membership) *MembershipsInsertCall

func (*MembershipsService) List

func (r *MembershipsService) List(projectId int) *MembershipsListCall

func (*MembershipsService) Update

func (r *MembershipsService) Update(membership *Membership) *MembershipsUpdateCall

type MembershipsUpdateCall

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

func (*MembershipsUpdateCall) Do

func (c *MembershipsUpdateCall) Do() error

type Name

type Name struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type News

type News struct {
	Id          int    `json:"id"`
	Title       string `json:"title"`
	Summary     string `json:"summary"`
	Description string `json:"description"`
	Project     *Name  `json:"project"`
	Author      *Name  `json:"author"`
	CreatedOn   string `json:"created_on"`
}

type NewsFeed

type NewsFeed struct {
	News       []*News `json:"news"`
	TotalCount int     `json:"total_count"`
	Limit      int     `json:"limit"`
	Offset     int     `json:"offset"`
}

type NewsListCall

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

func (*NewsListCall) Do

func (c *NewsListCall) Do() (*NewsFeed, error)

func (*NewsListCall) Limit

func (c *NewsListCall) Limit(limit int) *NewsListCall

func (*NewsListCall) Offset

func (c *NewsListCall) Offset(offset int) *NewsListCall

func (*NewsListCall) Project

func (c *NewsListCall) Project(projectId int) *NewsListCall

type NewsService

type NewsService service

func (*NewsService) List

func (r *NewsService) List() *NewsListCall

type Nint

type Nint int

func (*Nint) UnmarshalJSON

func (n *Nint) UnmarshalJSON(b []byte) (err error)

type Project

type Project struct {
	Id              int            `json:"id"`
	Identifier      string         `json:"identifier"`
	Name            string         `json:"name"`
	Description     string         `json:"description"`
	Homepage        string         `json:"homepage"`
	Parent          *Name          `json:"parent"`
	Trackers        []*Name        `json:"trackers"`
	IssueCategories []*Name        `json:"issue_categories"`
	CustomFields    []*CustomField `json:"custom_fields"`
	CreatedOn       string         `json:"created_on"`
	UpdatedOn       string         `json:"updated_on"`
}

type ProjectFeed

type ProjectFeed struct {
	Projects   []*Project `json:"projects"`
	TotalCount int        `json:"total_count"`
	Limit      int        `json:"limit"`
	Offset     int        `json:"offset"`
}

type ProjectsDeleteCall

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

func (*ProjectsDeleteCall) Do

func (c *ProjectsDeleteCall) Do() error

type ProjectsGetCall

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

func (*ProjectsGetCall) Do

func (c *ProjectsGetCall) Do() (*Project, error)

func (*ProjectsGetCall) IssueCategories

func (c *ProjectsGetCall) IssueCategories(issueCategories bool) *ProjectsGetCall

func (*ProjectsGetCall) Trackers

func (c *ProjectsGetCall) Trackers(trackers bool) *ProjectsGetCall

type ProjectsInsertCall

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

func (*ProjectsInsertCall) Do

func (c *ProjectsInsertCall) Do() (*Project, error)

type ProjectsListCall

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

func (*ProjectsListCall) Do

func (c *ProjectsListCall) Do() (*ProjectFeed, error)

func (*ProjectsListCall) Limit

func (c *ProjectsListCall) Limit(limit int) *ProjectsListCall

func (*ProjectsListCall) Offset

func (c *ProjectsListCall) Offset(offset int) *ProjectsListCall

type ProjectsService

type ProjectsService service

func (*ProjectsService) Delete

func (r *ProjectsService) Delete(projectId int) *ProjectsDeleteCall

func (*ProjectsService) Get

func (r *ProjectsService) Get(projectId int) *ProjectsGetCall

func (*ProjectsService) Insert

func (r *ProjectsService) Insert(project *Project) *ProjectsInsertCall

func (*ProjectsService) List

func (r *ProjectsService) List() *ProjectsListCall

func (*ProjectsService) Update

func (r *ProjectsService) Update(project *Project) *ProjectsUpdateCall

type ProjectsUpdateCall

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

func (*ProjectsUpdateCall) Do

func (c *ProjectsUpdateCall) Do() error

type QueriesListCall

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

func (*QueriesListCall) Do

func (c *QueriesListCall) Do() (*QueryFeed, error)

func (*QueriesListCall) Limit

func (c *QueriesListCall) Limit(limit int) *QueriesListCall

func (*QueriesListCall) Offset

func (c *QueriesListCall) Offset(offset int) *QueriesListCall

type QueriesService

type QueriesService service

func (*QueriesService) List

func (r *QueriesService) List() *QueriesListCall

type Query

type Query struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	IsPublic  bool   `json:"is_public"`
	ProjectId int    `json:"project_id"`
}

type QueryFeed

type QueryFeed struct {
	Queries    []*Query `json:"queries"`
	TotalCount int      `json:"total_count"`
	Limit      int      `json:"limit"`
	Offset     int      `json:"offset"`
}

type Relation

type Relation struct {
	Id           int    `json:"id"`
	IssueId      int    `json:"issue_id"`
	IssueToId    int    `json:"issue_to_id"`
	RelationType string `json:"relation_type"`
	Delay        int    `json:"delay"`
}

type RelationsDeleteCall

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

func (*RelationsDeleteCall) Do

func (c *RelationsDeleteCall) Do() error

type RelationsGetCall

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

func (*RelationsGetCall) Do

func (c *RelationsGetCall) Do() (*Relation, error)

type RelationsInsertCall

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

func (*RelationsInsertCall) Do

func (c *RelationsInsertCall) Do() (*Relation, error)

type RelationsListCall

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

func (*RelationsListCall) Do

func (c *RelationsListCall) Do() ([]*Relation, error)

type RelationsService

type RelationsService service

func (*RelationsService) Delete

func (r *RelationsService) Delete(relationId int) *RelationsDeleteCall

func (*RelationsService) Get

func (r *RelationsService) Get(relationId int) *RelationsGetCall

func (*RelationsService) Insert

func (r *RelationsService) Insert(relation *Relation) *RelationsInsertCall

func (*RelationsService) List

func (r *RelationsService) List(issueId int) *RelationsListCall

type Role

type Role struct {
	Id          int      `json:"id"`
	Name        string   `json:"name"`
	Permissions []string `json:"permissions"`
}

type RolesGetCall

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

func (*RolesGetCall) Do

func (c *RolesGetCall) Do() (*Role, error)

type RolesListCall

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

func (*RolesListCall) Do

func (c *RolesListCall) Do() ([]*Role, error)

type RolesService

type RolesService service

func (*RolesService) Get

func (r *RolesService) Get(roleId int) *RolesGetCall

func (*RolesService) List

func (r *RolesService) List() *RolesListCall

type Service

type Service struct {
	Uploads         *UploadsService
	Issues          *IssuesService
	Projects        *ProjectsService
	Memberships     *MembershipsService
	Users           *UsersService
	TimeEntries     *TimeEntriesService
	News            *NewsService
	Relations       *RelationsService
	Versions        *VersionsService
	Wiki            *WikiService
	Queries         *QueriesService
	Attachments     *AttachmentsService
	IssueStatuses   *IssueStatusesService
	Trackers        *TrackersService
	Enumerations    *Enumerations
	IssueCategories *IssueCategoriesService
	Roles           *RolesService
	Groups          *GroupsService
	// contains filtered or unexported fields
}

func New

func New(baseUrl string, auth Authenticator, client *http.Client) (*Service, error)

func (*Service) SwitchUser

func (s *Service) SwitchUser(username string)

type TimeEntriesDeleteCall

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

func (*TimeEntriesDeleteCall) Do

func (c *TimeEntriesDeleteCall) Do() error

type TimeEntriesGetCall

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

func (*TimeEntriesGetCall) Do

func (c *TimeEntriesGetCall) Do() (*TimeEntry, error)

type TimeEntriesInsertCall

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

func (*TimeEntriesInsertCall) Do

type TimeEntriesListCall

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

func (*TimeEntriesListCall) Do

func (*TimeEntriesListCall) Limit

func (c *TimeEntriesListCall) Limit(limit int) *TimeEntriesListCall

func (*TimeEntriesListCall) Offset

func (c *TimeEntriesListCall) Offset(offset int) *TimeEntriesListCall

type TimeEntriesService

type TimeEntriesService service

func (*TimeEntriesService) Delete

func (r *TimeEntriesService) Delete(timeEntryId int) *TimeEntriesDeleteCall

func (*TimeEntriesService) Get

func (r *TimeEntriesService) Get(timeEntryId int) *TimeEntriesGetCall

func (*TimeEntriesService) Insert

func (r *TimeEntriesService) Insert(timeEntry *TimeEntry) *TimeEntriesInsertCall

func (*TimeEntriesService) List

func (*TimeEntriesService) Update

func (r *TimeEntriesService) Update(timeEntry *TimeEntry) *TimeEntriesUpdateCall

type TimeEntriesUpdateCall

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

func (*TimeEntriesUpdateCall) Do

func (c *TimeEntriesUpdateCall) Do() error

type TimeEntry

type TimeEntry struct {
	Id           int            `json:"id"`
	Hours        float64        `json:"hours"`
	Comments     string         `json:"comments"`
	SpentOn      string         `json:"spent_on"`
	Issue        *Name          `json:"issue"`
	Project      *Name          `json:"project"`
	Activity     *Name          `json:"activity"`
	User         *Name          `json:"user"`
	CustomFields []*CustomField `json:"custom_fields"`
	CreatedOn    string         `json:"created_on"`
	UpdatedOn    string         `json:"updated_on"`
}

type TimeEntryActivitiesListCall

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

func (*TimeEntryActivitiesListCall) Do

type TimeEntryActivitiesService

type TimeEntryActivitiesService service

func (*TimeEntryActivitiesService) List

type TimeEntryFeed

type TimeEntryFeed struct {
	TimeEntries []*TimeEntry `json:"time_entries"`
	TotalCount  int          `json:"total_count"`
	Limit       int          `json:"limit"`
	Offset      int          `json:"offset"`
}

type Tracker

type Tracker struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type TrackersListCall

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

func (*TrackersListCall) Do

func (c *TrackersListCall) Do() ([]*Tracker, error)

type TrackersService

type TrackersService service

func (*TrackersService) List

func (r *TrackersService) List() *TrackersListCall

type Upload

type Upload struct {
	Token       string `json:"token,omitempty"`
	Filename    string `json:"filename,omitempty"`
	Description string `json:"description,omitempty"`
	ContentType string `json:"content_type,omitempty"`
}

type UploadsService

type UploadsService service

func (*UploadsService) Upload

func (r *UploadsService) Upload(data []byte) *UploadsUploadCall

type UploadsUploadCall

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

func (*UploadsUploadCall) Do

func (c *UploadsUploadCall) Do() (string, error)

type User

type User struct {
	Id           int               `json:"id"`
	Login        string            `json:"login"`
	Password     string            `json:"password"`
	Firstname    string            `json:"firstname"`
	Lastname     string            `json:"lastname"`
	Name         string            `json:"name"`
	Mail         string            `json:"mail"`
	Memberships  []*UserMembership `json:"memberships"`
	Groups       []*Name           `json:"groups"`
	CustomFields []*CustomField    `json:"custom_fields"`
	CreatedOn    string            `json:"created_on"`
	LastLoginOn  string            `json:"last_login_on"`
}

type UserFeed

type UserFeed struct {
	Users      []*User `json:"users"`
	TotalCount int     `json:"total_count"`
	Limit      int     `json:"limit"`
	Offset     int     `json:"offset"`
}

type UserMembership

type UserMembership struct {
	Project *Name   `json:"project"`
	Roles   []*Name `json:"roles"`
}

type UsersDeleteCall

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

func (*UsersDeleteCall) Do

func (c *UsersDeleteCall) Do() error

type UsersGetCall

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

func (*UsersGetCall) Do

func (c *UsersGetCall) Do() (*User, error)

func (*UsersGetCall) Groups

func (c *UsersGetCall) Groups(groups bool) *UsersGetCall

func (*UsersGetCall) Memberships

func (c *UsersGetCall) Memberships(memberships bool) *UsersGetCall

type UsersInsertCall

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

func (*UsersInsertCall) Do

func (c *UsersInsertCall) Do() (*User, error)

type UsersListCall

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

func (*UsersListCall) Do

func (c *UsersListCall) Do() (*UserFeed, error)

func (*UsersListCall) Limit

func (c *UsersListCall) Limit(limit int) *UsersListCall

func (*UsersListCall) Offset

func (c *UsersListCall) Offset(offset int) *UsersListCall

type UsersService

type UsersService service

func (*UsersService) Delete

func (r *UsersService) Delete(userId int) *UsersDeleteCall

func (*UsersService) Get

func (r *UsersService) Get(userId int) *UsersGetCall

func (*UsersService) Insert

func (r *UsersService) Insert(user *User) *UsersInsertCall

func (*UsersService) List

func (r *UsersService) List() *UsersListCall

func (*UsersService) Update

func (r *UsersService) Update(user *User) *UsersUpdateCall

type UsersUpdateCall

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

func (*UsersUpdateCall) Do

func (c *UsersUpdateCall) Do() error

type Version

type Version struct {
	Id           int            `json:"id"`
	Name         string         `json:"name"`
	Project      *Name          `json:"project"`
	Description  string         `json:"description"`
	Status       string         `json:"status"`
	Sharing      string         `json:"sharing"`
	DueDate      string         `json:"due_date"`
	CustomFields []*CustomField `json:"custom_fields"`
	CreatedOn    string         `json:"created_on"`
	UpdatedOn    string         `json:"updated_on"`
}

type VersionsDeleteCall

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

func (*VersionsDeleteCall) Do

func (c *VersionsDeleteCall) Do() error

type VersionsGetCall

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

func (*VersionsGetCall) Do

func (c *VersionsGetCall) Do() (*Version, error)

type VersionsInsertCall

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

func (*VersionsInsertCall) Do

func (c *VersionsInsertCall) Do() (*Version, error)

type VersionsListCall

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

func (*VersionsListCall) Do

func (c *VersionsListCall) Do() ([]*Version, error)

type VersionsService

type VersionsService service

func (*VersionsService) Delete

func (r *VersionsService) Delete(versionId int) *VersionsDeleteCall

func (*VersionsService) Get

func (r *VersionsService) Get(versionId int) *VersionsGetCall

func (*VersionsService) Insert

func (r *VersionsService) Insert(version *Version) *VersionsInsertCall

func (*VersionsService) List

func (r *VersionsService) List(projectId int) *VersionsListCall

func (*VersionsService) Update

func (r *VersionsService) Update(version *Version) *VersionsUpdateCall

type VersionsUpdateCall

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

func (*VersionsUpdateCall) Do

func (c *VersionsUpdateCall) Do() error

type WikiDeleteCall

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

func (*WikiDeleteCall) Do

func (c *WikiDeleteCall) Do() error

type WikiGetCall

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

func (*WikiGetCall) Attachments

func (c *WikiGetCall) Attachments(attachments bool) *WikiGetCall

func (*WikiGetCall) Do

func (c *WikiGetCall) Do() (*WikiPage, error)

func (*WikiGetCall) Version

func (c *WikiGetCall) Version(version int) *WikiGetCall

type WikiListCall

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

func (*WikiListCall) Do

func (c *WikiListCall) Do() ([]*WikiPage, error)

type WikiPage

type WikiPage struct {
	Title       string        `json:"title"`
	Text        string        `json:"text"`
	Comments    string        `json:"comments"`
	Attachments []*Attachment `json:"attachments"`
	Version     int           `json:"version"`
	Author      *Name         `json:"author"`
	CreatedOn   string        `json:"created_on"`
	UpdatedOn   string        `json:"updated_on"`
}

type WikiService

type WikiService service

func (*WikiService) Delete

func (r *WikiService) Delete(title string, projectId int) *WikiDeleteCall

func (*WikiService) Get

func (r *WikiService) Get(projectId int, title string) *WikiGetCall

func (*WikiService) List

func (r *WikiService) List(projectId int) *WikiListCall

func (*WikiService) Update

func (r *WikiService) Update(wikiPage *WikiPage, projectId int) *WikiUpdateCall

type WikiUpdateCall

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

func (*WikiUpdateCall) Do

func (c *WikiUpdateCall) Do() error

Jump to

Keyboard shortcuts

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