taigo

package module
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 18 Imported by: 0

README

TAIGO

Go GoDoc Go Report Card Taigo Banner

Description

Taigo is a driver written in GO for Taiga targeting to implement all publicly available API v1 endpoints.
Taiga is an Agile, Free and Open Source Project Management Tool.

Should you have any ideas or recommendations, feel free to report it as an issue or open a pull request.

For the most recent changes, see CHANGELOG.

Known Limitations

  • Some model members holding integers (i.e. backlog_order) were implemented using int instead of int64 or rather uint64 in some cases which results in runtime errors on machines with 32-bit arm CPUs.

Integration

Download Taigo:

go get github.com/theriverman/taigo

Import it into your project:

import (
    taiga "github.com/theriverman/taigo"
)

Documentation

Documentation is located at pkg.go.dev/Taigo.

Architecture

To use Taigo, you must instantiate a *Client, and authenticate against Taiga to either get a new token or validate the one given. To authenticate, use one of the following methods:

  • client.AuthByCredentials
  • client.AuthByToken

All Taiga objects, such as, Epic, User Story, Issue, Task, Sprint, etc.. are represented as a struct.

Meta System

Since the API endpoints of Taiga return various payloads for the same object types, a meta system has been added to simplify the interaction with the Taigo APIs.

For example, in Taiga the http://localhost:8000/api/v1/userstories endpoint can return the following payload types:

  • User story detail
  • User story detail (GET)
  • User story detail (LIST)

The returned payload type depends on the executed action: list, create, edit, get, etc..

Since Go does not support generics and casting between different types is not a trivial operation, a generic type has been introduced in Taigo for each implemented basic object type (Epic, Milestone, UserStory, Task, etc..) found in Taiga.

These generic types come with meta fields (pointers) to the originally returned payload. In case you need access to a field not represented in the generic type provided by Taigo, you can use the appropriate meta field.

For example, struct Epic has the following meta fields:

type Epic struct {
    ID                int
    // ...
    EpicDetail        *EpicDetail
    EpicDetailGET     *EpicDetailGET
    EpicDetailLIST    *EpicDetailLIST
}

The available meta field is always stated in the operation's docstring as Available Meta, for example:

// CreateEpic => https://taigaio.github.io/taiga-doc/dist/api.html#epics-create
//
// Available Meta: *EpicDetail
func (s *EpicService) Create(epic Epic) (*Epic, error) {}

Docs-As-Code ( godoc / docstrings )

To avoid creating and maintaining a redundant API documentation for each covered Taiga API resource, the API behaviours and fields are not documented in Taigo. Instead, the docstring comment provides a direct URL to each appropriate online resource.
Example:

// CreateEpic => https://taigaio.github.io/taiga-doc/dist/api.html#epics-create
func (s *EpicService) Create(epic Epic) (*Epic, error) {}

Upon opening that link, you can find out what fields are available through *Epic:

  • project (required): project id
  • subject (required)

To find out which operation requires what fields and what they return, always refer to the official Taiga REST API documentation.

Pagination

It is rarely useful to receive results paginated in a driver like Taigo, so pagination is disabled by default.

To enable pagination (for all future requests) set Client.DisablePagination to false:

// Enable pagination (disabled by default)
client.DisablePagination(false)

If you enable pagination, you can collect pagination details by accessing the returned *http.Response,
and extracting the relevant headers into a taigo.Pagination struct the following way:

// Collect returned Pagination headers
p := Pagination{}
p.LoadFromHeaders(client, response)

Note: See type Pagination struct in TAIGO/common.models.go for more details.

For details on Taiga's pagination, see Taiga REST API / Pagination.

Usage

Client Instantiation

package main

import (
  "fmt"
  "net/http"

  taiga "github.com/theriverman/taigo"
)
func main() {
	// Create client
	client := taiga.Client{
		BaseURL:    "https://api.taiga.io",
		HTTPClient: &http.Client{},
	}
	
	// Authenticate (get/set Token)
	if err := client.AuthByCredentials(&taiga.Credentials{
		Type:     "normal",
		Username: "admin",
		Password: "123123",
	}); err != nil {
		panic(err)
	}

	// Get /users/me
	me, _ := client.User.Me()
	fmt.Println("Me: (ID, Username, FullName)", me.ID, me.Username, me.FullName)

  	// Get Project (by its slug)
	slug := "therivermantaigo-taigo-public-test"
	fmt.Printf("Getting Project (slug=%s)..\n", slug)
	project, err := client.Project.GetBySlug(slug)
	if err != nil {
		fmt.Println(err)
	}
	fmt.Printf("Project name: %s \n\n", project.Name)
}

Basic Operations

// get all projects (no filtering, no ordering)
projectsList, _ := client.Project.List(nil)
for _, proj := range *projectsList {
    fmt.Println("Project ID:", proj.ID, "Project Name:", proj.Name)
}
/*
  ListProjects accepts a `*ProjectsQueryParameters` as an argument, but if you don't need any filtering, you can pass in a nil.
*/

// get all projects for user ID 1337
queryParams := taiga.Project.QueryParameters{
    Member: 1337,
}
queryParams.TotalFansLastMonth() // results are ordered by TotalFansLastMonth
projectsList, _ := client.Project.List(&queryParams)
for _, proj := range *projectsList {
    fmt.Println("Project ID:", proj.ID, "Project Name:", proj.Name)
}

// upload a file (Create an Epic attachment)
newAttachment, err := client.Epic.CreateAttachment(&taiga.Attachment{ObjectID: 1337, Project: 7331}, "C:/Users/theriverman/Pictures/nghfb.jpg")

Non-Standard Operations (Non-Standard)

  1. Clone Epic (with UserStories) -- To be implemented
  2. Clone Epic (without UserStories) -- ✔ Implemented
  3. Clone UserStory (with sub-tasks) -- To be implemented
  4. Clone UserStory (without sub-tasks) -- ✔ Implemented
  5. Clone Sub-Task -- To be implemented
  6. Copy UserStory to another project [will lose comments and attachments] -- To be implemented

Advanced Operations

Do you need access to a non yet implemented or special API endpoint? No problem!
It is possible to make requests to custom API endpoints by leveraging *RequestService.

HTTP operations (GET, POST, etc..) should be executed through RequestService which provides a managed environment for communicating with Taiga.

For example, let's try accessing the epic-custom-attributes endpoint:

First, a model struct must be created to represent the data returned by the endpoint. Refer to the official Taiga API documentation for response examples:

// EpicCustomAttributeDetail -> https://taigaio.github.io/taiga-doc/dist/api.html#object-epic-custom-attribute-detail
// Converted via https://mholt.github.io/json-to-go/
type EpicCustomAttributeDetail struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	Project      int         `json:"project"`
	Type         string      `json:"type"`
}

Then initialise an instance which is going to store the response:

epicCustomAttributes := []EpicCustomAttributeDetail{}

Using client.MakeURL the absolute URL endpoint is built for the request.
Using client.Request.Get an HTTP GET request is sent to the API endpoint URL.
The client.Request.Get call must receive a URL and a pointer to the model struct:

// Final URL should be https://api.taiga.io/api/v1/epic-custom-attributes
resp, err := client.Request.Get(client.MakeURL("epic-custom-attributes"), &epicCustomAttributes)
if err != nil {
	fmt.Println(err)
	fmt.Println(resp)
} else {
	fmt.Println("The following Epic Custom Attributes have been returned:")
	fmt.Println("--------------------------------------------------------")
	for i := 0; i < 3; i++ {
		ca := epicCustomAttributes[i]
		fmt.Println("  * ", ca.ID, ca.Name)
	}
}

Note: Such raw requests return (*http.Response, error).

<Taiga Object> Custom Attributes

The custom attribute of various Taiga objects are made of two major corner stones:

  • Field Definitions
  • Field Values

Field Definitions internally connect a field's name to an ID (int).
Requesting http://localhost:8000/api/v1/epic-custom-attributes/14 results in something like this:

{
    "created_date": "2020-07-02T11:57:22.124Z",
    "description": "nesciunt consectetur culpa ullam harum fugit veritatis eius dolorem assumenda",
    "extra": null,
    "id": 14,
    "modified_date": "2020-07-03T08:40:34.667Z",
    "name": "Duration 1",
    "order": 1,
    "project": 3,
    "type": "url"
}

Field Values internally connect the user-provided unique values to the internal IDs.
Requesting http://localhost:8000/api/v1/epics/custom-attributes-values/15 results in something like this:

{
    "attributes_values": {
        "14": "240 min"
    },
    "epic": 15,
    "version": 2
}

Observe that Duration 1 has ID 14 in the declaration and that's used as the field's name.

If you request the custom field values of a Taiga object, the values will be returned in a map[string]interface{} style by default.

You have the option to manually declare the expected custom attribute fields and types in advance, and use your custom struct for serializing the returned values.

For example here's the custom epic custom attribute struct for Taigo's Sandbox Project:

import (
	taiga "github.com/theriverman/taigo"
)

type TaigoSandboxEpicCustomAttributeFields struct {
	SupportTeamName       string `json:"9216"`
	EstimatedDeliveryDate string `json:"9217"`
	CostUSD               int    `json:"9218"`
}
type TaigoSandboxEpicCustomAttribValues struct {
	taiga.EpicCustomAttributeValues
	AttributesValues TaigoSandboxEpicCustomAttributeFields `json:"attributes_values,omitempty"`
}

Observe how the custom TaigoSandboxEpicCustomAttributeFields is promoted in the custom TaigoSandboxEpicCustomAttribValues struct.

All that's left is to create an instance of TaigoSandboxEpicCustomAttribValues and use it to serialze the returned JSON:

cavs := TaigoSandboxEpicCustomAttribValues{} // Custom Attribute Value(s)
resp, err := client.Request.Get(client.MakeURL("epics", "custom-attributes-values", strconv.Itoa("your-epics-id")), &cavs)
if err != nil {
	log.Println(err)
	log.Println(resp)
	return
}

Logging & Verbose Mode

Logging

Verbose Mode

Verbose mode can be enabled by setting the Verbose field to true in taiga.Client. For example:

client := taiga.Client{
	Verbose:    true
}

Contribution

You're contribution would be much appreciated!
Feel free to open Issue tickets or create Pull requests.

Should you have an idea which would cause non-backward compatibility, please open an issue first to discuss your proposal!

For more details, see TAIGO Contribution.

Branching Strategy

  • master is always stable
  • develop is not always stable
  • feature_* branches are used for introducing larger changes

Licenses & Recognitions

Product License Author
Go Gopher CC3.0 Renee French
Gopher Konstructor CC0-1.0 quasilyte
TAIGA AGPL-3.0 Taiga.io
Taigo MIT theriverman

Documentation

Index

Constants

View Source
const TokenApplication string = "Application"

TokenApplication is the Token type used for external apps These tokens are associated to an existing user and an Application. They can be manually created via the Django ADMIN or programatically via API They work in the same way than standard Taiga authentication tokens but the "Authorization" header change slightly.

View Source
const TokenBearer string = "Bearer"

TokenBearer is the standard token type for authentication in Taiga

Variables

This section is empty.

Functions

func SuccessfulHTTPRequest

func SuccessfulHTTPRequest(Response *http.Response) bool

SuccessfulHTTPRequest returns true if the given Response's StatusCode is one of `[...]int{200, 201, 202, 204}`; otherwise returns false Taiga does not return status codes other than above stated

Types

type AgilePoints

type AgilePoints map[string]float64

AgilePoints is a string/int key/value pair to represent agile points in a UserStory, Milestone, etc... JSON Representation example:

{
	"points": {
		"1": 12,
		"2": 2,
		"3": 5,
		"4": 5
	}
}

type AssignedToExtraInfo

type AssignedToExtraInfo = Owner

AssignedToExtraInfo is a read-only field

type Attachment

type Attachment struct {
	AttachedFile     string    `json:"attached_file,omitempty"`
	CreatedDate      time.Time `json:"created_date,omitempty"`
	Description      string    `json:"description,omitempty"`
	FromComment      bool      `json:"from_comment,omitempty"`
	ID               int       `json:"id,omitempty"`
	IsDeprecated     bool      `json:"is_deprecated,omitempty"`
	ModifiedDate     time.Time `json:"modified_date,omitempty"`
	Name             string    `json:"name,omitempty"`
	ObjectID         int       `json:"object_id,omitempty"`
	Order            int       `json:"order,omitempty"`
	Owner            int       `json:"owner,omitempty"`
	PreviewURL       string    `json:"preview_url,omitempty"`
	Project          int       `json:"project,omitempty"`
	Sha1             string    `json:"sha1,omitempty"`
	Size             int       `json:"size,omitempty"`
	ThumbnailCardURL string    `json:"thumbnail_card_url,omitempty"`
	URL              string    `json:"url,omitempty"`
	// contains filtered or unexported fields
}

Attachment => https://taigaio.github.io/taiga-doc/dist/api.html#object-attachment-detail

func (*Attachment) SetFilePath

func (a *Attachment) SetFilePath(FilePath string)

SetFilePath takes the path to the file be uploaded

type AuthService

type AuthService struct {
	Endpoint string
	// contains filtered or unexported fields
}

AuthService is a handle to actions related to Auths

https://taigaio.github.io/taiga-doc/dist/api.html#auths

func (*AuthService) PublicRegistry

func (s *AuthService) PublicRegistry(credentials *Credentials) (*UserAuthenticationDetail, error)

PublicRegistry => https://taigaio.github.io/taiga-doc/dist/api.html#auth-public-registry

type with value "public"
username (required)
password (required)
email (required)
full_name (required)
accepted_terms (required): boolean

func (*AuthService) RefreshAuthToken

func (s *AuthService) RefreshAuthToken(selfUpdate bool) (RefreshResponse *RefreshToken, err error)

RefreshAuthToken => https://docs.taiga.io/api.html#auth-refresh

Generates a new pair of bearer and refresh token
If `selfUpdate` is true, `*Client` is refreshed with the returned token values

type Client

type Client struct {
	Credentials         *Credentials
	APIURL              string                               // set by system
	APIversion          string                               // default: "v1"
	BaseURL             string                               // i.e.: "http://taiga.test" | Same value as `api` in `taiga-front-dist/dist/conf.json`
	Headers             *http.Header                         // mostly set by system
	HTTPClient          *http.Client                         // set by user
	Token               string                               // set by system; can be set manually
	TokenType           string                               // default=Bearer; options:Bearer,Application
	RefreshToken        string                               // set by system; can be set manually
	RefreshTokenRoutine func(c *Client, ticker *time.Ticker) // routine periodically refreshing the token
	Self                *User                                // User logged in

	Verbose                   bool          // internal Taigo events are logged in a more verbose fashion
	AutoRefreshDisabled       bool          // if true before initialisation, RefreshTokenRoutine never gets called
	AutoRefreshTickerDuration time.Duration // time.Duration between two token refresh requests

	// Core Services
	Request *RequestService

	// Taiga Services
	Auth      *AuthService
	Epic      *EpicService
	Issue     *IssueService
	Milestone *MilestoneService
	Project   *ProjectService
	Resolver  *ResolverService
	Stats     *StatsService
	Task      *TaskService
	UserStory *UserStoryService
	User      *UserService
	Webhook   *WebhookService
	Wiki      *WikiService

	// Token Refresh Helpers
	TokenRefreshTicker *time.Ticker
	// contains filtered or unexported fields
}

Client is the session manager of Taiga Driver

func (*Client) AuthByCredentials

func (c *Client) AuthByCredentials(credentials *Credentials) error

AuthByCredentials authenticates to Taiga using the provided basic credentials

func (*Client) AuthByToken

func (c *Client) AuthByToken(tokenType, token, refreshToken string) error

AuthByToken authenticates to Taiga using provided Token by requesting users/me

func (*Client) DisableAutomaticTokenRefresh

func (c *Client) DisableAutomaticTokenRefresh()

func (*Client) DisablePagination

func (c *Client) DisablePagination(b bool)

DisablePagination controls the value of header `x-disable-pagination`.

func (*Client) GetAuthorizationHeader

func (c *Client) GetAuthorizationHeader() string

GetAuthorizationHeader returns the formatted value of Authorization key from Headers

func (*Client) GetPagination

func (c *Client) GetPagination() Pagination

GetPagination returns the Pagination struct created from the last response

func (*Client) Initialise

func (c *Client) Initialise() error

Initialise returns a new Taiga Client which is the entrypoint of the driver Initialise() is automatically called by the `AuthByCredentials` and `AuthByToken` methods. If you, for some reason, would like to manually set the Client.Token field, then Initialise() must be called manually!

func (*Client) LoadExternalHeaders

func (c *Client) LoadExternalHeaders(headers map[string]string)

LoadExternalHeaders loads a map of header key/value pairs permemently into `Client.Headers`

func (*Client) MakeURL

func (c *Client) MakeURL(EndpointParts ...string) string

MakeURL accepts an Endpoint URL and returns a compiled absolute URL

For example:

type Credentials

type Credentials struct {
	Type          string `json:"type,omitempty"` // normal;github;ldap;public;private
	Username      string `json:"username,omitempty"`
	Password      string `json:"password,omitempty"`
	Code          string `json:"code,omitempty"` // GitHub Authentication Code
	Email         string `json:"email,omitempty"`
	Existing      bool   `json:"existing,omitempty"`
	FullName      string `json:"full_name,omitempty"`
	Token         string `json:"token,omitempty"`
	AcceptedTerms bool   `json:"accepted_terms,omitempty"` // Required for registration only
}

Credentials is the payload for normal authentication

type DiscoverStats

type DiscoverStats struct {
	Projects struct {
		Total int `json:"total"`
	} `json:"projects"`
}

DiscoverStats => https://taigaio.github.io/taiga-doc/dist/api.html#object-discover-stats

type Epic

type Epic struct {
	TaigaBaseObject
	ID                int      `json:"id,omitempty"`
	Ref               int      `json:"ref,omitempty"`
	Version           int      `json:"version,omitempty"`
	AssignedTo        int      `json:"assigned_to,omitempty"`
	BlockedNote       string   `json:"blocked_note,omitempty"`
	ClientRequirement bool     `json:"client_requirement,omitempty"`
	Color             string   `json:"color,omitempty"`
	Description       string   `json:"description,omitempty"`
	EpicsOrder        int64    `json:"epics_order,omitempty"`
	IsBlocked         bool     `json:"is_blocked,omitempty"`
	Project           int      `json:"project,omitempty"`
	Status            int      `json:"status,omitempty"`
	Subject           string   `json:"subject,omitempty"`
	Tags              []string `json:"tags,omitempty"`
	TeamRequirement   bool     `json:"team_requirement,omitempty"`
	Watchers          []int    `json:"watchers,omitempty"`
	EpicDetail        *EpicDetail
	EpicDetailGET     *EpicDetailGET
	EpicDetailLIST    *EpicDetailLIST
}

Epic represents the mandatory fields of an Epic only

func (*Epic) Clone

func (e *Epic) Clone(s *EpicService) (*Epic, error)

Clone takes an *Epic struct with loaded properties and duplicates it

Available Meta: *EpicDetail

func (*Epic) GetID

func (e *Epic) GetID() int

GetID returns the ID

func (*Epic) GetProject

func (e *Epic) GetProject() int

GetProject returns the project ID

func (*Epic) GetRef

func (e *Epic) GetRef() int

GetRef returns the Ref

func (*Epic) GetSubject

func (e *Epic) GetSubject() string

GetSubject returns the subject

func (*Epic) GetVersion

func (e *Epic) GetVersion() int

GetVersion return the version

type EpicCustomAttribute

type EpicCustomAttribute struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	Project      int         `json:"project"`
	Type         string      `json:"type"`
}

EpicCustomAttribute -> https://taigaio.github.io/taiga-doc/dist/api.html#object-epic-custom-attribute-detail

type EpicCustomAttributeDefinition

type EpicCustomAttributeDefinition struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	ProjectID    int         `json:"project_id"`
	Type         string      `json:"type"`
}

EpicCustomAttributeDefinition != EpicCustomAttribute

type EpicCustomAttributeValues

type EpicCustomAttributeValues struct {
	TgObjCAVDBase
	Epic int `json:"epic,omitempty"`
}

EpicCustomAttributeValues -> http://taigaio.github.io/taiga-doc/dist/api.html#object-epic-custom-attributes-values-detail You must populate TgObjCAVDBase.AttributesValues with your custom struct representing the actual CAVD

type EpicDetail

type EpicDetail struct {
	AssignedTo          int                       `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo       `json:"assigned_to_extra_info,omitempty"`
	Attachments         []GenericObjectAttachment `json:"attachments,omitempty"`
	BlockedNote         string                    `json:"blocked_note,omitempty"`
	BlockedNoteHTML     string                    `json:"blocked_note_html,omitempty"`
	ClientRequirement   bool                      `json:"client_requirement,omitempty"`
	Color               string                    `json:"color,omitempty"`
	Comment             string                    `json:"comment,omitempty"`
	CreatedDate         time.Time                 `json:"created_date,omitempty"`
	Description         string                    `json:"description,omitempty"`
	DescriptionHTML     string                    `json:"description_html,omitempty"`
	EpicsOrder          int64                     `json:"epics_order,omitempty"`
	ID                  int                       `json:"id,omitempty"`
	IsBlocked           bool                      `json:"is_blocked,omitempty"`
	IsClosed            bool                      `json:"is_closed,omitempty"`
	IsVoter             bool                      `json:"is_voter,omitempty"`
	IsWatcher           bool                      `json:"is_watcher,omitempty"`
	ModifiedDate        time.Time                 `json:"modified_date,omitempty"`
	Neighbors           Neighbors                 `json:"neighbors,omitempty"`
	Owner               int                       `json:"owner,omitempty"`
	OwnerExtraInfo      OwnerExtraInfo            `json:"owner_extra_info,omitempty"`
	Project             int                       `json:"project"` // Mandatory
	ProjectExtraInfo    ProjectExtraInfo          `json:"project_extra_info,omitempty"`
	Ref                 int                       `json:"ref,omitempty"`
	Status              int                       `json:"status,omitempty"`
	StatusExtraInfo     StatusExtraInfo           `json:"status_extra_info,omitempty"`
	Subject             string                    `json:"subject"` // Mandatory
	Tags                [][]string                `json:"tags,omitempty"`
	TeamRequirement     bool                      `json:"team_requirement,omitempty"`
	TotalVoters         int                       `json:"total_voters,omitempty"`
	TotalWatchers       int                       `json:"total_watchers,omitempty"`
	UserStoriesCounts   UserStoriesCounts         `json:"user_stories_counts,omitempty"`
	Version             int                       `json:"version,omitempty"`
	Watchers            []int                     `json:"watchers,omitempty"`
}

EpicDetail => Epic detail https://taigaio.github.io/taiga-doc/dist/api.html#object-epic-detail

func (*EpicDetail) AsEpic

func (e *EpicDetail) AsEpic() (*Epic, error)

AsEpic packs the returned EpicDetail into a generic Epic struct

type EpicDetailGET

type EpicDetailGET struct {
	AssignedTo          int                       `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo       `json:"assigned_to_extra_info,omitempty"`
	Attachments         []GenericObjectAttachment `json:"attachments,omitempty"`
	BlockedNote         string                    `json:"blocked_note,omitempty"`
	BlockedNoteHTML     string                    `json:"blocked_note_html,omitempty"`
	ClientRequirement   bool                      `json:"client_requirement,omitempty"`
	Color               string                    `json:"color,omitempty"`
	Comment             string                    `json:"comment,omitempty"`
	CreatedDate         time.Time                 `json:"created_date,omitempty"`
	Description         string                    `json:"description,omitempty"`
	DescriptionHTML     string                    `json:"description_html,omitempty"`
	EpicsOrder          int64                     `json:"epics_order,omitempty"`
	ID                  int                       `json:"id,omitempty"`
	IsBlocked           bool                      `json:"is_blocked,omitempty"`
	IsClosed            bool                      `json:"is_closed,omitempty"`
	IsVoter             bool                      `json:"is_voter,omitempty"`
	IsWatcher           bool                      `json:"is_watcher,omitempty"`
	ModifiedDate        time.Time                 `json:"modified_date,omitempty"`
	Neighbors           Neighbors                 `json:"neighbors,omitempty"`
	Owner               int                       `json:"owner,omitempty"`
	OwnerExtraInfo      OwnerExtraInfo            `json:"owner_extra_info,omitempty"`
	Project             int                       `json:"project,omitempty"`
	ProjectExtraInfo    ProjectExtraInfo          `json:"project_extra_info,omitempty"`
	Ref                 int                       `json:"ref,omitempty"`
	Status              int                       `json:"status,omitempty"`
	StatusExtraInfo     StatusExtraInfo           `json:"status_extra_info,omitempty"`
	Subject             string                    `json:"subject,omitempty"`
	Tags                Tags                      `json:"tags,omitempty"`
	TeamRequirement     bool                      `json:"team_requirement,omitempty"`
	TotalVoters         int                       `json:"total_voters,omitempty"`
	TotalWatchers       int                       `json:"total_watchers,omitempty"`
	UserStoriesCounts   UserStoriesCounts         `json:"user_stories_counts,omitempty"`
	Version             int                       `json:"version,omitempty"`
	Watchers            []int                     `json:"watchers,omitempty"`
}

EpicDetailGET => Epic detail (GET) https://taigaio.github.io/taiga-doc/dist/api.html#object-epic-detail-get

func (*EpicDetailGET) AsEpic

func (e *EpicDetailGET) AsEpic() (*Epic, error)

AsEpic packs the returned EpicDetailGET into a generic Epic struct

type EpicDetailLIST

type EpicDetailLIST []struct {
	AssignedTo          int                       `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo       `json:"assigned_to_extra_info,omitempty"`
	Attachments         []GenericObjectAttachment `json:"attachments,omitempty"`
	BlockedNote         string                    `json:"blocked_note,omitempty"`
	ClientRequirement   bool                      `json:"client_requirement,omitempty"`
	Color               string                    `json:"color,omitempty"`
	CreatedDate         time.Time                 `json:"created_date,omitempty"`
	EpicsOrder          int64                     `json:"epics_order,omitempty"`
	ID                  int                       `json:"id,omitempty"`
	IsBlocked           bool                      `json:"is_blocked,omitempty"`
	IsClosed            bool                      `json:"is_closed,omitempty"`
	IsVoter             bool                      `json:"is_voter,omitempty"`
	IsWatcher           bool                      `json:"is_watcher,omitempty"`
	ModifiedDate        time.Time                 `json:"modified_date,omitempty"`
	Owner               int                       `json:"owner,omitempty"`
	OwnerExtraInfo      OwnerExtraInfo            `json:"owner_extra_info,omitempty"`
	Project             int                       `json:"project,omitempty"`
	ProjectExtraInfo    Project                   `json:"project_extra_info,omitempty"`
	Ref                 int                       `json:"ref,omitempty"`
	Status              int                       `json:"status,omitempty"`
	StatusExtraInfo     StatusExtraInfo           `json:"status_extra_info,omitempty"`
	Subject             string                    `json:"subject,omitempty"`
	Tags                Tags                      `json:"tags,omitempty"`
	TeamRequirement     bool                      `json:"team_requirement,omitempty"`
	TotalVoters         int                       `json:"total_voters,omitempty"`
	TotalWatchers       int                       `json:"total_watchers,omitempty"`
	UserStoriesCounts   UserStoriesCounts         `json:"user_stories_counts,omitempty"`
	Version             int                       `json:"version,omitempty"`
	Watchers            []int                     `json:"watchers,omitempty"`
}

EpicDetailLIST -> Epic detail (LIST) https://taigaio.github.io/taiga-doc/dist/api.html#object-epic-detail-list

func (*EpicDetailLIST) AsEpics

func (e *EpicDetailLIST) AsEpics() ([]Epic, error)

AsEpics packs the returned EpicDetailLIST into a generic Epic struct

type EpicFiltersDataDetail

type EpicFiltersDataDetail struct {
	AssignedTo []struct {
		Count    int    `json:"count,omitempty"`
		FullName string `json:"full_name,omitempty"`
		ID       int    `json:"id,omitempty"`
	} `json:"assigned_to,omitempty"`
	Owners []struct {
		Count    int    `json:"count,omitempty"`
		FullName string `json:"full_name,omitempty"`
		ID       int    `json:"id,omitempty"`
	} `json:"owners,omitempty"`
	Statuses []struct {
		Color string `json:"color,omitempty"`
		Count int    `json:"count,omitempty"`
		ID    int    `json:"id,omitempty"`
		Name  string `json:"name,omitempty"`
		Order int    `json:"order,omitempty"`
	} `json:"statuses,omitempty"`
	Tags []struct {
		Color TagsColors `json:"color,omitempty"`
		Count int        `json:"count,omitempty"`
		Name  string     `json:"name,omitempty"`
	} `json:"tags,omitempty"`
}

EpicFiltersDataDetail => Epic filters data detail https://taigaio.github.io/taiga-doc/dist/api.html#object-epic-filters-data

type EpicMinimal

type EpicMinimal struct {
	Color   string  `json:"color"`
	ID      int     `json:"id"`
	Project Project `json:"project"`
	Ref     int     `json:"ref"`
	Subject string  `json:"subject"`
}

EpicMinimal represent a small subset of a full Epic object

type EpicRelatedUserStoryDetail

type EpicRelatedUserStoryDetail struct {
	EpicID      int   `json:"epic,omitempty"`
	Order       int64 `json:"order,omitempty"`
	UserStoryID int   `json:"user_story,omitempty"`
}

EpicRelatedUserStoryDetail => Epic related user story detail https://taigaio.github.io/taiga-doc/dist/api.html#object-epic-related-user-story-detail

func (*EpicRelatedUserStoryDetail) GetEpic

func (e *EpicRelatedUserStoryDetail) GetEpic(c *Client) (*Epic, error)

GetEpic returns the Epic referred in the EpicRelatedUserStoryDetail

func (*EpicRelatedUserStoryDetail) GetUserStory

func (e *EpicRelatedUserStoryDetail) GetUserStory(c *Client) (*UserStory, error)

GetUserStory returns the UserStory referred in the EpicRelatedUserStoryDetail

type EpicService

type EpicService struct {
	Endpoint string
	// contains filtered or unexported fields
}

EpicService is a handle to actions related to Epics

https://taigaio.github.io/taiga-doc/dist/api.html#epics

func (*EpicService) Create

func (s *EpicService) Create(epic *Epic) (*Epic, error)

Create => https://taigaio.github.io/taiga-doc/dist/api.html#epics-create

Available Meta: *EpicDetail

func (*EpicService) CreateAttachment

func (s *EpicService) CreateAttachment(attachment *Attachment, epic *Epic) (*Attachment, error)

CreateAttachment creates a new Epic attachment => https://taigaio.github.io/taiga-doc/dist/api.html#epics-create-attachment

func (*EpicService) CreateRelatedUserStory

func (s *EpicService) CreateRelatedUserStory(EpicID int, UserStoryID int) (*EpicRelatedUserStoryDetail, error)

CreateRelatedUserStory => https://taigaio.github.io/taiga-doc/dist/api.html#epics-related-user-stories-create

Mandatory parameters: `EpicID`; `UserStoryID` Accepted UserStory values: `UserStory.ID`

func (*EpicService) Delete

func (s *EpicService) Delete(epicID int) (*http.Response, error)

Delete => https://taigaio.github.io/taiga-doc/dist/api.html#epics-delete

func (*EpicService) Edit

func (s *EpicService) Edit(epic *Epic) (*Epic, error)

Edit edits an Epic via a PATCH request => https://taigaio.github.io/taiga-doc/dist/api.html#epics-edit Available Meta: EpicDetail

func (*EpicService) Get

func (s *EpicService) Get(epicID int) (*Epic, error)

Get => https://taigaio.github.io/taiga-doc/dist/api.html#epics-get

Available Meta: *EpicDetailGET

func (*EpicService) GetByRef

func (s *EpicService) GetByRef(epicRef int, project *Project) (*Epic, error)

GetByRef => https://taigaio.github.io/taiga-doc/dist/api.html#epics-get-by-ref

The passed epicRef should be an int taken from the Epic's URL The passed *Project struct should have at least one of the following fields set:

ID 	 (int)
Slug (string)

If none of the above fields are set, an error is returned. If both fields are set, *Project.ID will be preferred.

Available Meta: *EpicDetailGET

func (*EpicService) List

func (s *EpicService) List(queryParams *EpicsQueryParams) ([]Epic, error)

List => https://taigaio.github.io/taiga-doc/dist/api.html#epics-list

Available Meta: *EpicDetailLIST

func (*EpicService) ListRelatedUserStories

func (s *EpicService) ListRelatedUserStories(epicID int) ([]EpicRelatedUserStoryDetail, error)

ListRelatedUserStories => https://taigaio.github.io/taiga-doc/dist/api.html#epics-related-user-stories-list

type EpicStatus

type EpicStatus struct {
	Color    string `json:"color"`
	ID       int    `json:"id"`
	IsClosed bool   `json:"is_closed"`
	Name     string `json:"name"`
	Order    int    `json:"order"`
	Project  int    `json:"project"`
	Slug     string `json:"slug"`
}

EpicStatus -> https://taigaio.github.io/taiga-doc/dist/api.html#epic-statuses

type EpicWatcherDetail

type EpicWatcherDetail struct {
	FullName string `json:"full_name,omitempty"`
	ID       int    `json:"id,omitempty"`
	Username string `json:"username,omitempty"`
}

EpicWatcherDetail => Epic watcher detail https://taigaio.github.io/taiga-doc/dist/api.html#object-epic-watcher-detail

type EpicsQueryParams

type EpicsQueryParams struct {
	IncludeAttachments bool   `url:"include_attachments,omitempty"`
	Project            int    `url:"project,omitempty"`
	ProjectSlug        string `url:"project__slug,omitempty"`
	AssignedTo         int    `url:"assigned_to,omitempty"`
	StatusIsClosed     bool   `url:"status__is_closed,omitempty"`
}

EpicsQueryParams holds fields to be used as URL query parameters to filter the queried objects

type GenericObjectAttachment

type GenericObjectAttachment struct {
	AttachedFile     string `json:"attached_file,omitempty"`
	ID               int    `json:"id,omitempty"`
	ThumbnailCardURL string `json:"thumbnail_card_url,omitempty"`
}

GenericObjectAttachment represents an array of minimal attachment details This array is filled when the `IncludeAttachments` query parameter is true

type IsPrivateExtraInfo

type IsPrivateExtraInfo struct {
	Reason       string `json:"reason,omitempty"`
	CanBeUpdated bool   `json:"can_be_updated,omitempty"`
}

IsPrivateExtraInfo is a read-only field

type Issue

type Issue struct {
	TaigaBaseObject
	ID              int       `json:"id,omitempty"`
	Ref             int       `json:"ref,omitempty"`
	Version         int       `json:"version,omitempty"`
	AssignedTo      int       `json:"assigned_to,omitempty"`
	BlockedNote     string    `json:"blocked_note,omitempty"`
	Description     string    `json:"description,omitempty"`
	IsBlocked       bool      `json:"is_blocked,omitempty"`
	IsClosed        bool      `json:"is_closed,omitempty"`
	Milestone       int       `json:"milestone,omitempty"`
	Owner           int       `json:"owner,omitempty"`
	Priority        int       `json:"priority,omitempty"`
	Project         int       `json:"project"`
	Severity        int       `json:"severity,omitempty"`
	Status          int       `json:"status,omitempty"`
	Subject         string    `json:"subject"`
	Tags            Tags      `json:"tags,omitempty"`
	Type            int       `json:"type,omitempty"`
	Watchers        []int     `json:"watchers,omitempty"`
	CreatedDate     time.Time `json:"created_date,omitempty"`
	ModifiedDate    time.Time `json:"modified_date,omitempty"`
	FinishedDate    time.Time `json:"finished_date,omitempty"`
	DueDate         string    `json:"due_date,omitempty"`
	DueDateReason   string    `json:"due_date_reason,omitempty"`
	DueDateStatus   string    `json:"due_date_status,omitempty"`
	IssueDetail     *IssueDetail
	IssueDetailGET  *IssueDetailGET
	IssueDetailLIST *IssueDetailLIST
}

Issue represents the mandatory fields of an Issue only

func (*Issue) GetID

func (i *Issue) GetID() int

GetID returns the ID

func (*Issue) GetProject

func (i *Issue) GetProject() int

GetProject returns the project ID

func (*Issue) GetRef

func (i *Issue) GetRef() int

GetRef returns the Ref

func (*Issue) GetSubject

func (i *Issue) GetSubject() string

GetSubject returns the subject

func (*Issue) GetVersion

func (i *Issue) GetVersion() int

GetVersion return the version

type IssueCustomAttribValues

type IssueCustomAttribValues struct {
	TgObjCAVDBase
	Epic int `json:"epic,omitempty"`
}

IssueCustomAttribValues -> http://taigaio.github.io/taiga-doc/dist/api.html#object-epic-custom-attributes-values-detail You must populate TgObjCAVDBase.AttributesValues with your custom struct representing the actual CAVD

type IssueCustomAttribute

type IssueCustomAttribute struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	ProjectID    int         `json:"project_id"`
	Type         string      `json:"type"`
}

IssueCustomAttribute -> https://taigaio.github.io/taiga-doc/dist/api.html#issue-custom-attributes-list

type IssueCustomAttributeDefinition

type IssueCustomAttributeDefinition struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	ProjectID    int         `json:"project_id"`
	Type         string      `json:"type"`
}

IssueCustomAttributeDefinition != IssueCustomAttribute

type IssueDetail

type IssueDetail struct {
	AssignedTo           int                       `json:"assigned_to"`
	AssignedToExtraInfo  AssignedToExtraInfo       `json:"assigned_to_extra_info"`
	Attachments          []GenericObjectAttachment `json:"attachments"`
	BlockedNote          string                    `json:"blocked_note"`
	BlockedNoteHTML      string                    `json:"blocked_note_html"`
	Comment              string                    `json:"comment"`
	CreatedDate          time.Time                 `json:"created_date"`
	Description          string                    `json:"description"`
	DescriptionHTML      string                    `json:"description_html"`
	DueDate              string                    `json:"due_date"`
	DueDateReason        string                    `json:"due_date_reason"`
	DueDateStatus        string                    `json:"due_date_status"`
	ExternalReference    []int                     `json:"external_reference"`
	FinishedDate         time.Time                 `json:"finished_date"`
	GeneratedUserStories []int                     `json:"generated_user_stories"`
	ID                   int                       `json:"id"`
	IsBlocked            bool                      `json:"is_blocked"`
	IsClosed             bool                      `json:"is_closed"`
	IsVoter              bool                      `json:"is_voter"`
	IsWatcher            bool                      `json:"is_watcher"`
	Milestone            int                       `json:"milestone"`
	ModifiedDate         time.Time                 `json:"modified_date"`
	Neighbors            Neighbors                 `json:"neighbors"`
	Owner                int                       `json:"owner"`
	OwnerExtraInfo       OwnerExtraInfo            `json:"owner_extra_info"`
	Priority             int                       `json:"priority"`
	Project              int                       `json:"project"`
	ProjectExtraInfo     ProjectExtraInfo          `json:"project_extra_info"`
	Ref                  int                       `json:"ref"`
	Severity             int                       `json:"severity"`
	Status               int                       `json:"status"`
	StatusExtraInfo      StatusExtraInfo           `json:"status_extra_info"`
	Subject              string                    `json:"subject"`
	Tags                 Tags                      `json:"tags"`
	TotalVoters          int                       `json:"total_voters"`
	TotalWatchers        int                       `json:"total_watchers"`
	Type                 int                       `json:"type"`
	Version              int                       `json:"version"`
	Watchers             []int                     `json:"watchers"`
}

IssueDetail -> Issue detail https://taigaio.github.io/taiga-doc/dist/api.html#object-issue-detail

func (*IssueDetail) AsIssue

func (issueD *IssueDetail) AsIssue() (*Issue, error)

AsIssue packs the returned IssueDetailGET into a generic Issue struct

type IssueDetailGET

type IssueDetailGET struct {
	AssignedTo           int                       `json:"assigned_to"`
	AssignedToExtraInfo  AssignedToExtraInfo       `json:"assigned_to_extra_info"`
	Attachments          []GenericObjectAttachment `json:"attachments"`
	BlockedNote          string                    `json:"blocked_note"`
	BlockedNoteHTML      string                    `json:"blocked_note_html"`
	Comment              string                    `json:"comment"`
	CreatedDate          time.Time                 `json:"created_date"`
	Description          string                    `json:"description"`
	DescriptionHTML      string                    `json:"description_html"`
	DueDate              string                    `json:"due_date"`
	DueDateReason        string                    `json:"due_date_reason"`
	DueDateStatus        string                    `json:"due_date_status"`
	ExternalReference    []int                     `json:"external_reference"`
	FinishedDate         time.Time                 `json:"finished_date"`
	GeneratedUserStories []int                     `json:"generated_user_stories"`
	ID                   int                       `json:"id"`
	IsBlocked            bool                      `json:"is_blocked"`
	IsClosed             bool                      `json:"is_closed"`
	IsVoter              bool                      `json:"is_voter"`
	IsWatcher            bool                      `json:"is_watcher"`
	Milestone            int                       `json:"milestone"`
	ModifiedDate         time.Time                 `json:"modified_date"`
	Neighbors            Neighbors                 `json:"neighbors"`
	Owner                int                       `json:"owner"`
	OwnerExtraInfo       OwnerExtraInfo            `json:"owner_extra_info"`
	Priority             int                       `json:"priority"`
	Project              int                       `json:"project"`
	ProjectExtraInfo     ProjectExtraInfo          `json:"project_extra_info"`
	Ref                  int                       `json:"ref"`
	Severity             int                       `json:"severity"`
	Status               int                       `json:"status"`
	StatusExtraInfo      StatusExtraInfo           `json:"status_extra_info"`
	Subject              string                    `json:"subject"`
	Tags                 Tags                      `json:"tags"`
	TotalVoters          int                       `json:"total_voters"`
	TotalWatchers        int                       `json:"total_watchers"`
	Type                 int                       `json:"type"`
	Version              int                       `json:"version"`
	Watchers             []int                     `json:"watchers"`
}

IssueDetailGET -> Issue detail (GET) https://taigaio.github.io/taiga-doc/dist/api.html#object-issue-detail-get

func (*IssueDetailGET) AsIssue

func (issueD *IssueDetailGET) AsIssue() (*Issue, error)

AsIssue packs the returned IssueDetailGET into a generic Issue struct

type IssueDetailLIST

type IssueDetailLIST []struct {
	AssignedTo          int                       `json:"assigned_to"`
	AssignedToExtraInfo AssignedToExtraInfo       `json:"assigned_to_extra_info"`
	Attachments         []GenericObjectAttachment `json:"attachments"`
	BlockedNote         string                    `json:"blocked_note"`
	CreatedDate         time.Time                 `json:"created_date"`
	ModifiedDate        time.Time                 `json:"modified_date"`
	FinishedDate        time.Time                 `json:"finished_date"`
	DueDate             string                    `json:"due_date"`
	DueDateReason       string                    `json:"due_date_reason"`
	DueDateStatus       string                    `json:"due_date_status"`
	ExternalReference   []int                     `json:"external_reference"`
	ID                  int                       `json:"id"`
	IsBlocked           bool                      `json:"is_blocked"`
	IsClosed            bool                      `json:"is_closed"`
	IsVoter             bool                      `json:"is_voter"`
	IsWatcher           bool                      `json:"is_watcher"`
	Milestone           int                       `json:"milestone"`
	Owner               int                       `json:"owner"`
	OwnerExtraInfo      OwnerExtraInfo            `json:"owner_extra_info"`
	Priority            int                       `json:"priority"`
	Project             int                       `json:"project"`
	ProjectExtraInfo    ProjectExtraInfo          `json:"project_extra_info"`
	Ref                 int                       `json:"ref"`
	Severity            int                       `json:"severity"`
	Status              int                       `json:"status"`
	StatusExtraInfo     StatusExtraInfo           `json:"status_extra_info"`
	Subject             string                    `json:"subject"`
	Tags                Tags                      `json:"tags"`
	TotalVoters         int                       `json:"total_voters"`
	TotalWatchers       int                       `json:"total_watchers"`
	Type                int                       `json:"type"`
	Version             int                       `json:"version"`
	Watchers            []int                     `json:"watchers"`
}

IssueDetailLIST -> Issue detail (LIST)

https://taigaio.github.io/taiga-doc/dist/api.html#object-issue-detail-list

func (*IssueDetailLIST) AsIssues

func (issueL *IssueDetailLIST) AsIssues() ([]Issue, error)

AsIssues packs the returned IssueDetailLIST into a generic Issue struct

type IssueFiltersDataDetail

type IssueFiltersDataDetail struct {
	AssignedTo []struct {
		Count    int    `json:"count,omitempty"`
		FullName string `json:"full_name,omitempty"`
		ID       int    `json:"id,omitempty"`
	} `json:"assigned_to,omitempty"`
	AssignedUsers []struct {
		Count    int    `json:"count,omitempty"`
		FullName string `json:"full_name,omitempty"`
		ID       int    `json:"id,omitempty"`
	} `json:"assigned_users,omitempty"`
	Epics  []EpicMinimal `json:"epics,omitempty"`
	Owners []struct {
		Count    int    `json:"count,omitempty"`
		FullName string `json:"full_name,omitempty"`
		ID       int    `json:"id,omitempty"`
	} `json:"owners,omitempty"`
	Roles []struct {
		Color string `json:"color,omitempty"`
		Count int    `json:"count,omitempty"`
		ID    int    `json:"id,omitempty"`
		Name  string `json:"name,omitempty"`
		Order int    `json:"order,omitempty"`
	} `json:"roles,omitempty"`
	Statuses []struct {
		Color string `json:"color,omitempty"`
		Count int    `json:"count,omitempty"`
		ID    int    `json:"id,omitempty"`
		Name  string `json:"name,omitempty"`
		Order int    `json:"order,omitempty"`
	} `json:"statuses,omitempty"`
	Tags []struct {
		Color TagsColors `json:"color,omitempty"`
		Count int        `json:"count,omitempty"`
		Name  string     `json:"name,omitempty"`
	} `json:"tags,omitempty"`
}

IssueFiltersDataDetail => https://taigaio.github.io/taiga-doc/dist/api.html#object-userstory-filters-data

type IssueQueryParams

type IssueQueryParams struct {
	Project            int    `url:"project,omitempty"`
	Milestone          int    `url:"milestone,omitempty"`
	MilestoneIsNull    bool   `url:"milestone__isnull,omitempty"`
	Status             int    `url:"status,omitempty"`
	StatusIsArchived   bool   `url:"status__is_archived,omitempty"`
	Tags               string `url:"tags,omitempty"` // Strings separated by comma `,`
	Watchers           int    `url:"watchers,omitempty"`
	AssignedTo         int    `url:"assigned_to,omitempty"`
	Epic               int    `url:"epic,omitempty"`
	Role               int    `url:"role,omitempty"`
	StatusIsClosed     bool   `url:"status__is_closed,omitempty"`
	Type               int    `url:"type,omitempty"`
	Severity           int    `url:"severity,omitempty"`
	Priority           int    `url:"priority,omitempty"`
	Owner              int    `url:"owner,omitempty"`
	ExcludeStatus      int    `url:"exclude_status,omitempty"`
	ExcludeTags        string `url:"exclude_tags,omitempty"` // Strings separated by comma `,`
	ExcludeAssignedTo  int    `url:"exclude_assigned_to,omitempty"`
	ExcludeRole        int    `url:"exclude_role,omitempty"`
	ExcludeEpic        int    `url:"exclude_epic,omitempty"`
	ExcludeSeverity    int    `url:"exclude_severity,omitempty"`
	ExcludePriority    int    `url:"exclude_priority,omitempty"`
	ExcludeOwner       int    `url:"exclude_owner,omitempty"`
	ExcludeType        int    `url:"exclude_type,omitempty"`
	IncludeAttachments bool   `url:"include_attachments,omitempty"`
}

IssueQueryParams holds fields to be used as URL query parameters to filter the queried objects

type IssueService

type IssueService struct {
	Endpoint string
	// contains filtered or unexported fields
}

IssueService is a handle to actions related to Issues

https://taigaio.github.io/taiga-doc/dist/api.html#issues

func (*IssueService) Create

func (s *IssueService) Create(issue *Issue) (*Issue, error)

Create creates a new Issue | https://taigaio.github.io/taiga-doc/dist/api.html#issues-create

Available Meta: *IssueDetail

func (*IssueService) CreateAttachment

func (s *IssueService) CreateAttachment(attachment *Attachment, issue *Issue) (*Attachment, error)

CreateAttachment creates a new Issue attachment => https://taigaio.github.io/taiga-doc/dist/api.html#issues-create-attachment

func (*IssueService) Edit

func (s *IssueService) Edit(issue *Issue) (*Issue, error)

Edit sends a PATCH request to edit a Issue -> https://taigaio.github.io/taiga-doc/dist/api.html#issues-edit Available Meta: IssueDetail

func (*IssueService) Get

func (s *IssueService) Get(issueID int) (*Issue, error)

Get -> https://taigaio.github.io/taiga-doc/dist/api.html#issues-get

Available Meta: *IssueDetailGET

func (*IssueService) List

func (s *IssueService) List(queryParams *IssueQueryParams) ([]Issue, error)

List => https://taigaio.github.io/taiga-doc/dist/api.html#issues-list

type IssueStatus

type IssueStatus struct {
	Color     string `json:"color"`
	ID        int    `json:"id"`
	IsClosed  bool   `json:"is_closed"`
	Name      string `json:"name"`
	Order     int    `json:"order"`
	ProjectID int    `json:"project_id"`
	Slug      string `json:"slug"`
}

IssueStatus -> https://taigaio.github.io/taiga-doc/dist/api.html#issue-statuses

type Liked

type Liked struct {
	AssignedTo          int                 `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info,omitempty"`
	CreatedDate         time.Time           `json:"created_date,omitempty"`
	Description         string              `json:"description,omitempty"`
	ID                  int                 `json:"id,omitempty"`
	IsFan               bool                `json:"is_fan,omitempty"`
	IsPrivate           bool                `json:"is_private,omitempty"`
	IsWatcher           bool                `json:"is_watcher,omitempty"`
	LogoSmallURL        string              `json:"logo_small_url,omitempty"`
	Name                string              `json:"name,omitempty"`
	Project             string              `json:"project,omitempty"`
	ProjectBlockedCode  string              `json:"project_blocked_code,omitempty"`
	ProjectIsPrivate    bool                `json:"project_is_private,omitempty"`
	ProjectName         string              `json:"project_name,omitempty"`
	ProjectSlug         string              `json:"project_slug,omitempty"`
	Ref                 int                 `json:"ref,omitempty"`
	Slug                string              `json:"slug,omitempty"`
	Status              int                 `json:"status,omitempty"`
	StatusColor         string              `json:"status_color,omitempty"`
	Subject             string              `json:"subject,omitempty"`
	TagsColors          []TagsColors        `json:"tags_colors,omitempty"`
	TotalFans           int                 `json:"total_fans,omitempty"`
	TotalWatchers       int                 `json:"total_watchers,omitempty"`
	Type                string              `json:"type,omitempty"`
}

Liked represents Liked | https://taigaio.github.io/taiga-doc/dist/api.html#object-liked-detail

type Milestone

type Milestone struct {
	ID                 int              `json:"id,omitempty"`
	Slug               string           `json:"slug,omitempty"`
	Name               string           `json:"name"`
	EstimatedFinish    string           `json:"estimated_finish"`
	EstimatedStart     string           `json:"estimated_start"`
	Closed             bool             `json:"closed,omitempty"`
	ClosedPoints       float64          `json:"closed_points,omitempty"`
	CreatedDate        time.Time        `json:"created_date,omitempty"`
	Disponibility      float64          `json:"disponibility,omitempty"`
	ModifiedDate       time.Time        `json:"modified_date,omitempty"`
	Order              int              `json:"order,omitempty"`
	Owner              int              `json:"owner,omitempty"`
	Project            int              `json:"project"`
	ProjectExtraInfo   ProjectExtraInfo `json:"project_extra_info,omitempty"`
	TotalPoints        float64          `json:"total_points,omitempty"`
	UserStories        []UserStory      `json:"user_stories,omitempty"`
	IncludeAttachments bool             `url:"include_attachments,omitempty"`
}

Milestone represents all fields of a Milestone(Sprint)

https://taigaio.github.io/taiga-doc/dist/api.html#object-milestone-detail

type MilestoneService

type MilestoneService struct {
	Endpoint string
	// contains filtered or unexported fields
}

MilestoneService is a handle to actions related to Milestones

https://taigaio.github.io/taiga-doc/dist/api.html#milestones

func (*MilestoneService) Create

func (s *MilestoneService) Create(milestone *Milestone) (*Milestone, error)

Create => https://taigaio.github.io/taiga-doc/dist/api.html#milestones-create

Mandatory fields: Project, Name, EstimatedStart, EstimatedFinish

func (*MilestoneService) Delete

func (s *MilestoneService) Delete(milestoneID int) (*http.Response, error)

Delete => https://taigaio.github.io/taiga-doc/dist/api.html#milestones-delete

func (*MilestoneService) Edit

func (s *MilestoneService) Edit(milestone *Milestone) (*Milestone, error)

Edit edits an Milestone via a PATCH request => https://taigaio.github.io/taiga-doc/dist/api.html#milestones-edit Available Meta: MilestoneDetail

func (*MilestoneService) Get

func (s *MilestoneService) Get(milestoneID int) (*Milestone, error)

Get => https://taigaio.github.io/taiga-doc/dist/api.html#Milestones-get

type MilestoneTotalInfo

type MilestoneTotalInfo struct {
	TaigaInfoTotalOpenedMilestones int // Taiga-Info-Total-Opened-Milestones
	TaigaInfoTotalClosedMilestones int // Taiga-Info-Total-Closed-Milestones
}

MilestoneTotalInfo holds the two extra headers returned by Taiga when filtering for milestones

Taiga-Info-Total-Opened-Milestones: the number of opened milestones for this project Taiga-Info-Total-Closed-Milestones: the number of closed milestones for this project

https://taigaio.github.io/taiga-doc/dist/api.html#milestones-list

func (*MilestoneTotalInfo) LoadFromHeaders

func (m *MilestoneTotalInfo) LoadFromHeaders(response *http.Response)

LoadFromHeaders accepts an *http.Response struct and reads the relevant pagination headers returned by Taiga

type MilestonesQueryParams

type MilestonesQueryParams struct {
	Project int  `url:"project,omitempty"`
	Closed  bool `url:"closed,omitempty"`
}

MilestonesQueryParams holds fields to be used as URL query parameters to filter the queried objects

type Neighbors

type Neighbors struct {
	Next     Next     `json:"next"`
	Previous Previous `json:"previous"`
}

Neighbors represents a read-only field

type Next

type Next struct {
	ID      int    `json:"id"`
	Ref     int    `json:"ref"`
	Subject string `json:"subject"`
}

Next represents a read-only field

type Owner

type Owner struct {
	BigPhoto        string `json:"big_photo,omitempty"`
	FullNameDisplay string `json:"full_name_display,omitempty"`
	GravatarID      string `json:"gravatar_id,omitempty"`
	ID              int    `json:"id,omitempty"`
	IsActive        bool   `json:"is_active,omitempty"`
	Photo           string `json:"photo,omitempty"`
	Username        string `json:"username,omitempty"`
}

Owner represents the owner of an object

type OwnerExtraInfo

type OwnerExtraInfo = Owner

OwnerExtraInfo is a read-only field

type Pagination

type Pagination struct {
	Paginated         bool     // indicating if pagination is being used for the request
	PaginatedBy       int      // number of results per page
	PaginationCount   int      // total number of results
	PaginationCurrent int      // current page
	PaginationNext    *url.URL // next results
	PaginationPrev    *url.URL // previous results
}

Pagination represents the information returned via headers

https://taigaio.github.io/taiga-doc/dist/api.html#_pagination

func (*Pagination) LoadFromHeaders

func (p *Pagination) LoadFromHeaders(c *Client, response *http.Response)

LoadFromHeaders accepts an *http.Response struct and reads the relevant pagination headers returned by Taiga

type Points

type Points = AgilePoints

Points represent the Agile Points configured for the project and set for respective Taiga object

type Previous

type Previous = Next

Previous represents a read-only field

type Project

type Project struct {
	ID                        int     `json:"id,omitempty"`
	Slug                      string  `json:"slug,omitempty"`
	CreationTemplate          int     `json:"creation_template,omitempty"`
	Description               string  `json:"description,omitempty"`
	IsBacklogActivated        bool    `json:"is_backlog_activated,omitempty"`
	IsIssuesActivated         bool    `json:"is_issues_activated,omitempty"`
	IsKanbanActivated         bool    `json:"is_kanban_activated,omitempty"`
	IsPrivate                 bool    `json:"is_private,omitempty"`
	IsWikiActivated           bool    `json:"is_wiki_activated,omitempty"`
	Name                      string  `json:"name,omitempty"`
	TotalMilestones           int     `json:"total_milestones,omitempty"`
	TotalStoryPoints          float64 `json:"total_story_points,omitempty"`
	Videoconferences          string  `json:"videoconferences,omitempty"`
	VideoconferencesExtraData string  `json:"videoconferences_extra_data,omitempty"`
	ProjectsLIST              *ProjectsList
	ProjectDETAIL             *ProjectDetail
}

Project is a subset of all possible Project type variants

https://taigaio.github.io/taiga-doc/dist/api.html#projects-create

type ProjectDetail

type ProjectDetail struct {
	AnonPermissions           []string                             `json:"anon_permissions"`
	BlockedCode               string                               `json:"blocked_code"`
	CreatedDate               time.Time                            `json:"created_date"`
	CreationTemplate          int                                  `json:"creation_template"`
	DefaultEpicStatus         int                                  `json:"default_epic_status"`
	DefaultIssueStatus        int                                  `json:"default_issue_status"`
	DefaultIssueType          int                                  `json:"default_issue_type"`
	DefaultPoints             float64                              `json:"default_points"`
	DefaultPriority           int                                  `json:"default_priority"`
	DefaultSeverity           int                                  `json:"default_severity"`
	DefaultTaskStatus         int                                  `json:"default_task_status"`
	DefaultUsStatus           int                                  `json:"default_us_status"`
	Description               string                               `json:"description"`
	EpicCustomAttributes      []EpicCustomAttributeDefinition      `json:"epic_custom_attributes"`
	EpicStatuses              []epicStatus                         `json:"epic_statuses"`
	EpicsCsvUUID              string                               `json:"epics_csv_uuid"`
	IAmAdmin                  bool                                 `json:"i_am_admin"`
	IAmMember                 bool                                 `json:"i_am_member"`
	IAmOwner                  bool                                 `json:"i_am_owner"`
	ID                        int                                  `json:"id"`
	IsBacklogActivated        bool                                 `json:"is_backlog_activated"`
	IsContactActivated        bool                                 `json:"is_contact_activated"`
	IsEpicsActivated          bool                                 `json:"is_epics_activated"`
	IsFan                     bool                                 `json:"is_fan"`
	IsFeatured                bool                                 `json:"is_featured"`
	IsIssuesActivated         bool                                 `json:"is_issues_activated"`
	IsKanbanActivated         bool                                 `json:"is_kanban_activated"`
	IsLookingForPeople        bool                                 `json:"is_looking_for_people"`
	IsOutOfOwnerLimits        bool                                 `json:"is_out_of_owner_limits"`
	IsPrivate                 bool                                 `json:"is_private"`
	IsPrivateExtraInfo        IsPrivateExtraInfo                   `json:"is_private_extra_info"`
	IsWatcher                 bool                                 `json:"is_watcher"`
	IsWikiActivated           bool                                 `json:"is_wiki_activated"`
	IssueCustomAttributes     []IssueCustomAttributeDefinition     `json:"issue_custom_attributes"`
	IssueDuedates             []issueDueDate                       `json:"issue_duedates"`
	IssueStatuses             []issueStatus                        `json:"issue_statuses"`
	IssueTypes                []issueType                          `json:"issue_types"`
	IssuesCsvUUID             string                               `json:"issues_csv_uuid"`
	LogoBigURL                string                               `json:"logo_big_url"`
	LogoSmallURL              string                               `json:"logo_small_url"`
	LookingForPeopleNote      string                               `json:"looking_for_people_note"`
	MaxMemberships            int                                  `json:"max_memberships"`
	Members                   []members                            `json:"members"`
	Milestones                []milestone                          `json:"milestones"`
	ModifiedDate              time.Time                            `json:"modified_date"`
	MyHomepage                interface{}                          `json:"my_homepage"`
	MyPermissions             []string                             `json:"my_permissions"`
	Name                      string                               `json:"name"`
	NotifyLevel               int                                  `json:"notify_level"`
	Owner                     Owner                                `json:"owner"`
	Points                    []ProjectPoints                      `json:"points"`
	Priorities                []priority                           `json:"priorities"`
	PublicPermissions         []string                             `json:"public_permissions"`
	Roles                     []roles                              `json:"roles"`
	Severities                []severity                           `json:"severities"`
	Slug                      string                               `json:"slug"`
	Tags                      []string                             `json:"tags"`
	TagsColors                ProjectTagsColors                    `json:"tags_colors"`
	TaskCustomAttributes      []TaskCustomAttributeDefinition      `json:"task_custom_attributes"`
	TaskDuedates              []taskDueDates                       `json:"task_duedates"`
	TaskStatuses              []taskStatus                         `json:"task_statuses"`
	TasksCsvUUID              string                               `json:"tasks_csv_uuid"`
	TotalActivity             int                                  `json:"total_activity"`
	TotalActivityLastMonth    int                                  `json:"total_activity_last_month"`
	TotalActivityLastWeek     int                                  `json:"total_activity_last_week"`
	TotalActivityLastYear     int                                  `json:"total_activity_last_year"`
	TotalClosedMilestones     int                                  `json:"total_closed_milestones"`
	TotalFans                 int                                  `json:"total_fans"`
	TotalFansLastMonth        int                                  `json:"total_fans_last_month"`
	TotalFansLastWeek         int                                  `json:"total_fans_last_week"`
	TotalFansLastYear         int                                  `json:"total_fans_last_year"`
	TotalMemberships          int                                  `json:"total_memberships"`
	TotalMilestones           int                                  `json:"total_milestones"`
	TotalStoryPoints          float64                              `json:"total_story_points"`
	TotalWatchers             int                                  `json:"total_watchers"`
	TotalsUpdatedDatetime     time.Time                            `json:"totals_updated_datetime"`
	TransferToken             string                               `json:"transfer_token"`
	UsDuedates                []userStoryDueDate                   `json:"us_duedates"`
	UsStatuses                []userStoryStatus                    `json:"us_statuses"`
	UserstoriesCsvUUID        string                               `json:"userstories_csv_uuid"`
	UserstoryCustomAttributes []UserStoryCustomAttributeDefinition `json:"userstory_custom_attributes"`
	Videoconferences          string                               `json:"videoconferences"`
	VideoconferencesExtraData string                               `json:"videoconferences_extra_data"`
}

ProjectDetail -> https://taigaio.github.io/taiga-doc/dist/api.html#object-project-detail

func (*ProjectDetail) AsProject

func (p *ProjectDetail) AsProject() (*Project, error)

AsProject packs the returned ProjectDETAIL into a generic Project struct

type ProjectExtraInfo

type ProjectExtraInfo struct {
	ID           int    `json:"id"`
	LogoSmallURL string `json:"logo_small_url"`
	Name         string `json:"name"`
	Slug         string `json:"slug"`
}

ProjectExtraInfo represents a read-only field

type ProjectModulesConfiguration

type ProjectModulesConfiguration struct {
	Bitbucket struct {
		Secret         string   `json:"secret"`
		ValidOriginIps []string `json:"valid_origin_ips"`
		WebhooksURL    string   `json:"webhooks_url"`
	} `json:"bitbucket"`
	Github struct {
		Secret      string `json:"secret"`
		WebhooksURL string `json:"webhooks_url"`
	} `json:"github"`
	Gitlab struct {
		Secret         string   `json:"secret"`
		ValidOriginIps []string `json:"valid_origin_ips"`
		WebhooksURL    string   `json:"webhooks_url"`
	} `json:"gitlab"`
	Gogs struct {
		Secret      string `json:"secret"`
		WebhooksURL string `json:"webhooks_url"`
	} `json:"gogs"`
}

ProjectModulesConfiguration -> https://taigaio.github.io/taiga-doc/dist/api.html#object-project-modules-detail

type ProjectPoints

type ProjectPoints struct {
	Order     int      `json:"order"`
	Name      string   `json:"name"`
	ID        int      `json:"id"`
	ProjectID int      `json:"project_id"`
	Value     *float64 `json:"value"`
}

ProjectPoints represents the registered Agile Points to a project

func (ProjectPoints) IsValueNil

func (pp ProjectPoints) IsValueNil() bool

IsValueNil returns true if ProjectPoints.Value is nil

type ProjectService

type ProjectService struct {

	// defaultProjectID int
	Endpoint string

	Auth      *AuthService
	Epic      *EpicService
	Issue     *IssueService
	Milestone *MilestoneService
	Resolver  *ResolverService
	Stats     *StatsService
	Task      *TaskService
	UserStory *UserStoryService
	User      *UserService
	Webhook   *WebhookService
	Wiki      *WikiService
	// contains filtered or unexported fields
}

ProjectService is a handle to actions related to Projects

https://taigaio.github.io/taiga-doc/dist/api.html#projects

func (*ProjectService) AreMappedServicesConfigured

func (s *ProjectService) AreMappedServicesConfigured() bool

AreMappedServicesConfigured returns true if project-related mapped services have been configured

func (*ProjectService) ConfigureMappedServices

func (s *ProjectService) ConfigureMappedServices(ProjectID int)

ConfigureMappedServices maps all services to the *ProjectService with a selected project preconfigured

func (*ProjectService) Create

func (s *ProjectService) Create(project *Project) (*Project, error)

Create -> https://taigaio.github.io/taiga-doc/dist/api.html#projects-create Required fields: name, description

func (*ProjectService) Delete

func (s *ProjectService) Delete(projectID int) (*http.Response, error)

Delete => https://taigaio.github.io/taiga-doc/dist/api.html#projects-delete

func (*ProjectService) Edit

func (s *ProjectService) Edit(project *Project) (*Project, error)

Edit edits an Project via a PATCH request => https://taigaio.github.io/taiga-doc/dist/api.html#projects-edit Available Meta: ProjectDetail

func (*ProjectService) Get

func (s *ProjectService) Get(projectID int) (*Project, error)

Get -> https://taigaio.github.io/taiga-doc/dist/api.html#projects-get

func (*ProjectService) List

func (s *ProjectService) List(queryParameters *ProjectsQueryParameters) (*ProjectsList, error)

List -> https://taigaio.github.io/taiga-doc/dist/api.html#projects-list

The results can be filtered by passing in a ProjectListQueryFilter struct

type ProjectStatsDetail

type ProjectStatsDetail struct {
	AssignedPoints        float64     `json:"assigned_points"`
	AssignedPointsPerRole AgilePoints `json:"assigned_points_per_role"`
	ClosedPoints          int         `json:"closed_points"`
	ClosedPointsPerRole   struct {
	} `json:"closed_points_per_role"`
	DefinedPoints        float64     `json:"defined_points"`
	DefinedPointsPerRole AgilePoints `json:"defined_points_per_role"`
	Milestones           []struct {
		ClientIncrement int     `json:"client-increment"`
		Evolution       float64 `json:"evolution"`
		Name            string  `json:"name"`
		Optimal         float64 `json:"optimal"`
		TeamIncrement   int     `json:"team-increment"`
	} `json:"milestones"`
	Name            string  `json:"name"`
	Speed           int     `json:"speed"`
	TotalMilestones int     `json:"total_milestones"`
	TotalPoints     float64 `json:"total_points"`
}

ProjectStatsDetail -> https://taigaio.github.io/taiga-doc/dist/api.html#object-project-detail

type ProjectTagsColors

type ProjectTagsColors map[string]string

ProjectTagsColors is a string/string key/value pair to represent project-wide Tag/Colour combinations JSON Representation example:

{
	"tags_colors": {
		"high": "#D35163",
		"normal": "#78D351"
 },
}

type ProjectsList

type ProjectsList []struct {
	IsEpicsActivated          bool              `json:"is_epics_activated"`
	IsIssuesActivated         bool              `json:"is_issues_activated"`
	LogoSmallURL              string            `json:"logo_small_url"`
	LookingForPeopleNote      string            `json:"looking_for_people_note"`
	TotalActivityLastMonth    int               `json:"total_activity_last_month"`
	DefaultEpicStatus         int               `json:"default_epic_status"`
	DefaultSeverity           int               `json:"default_severity"`
	IsKanbanActivated         bool              `json:"is_kanban_activated"`
	Videoconferences          string            `json:"videoconferences"`
	ModifiedDate              time.Time         `json:"modified_date"`
	Name                      string            `json:"name"`
	IsLookingForPeople        bool              `json:"is_looking_for_people"`
	Description               string            `json:"description"`
	TotalClosedMilestones     int               `json:"total_closed_milestones"`
	DefaultUsStatus           int               `json:"default_us_status"`
	TotalFansLastMonth        int               `json:"total_fans_last_month"`
	TotalMilestones           int               `json:"total_milestones"`
	MyPermissions             []string          `json:"my_permissions"`
	Members                   []int             `json:"members"`
	Owner                     Owner             `json:"owner"`
	NotifyLevel               int               `json:"notify_level"`
	TagsColors                ProjectTagsColors `json:"tags_colors"`
	IsWikiActivated           bool              `json:"is_wiki_activated"`
	VideoconferencesExtraData string            `json:"videoconferences_extra_data"`
	CreatedDate               time.Time         `json:"created_date"`
	TotalWatchers             int               `json:"total_watchers"`
	IAmAdmin                  bool              `json:"i_am_admin"`
	DefaultIssueStatus        int               `json:"default_issue_status"`
	CreationTemplate          int               `json:"creation_template"`
	TotalStoryPoints          float64           `json:"total_story_points"`
	AnonPermissions           []string          `json:"anon_permissions"`
	TotalFans                 int               `json:"total_fans"`
	IsBacklogActivated        bool              `json:"is_backlog_activated"`
	ID                        int               `json:"id"`
	BlockedCode               string            `json:"blocked_code"`
	IsPrivate                 bool              `json:"is_private"`
	IsWatcher                 bool              `json:"is_watcher"`
	PublicPermissions         []string          `json:"public_permissions"`
	IsFan                     bool              `json:"is_fan"`
	TotalFansLastWeek         int               `json:"total_fans_last_week"`
	TotalActivityLastYear     int               `json:"total_activity_last_year"`
	DefaultPriority           int               `json:"default_priority"`
	IsContactActivated        bool              `json:"is_contact_activated"`
	Slug                      string            `json:"slug"`
	LogoBigURL                string            `json:"logo_big_url"`
	IsFeatured                bool              `json:"is_featured"`
	IAmOwner                  bool              `json:"i_am_owner"`
	TotalActivityLastWeek     int               `json:"total_activity_last_week"`
	Tags                      []string          `json:"tags"`
	DefaultIssueType          int               `json:"default_issue_type"`
	TotalsUpdatedDatetime     time.Time         `json:"totals_updated_datetime"`
	TotalActivity             int               `json:"total_activity"`
	IAmMember                 bool              `json:"i_am_member"`
	TotalFansLastYear         int               `json:"total_fans_last_year"`
	DefaultPoints             float64           `json:"default_points"`
	DefaultTaskStatus         int               `json:"default_task_status"`
}

ProjectsList -> https://taigaio.github.io/taiga-doc/dist/api.html#object-project-list-entry

func (*ProjectsList) AsProjects

func (p *ProjectsList) AsProjects() ([]Project, error)

AsProjects packs the returned ProjectsLIST into a generic Project []struct

type ProjectsQueryParameters

type ProjectsQueryParameters struct {
	Member             int   `url:"member,omitempty"`
	Members            []int `url:"members,omitempty"`
	IsLookingForPeople bool  `url:"is_looking_for_people,omitempty"`
	IsFeatured         bool  `url:"is_featured,omitempty"`
	IsBacklogActivated bool  `url:"is_backlog_activated,omitempty"`
	IsKanbanActivated  bool  `url:"is_kanban_activated,omitempty"`
	// contains filtered or unexported fields
}

ProjectsQueryParameters holds fields to be used as URL query parameters to filter the queried objects

To set `OrderBy`, use the methods attached to this struct

func (*ProjectsQueryParameters) MembershipsUserOrder

func (queryParams *ProjectsQueryParameters) MembershipsUserOrder()

MembershipsUserOrder => Order by the project order specified by the user

func (*ProjectsQueryParameters) TotalActivity

func (queryParams *ProjectsQueryParameters) TotalActivity()

TotalActivity => Order by number of history entries for the project

func (*ProjectsQueryParameters) TotalActivityLastMonth

func (queryParams *ProjectsQueryParameters) TotalActivityLastMonth()

TotalActivityLastMonth => Order by number of history entries generated in the last month

func (*ProjectsQueryParameters) TotalActivityLastWeek

func (queryParams *ProjectsQueryParameters) TotalActivityLastWeek()

TotalActivityLastWeek => Order by number of history entries generated in the last week

func (*ProjectsQueryParameters) TotalActivityLastYear

func (queryParams *ProjectsQueryParameters) TotalActivityLastYear()

TotalActivityLastYear => Order by number of history entries generated in the last year

func (*ProjectsQueryParameters) TotalFans

func (queryParams *ProjectsQueryParameters) TotalFans()

TotalFans => Order by total fans for the project

func (*ProjectsQueryParameters) TotalFansLastMonth

func (queryParams *ProjectsQueryParameters) TotalFansLastMonth()

TotalFansLastMonth => Order by number of new fans in the last month

func (*ProjectsQueryParameters) TotalFansLastWeek

func (queryParams *ProjectsQueryParameters) TotalFansLastWeek()

TotalFansLastWeek => Order by number of new fans in the last week

func (*ProjectsQueryParameters) TotalFansLastYear

func (queryParams *ProjectsQueryParameters) TotalFansLastYear()

TotalFansLastYear => Order by number of new fans in the last year

type RefreshToken

type RefreshToken struct {
	AuthToken string `json:"auth_token,omitempty"`
	Refresh   string `json:"refresh,omitempty"`
}

type RequestService

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

RequestService is a handle to HTTP request operations

func (*RequestService) Connect

func (s *RequestService) Connect()

Connect a handler for composing a new HTTP CONNECT request

func (*RequestService) Delete

func (s *RequestService) Delete(URL string) (*http.Response, error)

Delete a handler for composing a new HTTP DELETE request

  • URL must be an absolute (full) URL to the desired endpoint

func (*RequestService) Get

func (s *RequestService) Get(URL string, ResponseBody interface{}) (*http.Response, error)

Get a handler for composing a new HTTP GET request

  • URL must be an absolute (full) URL to the desired endpoint
  • ResponseBody must be a pointer to a struct representing the fields returned by Taiga

func (*RequestService) Head

func (s *RequestService) Head()

Head a handler for composing a new HTTP HEAD request

func (*RequestService) Options

func (s *RequestService) Options()

Options a handler for composing a new HTTP OPTIONS request

func (*RequestService) Patch

func (s *RequestService) Patch(URL string, Payload interface{}, ResponseBody interface{}) (*http.Response, error)

Patch a handler for composing a new HTTP PATCH request

  • URL must be an absolute (full) URL to the desired endpoint
  • Payload must be a pointer to a complete struct which will be sent to Taiga
  • ResponseBody must be a pointer to a struct representing the fields returned by Taiga

func (*RequestService) Post

func (s *RequestService) Post(URL string, Payload interface{}, ResponseBody interface{}) (*http.Response, error)

Post a handler for composing a new HTTP POST request

  • URL must be an absolute (full) URL to the desired endpoint
  • Payload must be a pointer to a complete struct which will be sent to Taiga
  • ResponseBody must be a pointer to a struct representing the fields returned by Taiga

func (*RequestService) Put

func (s *RequestService) Put(URL string, Payload interface{}, ResponseBody interface{}) (*http.Response, error)

Put a handler for composing a new HTTP PUT request

  • URL must be an absolute (full) URL to the desired endpoint
  • Payload must be a pointer to a complete struct which will be sent to Taiga
  • ResponseBody must be a pointer to a struct representing the fields returned by Taiga

func (*RequestService) Trace

func (s *RequestService) Trace()

Trace a handler for composing a new HTTP TRACE request

type Resolver

type Resolver struct {
	Project   int `json:"project,omitempty"`
	UserStory int `json:"us,omitempty"`
	Issue     int `json:"issue,omitempty"`
	Task      int `json:"task,omitempty"`
	Milestone int `json:"milestone,omitempty"`
	WikiPage  int `json:"wikipage,omitempty"`
}

Resolver represents all possible response body key/value pairs

type ResolverQueryParams

type ResolverQueryParams struct {
	Project   string `url:"project,omitempty"`
	Issue     int    `url:"issue,omitempty"`
	Task      int    `url:"task,omitempty"`
	Milestone string `url:"milestone,omitempty"`
	WikiPage  string `url:"wikipage,omitempty"`
	US        int    `url:"us,omitempty"` // UserStory
}

ResolverQueryParams holds fields to be used as URL query parameters to filter the queried objects

type ResolverService

type ResolverService struct {
	Endpoint string
	// contains filtered or unexported fields
}

ResolverService is a handle to actions related to Resolver

https://taigaio.github.io/taiga-doc/dist/api.html#resolver

func (*ResolverService) ResolveIssue

func (s *ResolverService) ResolveIssue(queryParameters *ResolverQueryParams) (*Resolver, error)

ResolveIssue => https://taigaio.github.io/taiga-doc/dist/api.html#resolver-issues

func (*ResolverService) ResolveMilestone

func (s *ResolverService) ResolveMilestone(queryParameters *ResolverQueryParams) (*Resolver, error)

ResolveMilestone => https://taigaio.github.io/taiga-doc/dist/api.html#resolver-milestones

func (*ResolverService) ResolveMultipleObjects

func (s *ResolverService) ResolveMultipleObjects(queryParameters *ResolverQueryParams) (*Resolver, error)

ResolveMultipleObjects => https://taigaio.github.io/taiga-doc/dist/api.html#resolver-multiple-resolution

func (*ResolverService) ResolveProject

func (s *ResolverService) ResolveProject(queryParameters *ResolverQueryParams) (*Resolver, error)

ResolveProject => https://taigaio.github.io/taiga-doc/dist/api.html#resolver-projects

func (*ResolverService) ResolveTask

func (s *ResolverService) ResolveTask(queryParameters *ResolverQueryParams) (*Resolver, error)

ResolveTask => https://taigaio.github.io/taiga-doc/dist/api.html#resolver-tasks

func (*ResolverService) ResolveUserStory

func (s *ResolverService) ResolveUserStory(queryParameters *ResolverQueryParams) (*Resolver, error)

ResolveUserStory => https://taigaio.github.io/taiga-doc/dist/api.html#resolver-user-stories

func (*ResolverService) ResolveWikiPage

func (s *ResolverService) ResolveWikiPage(queryParameters *ResolverQueryParams) (*Resolver, error)

ResolveWikiPage => https://taigaio.github.io/taiga-doc/dist/api.html#resolver-wiki-pages

type StatsService

type StatsService struct {
	Endpoint string
	// contains filtered or unexported fields
}

StatsService is a handle to Stats operations -> https://taigaio.github.io/taiga-doc/dist/api.html#stats

func (*StatsService) GetDiscoverStats

func (s *StatsService) GetDiscoverStats() (*DiscoverStats, error)

GetDiscoverStats => https://taigaio.github.io/taiga-doc/dist/api.html#discover-stats

func (*StatsService) GetSystemStats

func (s *StatsService) GetSystemStats() (*SystemStats, error)

GetSystemStats => https://taigaio.github.io/taiga-doc/dist/api.html#system-stats

type StatusExtraInfo

type StatusExtraInfo struct {
	Color    string `json:"color"`
	IsClosed bool   `json:"is_closed"`
	Name     string `json:"name"`
}

StatusExtraInfo is a read-only field

type SystemStats

type SystemStats struct {
	Projects struct {
		AverageLastFiveWorkingDays  float64 `json:"average_last_five_working_days"`
		AverageLastSevenDays        float64 `json:"average_last_seven_days"`
		PercentWithBacklog          float64 `json:"percent_with_backlog"`
		PercentWithBacklogAndKanban float64 `json:"percent_with_backlog_and_kanban"`
		PercentWithKanban           float64 `json:"percent_with_kanban"`
		Today                       int     `json:"today"`
		Total                       int     `json:"total"`
		TotalWithBacklog            int     `json:"total_with_backlog"`
		TotalWithBacklogAndKanban   int     `json:"total_with_backlog_and_kanban"`
		TotalWithKanban             int     `json:"total_with_kanban"`
	} `json:"projects"`
	Users struct {
		AverageLastFiveWorkingDays float64        `json:"average_last_five_working_days"`
		AverageLastSevenDays       float64        `json:"average_last_seven_days"`
		CountsLastYearPerWeek      map[string]int `json:"counts_last_year_per_week"`
		Today                      int            `json:"today"`
		Total                      int            `json:"total"`
	} `json:"users"`
	Userstories struct {
		AverageLastFiveWorkingDays float64 `json:"average_last_five_working_days"`
		AverageLastSevenDays       float64 `json:"average_last_seven_days"`
		Today                      int     `json:"today"`
		Total                      int     `json:"total"`
	} `json:"userstories"`
}

SystemStats => https://taigaio.github.io/taiga-doc/dist/api.html#object-system-stats

type Tags

type Tags [][]string

Tags represent the tags slice of respective Taiga object

type TagsColors

type TagsColors struct {
	Color string `json:"color"`
	Name  string `json:"name"`
}

TagsColors represent color code and color name combinations for a tag

type TaigaBaseObject

type TaigaBaseObject interface {
	GetID() int
	GetRef() int
	GetVersion() int
	GetSubject() string
	GetProject() int
}

TaigaBaseObject represents the following Taiga object types:

* Epic * User Story * Task * Issue

These Taiga objects have the following must-have fields in common: * ID * Ref * Version * Subject * Project

type Task

type Task struct {
	TaigaBaseObject
	ID                int
	AssignedTo        int         `json:"assigned_to,omitempty"`
	BlockedNote       string      `json:"blocked_note,omitempty"`
	Description       string      `json:"description,omitempty"`
	ExternalReference interface{} `json:"external_reference,omitempty"`
	IsBlocked         bool        `json:"is_blocked,omitempty"`
	IsClosed          bool        `json:"is_closed,omitempty"`
	IsIocaine         bool        `json:"is_iocaine,omitempty"`
	Milestone         int         `json:"milestone,omitempty"`
	Project           int         `json:"project,omitempty"`
	Ref               int
	Status            int      `json:"status,omitempty"`
	Subject           string   `json:"subject,omitempty"`
	Tags              []string `json:"tags,omitempty"`
	TaskboardOrder    int      `json:"taskboard_order,omitempty"`
	UsOrder           int      `json:"us_order,omitempty"`
	UserStory         int      `json:"user_story,omitempty"`
	Version           int
	Watchers          []int `json:"watchers,omitempty"`
	TaskDetail        *TaskDetail
	TaskDetailGET     *TaskDetailGET
	TaskDetailLIST    *TaskDetailLIST
}

Task represents a subset of (TaskDetail, TaskDetailGET, TaskDetailLIST)

func (*Task) GetID

func (t *Task) GetID() int

GetID returns the ID

func (*Task) GetProject

func (t *Task) GetProject() int

GetProject returns the project ID

func (*Task) GetRef

func (t *Task) GetRef() int

GetRef returns the Ref

func (*Task) GetSubject

func (t *Task) GetSubject() string

GetSubject returns the subject

func (*Task) GetVersion

func (t *Task) GetVersion() int

GetVersion return the version

type TaskCustomAttribValues

type TaskCustomAttribValues struct {
	TgObjCAVDBase
	Epic int `json:"epic,omitempty"`
}

TaskCustomAttribValues -> http://taigaio.github.io/taiga-doc/dist/api.html#object-epic-custom-attributes-values-detail You must populate TgObjCAVDBase.AttributesValues with your custom struct representing the actual CAVD

type TaskCustomAttribute

type TaskCustomAttribute struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	ProjectID    int         `json:"project_id"`
	Type         string      `json:"type"`
}

TaskCustomAttribute -> https://taigaio.github.io/taiga-doc/dist/api.html#task-custom-attributes

type TaskCustomAttributeDefinition

type TaskCustomAttributeDefinition struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	ProjectID    int         `json:"project_id"`
	Type         string      `json:"type"`
}

TaskCustomAttributeDefinition != TaskCustomAttribute

type TaskDetail

type TaskDetail struct {
	AssignedTo           int                       `json:"assigned_to,omitempty"`
	AssignedToExtraInfo  AssignedToExtraInfo       `json:"assigned_to_extra_info,omitempty"`
	Attachments          []GenericObjectAttachment `json:"attachments,omitempty"`
	BlockedNote          string                    `json:"blocked_note,omitempty"`
	BlockedNoteHTML      string                    `json:"blocked_note_html,omitempty"`
	Comment              string                    `json:"comment,omitempty"`
	CreatedDate          time.Time                 `json:"created_date,omitempty"`
	Description          string                    `json:"description,omitempty"`
	DescriptionHTML      string                    `json:"description_html,omitempty"`
	DueDate              string                    `json:"due_date,omitempty"`
	DueDateReason        string                    `json:"due_date_reason,omitempty"`
	DueDateStatus        string                    `json:"due_date_status,omitempty"`
	ExternalReference    interface{}               `json:"external_reference,omitempty"`
	FinishedDate         time.Time                 `json:"finished_date,omitempty"`
	GeneratedUserStories interface{}               `json:"generated_user_stories,omitempty"`
	ID                   int                       `json:"id,omitempty"`
	IsBlocked            bool                      `json:"is_blocked,omitempty"`
	IsClosed             bool                      `json:"is_closed,omitempty"`
	IsIocaine            bool                      `json:"is_iocaine,omitempty"`
	IsVoter              bool                      `json:"is_voter,omitempty"`
	IsWatcher            bool                      `json:"is_watcher,omitempty"`
	Milestone            int                       `json:"milestone,omitempty"`
	MilestoneSlug        string                    `json:"milestone_slug,omitempty"`
	ModifiedDate         time.Time                 `json:"modified_date,omitempty"`
	Neighbors            struct {
		Next struct {
			ID      int    `json:"id,omitempty"`
			Ref     int    `json:"ref,omitempty"`
			Subject string `json:"subject,omitempty"`
		} `json:"next,omitempty"`
		Previous Previous `json:"previous,omitempty"`
	} `json:"neighbors,omitempty"`
	Owner              int                `json:"owner,omitempty"`
	OwnerExtraInfo     OwnerExtraInfo     `json:"owner_extra_info,omitempty"`
	Project            int                `json:"project,omitempty"`
	ProjectExtraInfo   ProjectExtraInfo   `json:"project_extra_info,omitempty"`
	Ref                int                `json:"ref,omitempty"`
	Status             int                `json:"status,omitempty"`
	StatusExtraInfo    StatusExtraInfo    `json:"status_extra_info,omitempty"`
	Subject            string             `json:"subject,omitempty"`
	Tags               Tags               `json:"tags,omitempty"`
	TaskboardOrder     int64              `json:"taskboard_order,omitempty"`
	TotalComments      int                `json:"total_comments,omitempty"`
	TotalVoters        int                `json:"total_voters,omitempty"`
	TotalWatchers      int                `json:"total_watchers,omitempty"`
	UsOrder            int64              `json:"us_order,omitempty"`
	UserStory          int                `json:"user_story,omitempty"`
	UserStoryExtraInfo UserStoryExtraInfo `json:"user_story_extra_info,omitempty"`
	Version            int                `json:"version,omitempty"`
	Watchers           []int              `json:"watchers,omitempty"`
}

TaskDetail => https://taigaio.github.io/taiga-doc/dist/api.html#object-task-detail

func (*TaskDetail) AsTask

func (t *TaskDetail) AsTask() (*Task, error)

AsTask packs the returned TaskDetail into a generic Task struct

type TaskDetailGET

type TaskDetailGET struct {
	AssignedTo           int                       `json:"assigned_to,omitempty"`
	AssignedToExtraInfo  AssignedToExtraInfo       `json:"assigned_to_extra_info,omitempty"`
	Attachments          []GenericObjectAttachment `json:"attachments,omitempty"`
	BlockedNote          string                    `json:"blocked_note,omitempty"`
	BlockedNoteHTML      string                    `json:"blocked_note_html,omitempty"`
	Comment              string                    `json:"comment,omitempty"`
	CreatedDate          time.Time                 `json:"created_date,omitempty"`
	Description          string                    `json:"description,omitempty"`
	DescriptionHTML      string                    `json:"description_html,omitempty"`
	DueDate              string                    `json:"due_date,omitempty"`
	DueDateReason        string                    `json:"due_date_reason,omitempty"`
	DueDateStatus        string                    `json:"due_date_status,omitempty"`
	ExternalReference    interface{}               `json:"external_reference,omitempty"`
	FinishedDate         time.Time                 `json:"finished_date,omitempty"`
	GeneratedUserStories interface{}               `json:"generated_user_stories,omitempty"`
	ID                   int                       `json:"id,omitempty"`
	IsBlocked            bool                      `json:"is_blocked,omitempty"`
	IsClosed             bool                      `json:"is_closed,omitempty"`
	IsIocaine            bool                      `json:"is_iocaine,omitempty"`
	IsVoter              bool                      `json:"is_voter,omitempty"`
	IsWatcher            bool                      `json:"is_watcher,omitempty"`
	Milestone            int                       `json:"milestone,omitempty"`
	MilestoneSlug        string                    `json:"milestone_slug,omitempty"`
	ModifiedDate         time.Time                 `json:"modified_date,omitempty"`
	Neighbors            Neighbors                 `json:"neighbors,omitempty"`
	Owner                int                       `json:"owner,omitempty"`
	OwnerExtraInfo       OwnerExtraInfo            `json:"owner_extra_info,omitempty"`
	Project              int                       `json:"project,omitempty"`
	ProjectExtraInfo     ProjectExtraInfo          `json:"project_extra_info,omitempty"`
	Ref                  int                       `json:"ref,omitempty"`
	Status               int                       `json:"status,omitempty"`
	StatusExtraInfo      StatusExtraInfo           `json:"status_extra_info,omitempty"`
	Subject              string                    `json:"subject,omitempty"`
	Tags                 Tags                      `json:"tags,omitempty"`
	TaskboardOrder       int64                     `json:"taskboard_order,omitempty"`
	TotalComments        int                       `json:"total_comments,omitempty"`
	TotalVoters          int                       `json:"total_voters,omitempty"`
	TotalWatchers        int                       `json:"total_watchers,omitempty"`
	UsOrder              int64                     `json:"us_order,omitempty"`
	UserStory            int                       `json:"user_story,omitempty"`
	UserStoryExtraInfo   UserStoryExtraInfo        `json:"user_story_extra_info,omitempty"`
	Version              int                       `json:"version,omitempty"`
	Watchers             []int                     `json:"watchers,omitempty"`
}

TaskDetailGET => https://taigaio.github.io/taiga-doc/dist/api.html#object-task-detail-get

func (*TaskDetailGET) AsTask

func (t *TaskDetailGET) AsTask() (*Task, error)

AsTask packs the returned TaskDetailGET into a generic Task struct

type TaskDetailLIST

type TaskDetailLIST []struct {
	AssignedTo          int                       `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo       `json:"assigned_to_extra_info,omitempty"`
	Attachments         []GenericObjectAttachment `json:"attachments,omitempty"`
	BlockedNote         string                    `json:"blocked_note,omitempty"`
	CreatedDate         time.Time                 `json:"created_date,omitempty"`
	DueDate             string                    `json:"due_date,omitempty"`
	DueDateReason       string                    `json:"due_date_reason,omitempty"`
	DueDateStatus       string                    `json:"due_date_status,omitempty"`
	ExternalReference   interface{}               `json:"external_reference,omitempty"`
	FinishedDate        time.Time                 `json:"finished_date,omitempty"`
	ID                  int                       `json:"id,omitempty"`
	IsBlocked           bool                      `json:"is_blocked,omitempty"`
	IsClosed            bool                      `json:"is_closed,omitempty"`
	IsIocaine           bool                      `json:"is_iocaine,omitempty"`
	IsVoter             bool                      `json:"is_voter,omitempty"`
	IsWatcher           bool                      `json:"is_watcher,omitempty"`
	Milestone           int                       `json:"milestone,omitempty"`
	MilestoneSlug       string                    `json:"milestone_slug,omitempty"`
	ModifiedDate        time.Time                 `json:"modified_date,omitempty"`
	Owner               int                       `json:"owner,omitempty"`
	OwnerExtraInfo      OwnerExtraInfo            `json:"owner_extra_info,omitempty"`
	Project             int                       `json:"project,omitempty"`
	ProjectExtraInfo    ProjectExtraInfo          `json:"project_extra_info,omitempty"`
	Ref                 int                       `json:"ref,omitempty"`
	Status              int                       `json:"status,omitempty"`
	StatusExtraInfo     StatusExtraInfo           `json:"status_extra_info,omitempty"`
	Subject             string                    `json:"subject,omitempty"`
	Tags                Tags                      `json:"tags,omitempty"`
	TaskboardOrder      int64                     `json:"taskboard_order,omitempty"`
	TotalComments       int                       `json:"total_comments,omitempty"`
	TotalVoters         int                       `json:"total_voters,omitempty"`
	TotalWatchers       int                       `json:"total_watchers,omitempty"`
	UsOrder             int64                     `json:"us_order,omitempty"`
	UserStory           int                       `json:"user_story,omitempty"`
	UserStoryExtraInfo  UserStoryExtraInfo        `json:"user_story_extra_info,omitempty"`
	Version             int                       `json:"version,omitempty"`
	Watchers            []int                     `json:"watchers,omitempty"`
}

TaskDetailLIST => https://taigaio.github.io/taiga-doc/dist/api.html#object-task-detail-list

func (*TaskDetailLIST) AsTasks

func (t *TaskDetailLIST) AsTasks() ([]Task, error)

AsTasks packs the returned TaskDetailLIST into a generic Task struct

type TaskService

type TaskService struct {
	Endpoint string
	// contains filtered or unexported fields
}

TaskService is a handle to actions related to Tasks

https://taigaio.github.io/taiga-doc/dist/api.html#tasks

func (*TaskService) Create

func (s *TaskService) Create(task *Task) (*Task, error)

Create creates a new Task | https://taigaio.github.io/taiga-doc/dist/api.html#tasks-create Meta Available: *TaskDetail

func (*TaskService) CreateAttachment

func (s *TaskService) CreateAttachment(attachment *Attachment, task *Task) (*Attachment, error)

CreateAttachment creates a new Task attachment => https://taigaio.github.io/taiga-doc/dist/api.html#tasks-create-attachment

func (*TaskService) Get

func (s *TaskService) Get(task *Task) (*Task, error)

Get => https://taigaio.github.io/taiga-doc/dist/api.html#tasks-get

func (*TaskService) GetAttachment

func (s *TaskService) GetAttachment(attachmentID int) (*Attachment, error)

GetAttachment retrives a Task attachment by its ID => https://taigaio.github.io/taiga-doc/dist/api.html#tasks-get-attachment

func (*TaskService) GetByRef

func (s *TaskService) GetByRef(task *Task, project *Project) (*Task, error)

GetByRef => https://taigaio.github.io/taiga-doc/dist/api.html#tasks-get-by-ref

func (*TaskService) List

func (s *TaskService) List(queryParams *TasksQueryParams) ([]Task, error)

List => https://taigaio.github.io/taiga-doc/dist/api.html#tasks-list

func (*TaskService) ListAttachments

func (s *TaskService) ListAttachments(task interface{}) ([]Attachment, error)

ListAttachments returns a list of Task attachments => https://taigaio.github.io/taiga-doc/dist/api.html#tasks-list-attachments

type TaskStatus

type TaskStatus struct {
	Color     string `json:"color"`
	ID        int    `json:"id"`
	IsClosed  bool   `json:"is_closed"`
	Name      string `json:"name"`
	Order     int    `json:"order"`
	ProjectID int    `json:"project_id"`
	Slug      string `json:"slug"`
}

TaskStatus -> https://taigaio.github.io/taiga-doc/dist/api.html#task-statuses

type TaskVoterDetail

type TaskVoterDetail struct {
	FullName string `json:"full_name,omitempty"`
	ID       int    `json:"id,omitempty"`
	Username string `json:"username,omitempty"`
}

TaskVoterDetail => https://taigaio.github.io/taiga-doc/dist/api.html#object-task-voter-detail

type TasksQueryParams

type TasksQueryParams struct {
	Project            int      `url:"project,omitempty"`
	Status             int      `url:"status,omitempty"`
	Tags               []string `url:"tags,omitempty"`
	UserStory          int      `url:"user_story,omitempty"`
	Role               int      `url:"role,omitempty"`
	Owner              int      `url:"owner,omitempty"`
	Milestone          int      `url:"milestone,omitempty"`
	Watchers           int      `url:"watchers,omitempty"`
	AssignedTo         int      `url:"assigned_to,omitempty"`
	StatusIsClosed     bool     `url:"status__is_closed,omitempty"`
	ExcludeStatus      int      `url:"exclude_status,omitempty"`
	ExcludeTags        int      `url:"exclude_tags,omitempty"`
	ExcludeRole        int      `url:"exclude_role,omitempty"`
	ExcludeOwner       int      `url:"exclude_owner,omitempty"`
	ExcludeAssignedTo  int      `url:"exclude_assigned_to,omitempty"`
	IncludeAttachments bool     `url:"include_attachments,omitempty"`
}

TasksQueryParams holds fields to be used as URL query parameters to filter the queried objects

To set `OrderBy`, use the methods attached to this struct

type TgObjCAVDBase

type TgObjCAVDBase struct {
	AttributesValues TgObjectCAVD `json:"attributes_values,omitempty"`
	Version          int          `json:"version,omitempty"`
}

TgObjCAVDBase is the bare minimum for all tgCustomAttributeValue structs

type TgObjectCAVD

type TgObjectCAVD map[string]interface{}

TgObjectCAVD is the default type for object custom attribute values

type TribeGig

type TribeGig struct {
	ID    int    `json:"id"`
	Title string `json:"title"`
}

TribeGig represents a Tribe Gig object (implied by https://github.com/taigaio/taiga-back/blob/fca65ef7ebe56658a558bb253076eecc2e027f9d/tests/integration/test_userstories.py#L1377)

type User

type User struct {
	AcceptedTerms                 bool      `json:"accepted_terms,omitempty"`
	BigPhoto                      string    `json:"big_photo,omitempty"`
	Bio                           string    `json:"bio,omitempty"`
	Color                         string    `json:"color,omitempty"`
	DateJoined                    time.Time `json:"date_joined,omitempty"`
	Email                         string    `json:"email,omitempty"`
	FullName                      string    `json:"full_name,omitempty"`
	FullNameDisplay               string    `json:"full_name_display,omitempty"`
	GravatarID                    string    `json:"gravatar_id,omitempty"`
	ID                            int       `json:"id,omitempty"`
	IsActive                      bool      `json:"is_active,omitempty"`
	Lang                          string    `json:"lang,omitempty"`
	MaxMembershipsPrivateProjects int       `json:"max_memberships_private_projects,omitempty"`
	MaxMembershipsPublicProjects  int       `json:"max_memberships_public_projects,omitempty"`
	MaxPrivateProjects            int       `json:"max_private_projects,omitempty"`
	MaxPublicProjects             int       `json:"max_public_projects,omitempty"`
	Photo                         string    `json:"photo,omitempty"`
	ReadNewTerms                  bool      `json:"read_new_terms,omitempty"`
	Roles                         []string  `json:"roles,omitempty"`
	Theme                         string    `json:"theme,omitempty"`
	Timezone                      string    `json:"timezone,omitempty"`
	TotalPrivateProjects          int       `json:"total_private_projects,omitempty"`
	TotalPublicProjects           int       `json:"total_public_projects,omitempty"`
	Username                      string    `json:"username,omitempty"`
	UUID                          string    `json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

User represents User detail | https://taigaio.github.io/taiga-doc/dist/api.html#object-user-detail

func (User) GetToken

func (u User) GetToken() string

GetToken returns the token string embedded into User

type UserAuthenticationDetail

type UserAuthenticationDetail struct {
	AuthToken string `json:"auth_token"`
	Refresh   string `json:"refresh"`
	User             // Embedding type User struct
}

UserAuthenticationDetail is a superset of User extended by an AuthToken field

func (*UserAuthenticationDetail) AsUser

func (u *UserAuthenticationDetail) AsUser() *User

AsUser returns a *User from *UserAuthenticationDetail

The AuthToken can be accessed from `User` via `.GetToken()`

type UserContactDetail

type UserContactDetail struct {
	BigPhoto        string   `json:"big_photo,omitempty"`
	Bio             string   `json:"bio,omitempty"`
	Color           string   `json:"color,omitempty"`
	FullName        string   `json:"full_name,omitempty"`
	FullNameDisplay string   `json:"full_name_display,omitempty"`
	GravatarID      string   `json:"gravatar_id,omitempty"`
	ID              int      `json:"id,omitempty"`
	IsActive        bool     `json:"is_active,omitempty"`
	Lang            string   `json:"lang,omitempty"`
	Photo           string   `json:"photo,omitempty"`
	Roles           []string `json:"roles,omitempty"`
	Theme           string   `json:"theme,omitempty"`
	Timezone        string   `json:"timezone,omitempty"`
	Username        string   `json:"username,omitempty"`
}

UserContactDetail represents User contact detail | https://taigaio.github.io/taiga-doc/dist/api.html#object-contact-detail

type UserLiked

type UserLiked struct {
	AssignedTo          int                 `json:"assigned_to"`
	AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info"`
	CreatedDate         time.Time           `json:"created_date"`
	Description         string              `json:"description"`
	ID                  int                 `json:"id"`
	IsFan               bool                `json:"is_fan"`
	IsPrivate           bool                `json:"is_private"`
	IsWatcher           bool                `json:"is_watcher"`
	LogoSmallURL        string              `json:"logo_small_url"`
	Name                string              `json:"name"`
	Project             int                 `json:"project"`
	ProjectBlockedCode  string              `json:"project_blocked_code"`
	ProjectIsPrivate    bool                `json:"project_is_private"`
	ProjectName         string              `json:"project_name"`
	ProjectSlug         string              `json:"project_slug"`
	Ref                 int                 `json:"ref"`
	Slug                string              `json:"slug"`
	Status              int                 `json:"status"`
	StatusColor         string              `json:"status_color"`
	Subject             string              `json:"subject"`
	TagsColors          []TagsColors        `json:"tags_colors,omitempty"`
	TotalFans           int                 `json:"total_fans"`
	TotalWatchers       int                 `json:"total_watchers"`
	Type                string              `json:"type"`
}

UserLiked => https://taigaio.github.io/taiga-doc/dist/api.html#object-liked-detail

type UserService

type UserService struct {
	Endpoint string
	// contains filtered or unexported fields
}

UserService is a handle to actions related to Users

https://taigaio.github.io/taiga-doc/dist/api.html#users

func (*UserService) Delete

func (s *UserService) Delete(userID int) error

Delete => https://taigaio.github.io/taiga-doc/dist/api.html#users-delete

func (*UserService) Edit

func (s *UserService) Edit(user *User) (*User, error)

Edit sends a PATCH request to edit a user https://taigaio.github.io/taiga-doc/dist/api.html#users-edit

func (*UserService) Get

func (s *UserService) Get(userID int) (*User, error)

Get => https://taigaio.github.io/taiga-doc/dist/api.html#users-get

func (*UserService) GetLikedContent

func (s *UserService) GetLikedContent(userID int) (*UserLiked, error)

GetLikedContent => https://taigaio.github.io/taiga-doc/dist/api.html#users-liked

TODO: Implement query param filtering

func (*UserService) GetStats

func (s *UserService) GetStats(userID int) (*UserStatsDetail, error)

GetStats => https://taigaio.github.io/taiga-doc/dist/api.html#users-stats

func (*UserService) GetWatchedContent

func (s *UserService) GetWatchedContent(userID int) (*UserWatched, error)

GetWatchedContent => https://taigaio.github.io/taiga-doc/dist/api.html#users-watched

TODO: Implement query param filtering

func (*UserService) List

func (s *UserService) List(queryParams *UsersQueryParams) ([]User, error)

List => https://taigaio.github.io/taiga-doc/dist/api.html#users-list

type UserStatsDetail

type UserStatsDetail struct {
	Roles                     []string `json:"roles,omitempty"`
	TotalNumClosedUserstories int      `json:"total_num_closed_userstories,omitempty"`
	TotalNumContacts          int      `json:"total_num_contacts,omitempty"`
	TotalNumProjects          int      `json:"total_num_projects,omitempty"`
}

UserStatsDetail represents User stats detail | https://taigaio.github.io/taiga-doc/dist/api.html#object-user-stats-detail

type UserStoriesCounts

type UserStoriesCounts struct {
	Progress int `json:"progress,omitempty"`
	Total    int `json:"total,omitempty"`
}

UserStoriesCounts represents the number of userStories

type UserStory

type UserStory struct {
	TaigaBaseObject
	ID                  int         `json:"id,omitempty"`
	Ref                 int         `json:"ref,omitempty"`
	Version             int         `json:"version,omitempty"`
	AssignedTo          int         `json:"assigned_to,omitempty"`
	BacklogOrder        int64       `json:"backlog_order,omitempty"`
	BlockedNote         string      `json:"blocked_note,omitempty"`
	ClientRequirement   bool        `json:"client_requirement,omitempty"`
	Description         string      `json:"description,omitempty"`
	IsBlocked           bool        `json:"is_blocked,omitempty"`
	IsClosed            bool        `json:"is_closed,omitempty"`
	KanbanOrder         int64       `json:"kanban_order,omitempty"`
	Milestone           int         `json:"milestone,omitempty"`
	Points              AgilePoints `json:"points,omitempty"`
	Project             int         `json:"project"`
	SprintOrder         int         `json:"sprint_order,omitempty"`
	Status              int         `json:"status,omitempty"`
	Subject             string      `json:"subject"`
	Tags                [][]string  `json:"tags,omitempty"`
	TeamRequirement     bool        `json:"team_requirement,omitempty"`
	Watchers            []int       `json:"watchers,omitempty"`
	UserStoryDetail     *UserStoryDetail
	UserStoryDetailGET  *UserStoryDetailGET
	UserStoryDetailLIST *UserStoryDetailLIST
}

UserStory represents a subset of (UserStoryDetail, UserStoryDetailGET, UserStoryDetailLIST) structs for creating new objects

func (*UserStory) CloneUserStory

func (us *UserStory) CloneUserStory(client *Client) (*UserStory, error)

CloneUserStory clones an existing UserStory with most fields Available Meta: UserStoryDetail

func (*UserStory) CreateRelatedTask

func (us *UserStory) CreateRelatedTask(client *Client, task Task) (*Task, error)

CreateRelatedTask creates a Task related to a UserStory Available Meta: *TaskDetail

func (*UserStory) GetID

func (us *UserStory) GetID() int

GetID returns the ID

func (*UserStory) GetProject

func (us *UserStory) GetProject() int

GetProject returns the project ID

func (*UserStory) GetRef

func (us *UserStory) GetRef() int

GetRef returns the Ref

func (*UserStory) GetRelatedTasks

func (us *UserStory) GetRelatedTasks(client *Client) ([]Task, error)

GetRelatedTasks returns all Tasks related to this UserStory

func (*UserStory) GetSubject

func (us *UserStory) GetSubject() string

GetSubject returns the subject

func (*UserStory) GetVersion

func (us *UserStory) GetVersion() int

GetVersion return the version

func (*UserStory) ListRelatedTasks

func (us *UserStory) ListRelatedTasks(client *Client, userStoryID int) ([]Task, error)

ListRelatedTasks returns all Tasks related to this UserStory

func (*UserStory) RelateToEpic

func (us *UserStory) RelateToEpic(client *Client, epicID int) (*EpicRelatedUserStoryDetail, error)

RelateToEpic relates the UserStory to an Epic via an EpicID

TaigaClient must be a pointer to taiga.Client EpicID must be an int to desired Epic

type UserStoryCustomAttribValues

type UserStoryCustomAttribValues struct {
	TgObjCAVDBase
	Epic int `json:"epic,omitempty"`
}

UserStoryCustomAttribValues -> http://taigaio.github.io/taiga-doc/dist/api.html#object-epic-custom-attributes-values-detail You must populate TgObjCAVDBase.AttributesValues with your custom struct representing the actual CAVD

type UserStoryCustomAttribute

type UserStoryCustomAttribute struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	ProjectID    int         `json:"project_id"`
	Type         string      `json:"type"`
}

UserStoryCustomAttribute -> https://taigaio.github.io/taiga-doc/dist/api.html#user-story-custom-attributes-list

type UserStoryCustomAttributeDefinition

type UserStoryCustomAttributeDefinition struct {
	CreatedDate  time.Time   `json:"created_date"`
	Description  string      `json:"description"`
	Extra        interface{} `json:"extra"`
	ID           int         `json:"id"`
	ModifiedDate time.Time   `json:"modified_date"`
	Name         string      `json:"name"`
	Order        int         `json:"order"`
	ProjectID    int         `json:"project_id"`
	Type         string      `json:"type"`
}

UserStoryCustomAttributeDefinition != UserStoryCustomAttribute

type UserStoryDetail

type UserStoryDetail struct {
	AssignedTo          int                       `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo       `json:"assigned_to_extra_info,omitempty"`
	AssignedUsers       []int                     `json:"assigned_users,omitempty"`
	Attachments         []GenericObjectAttachment `json:"attachments,omitempty"`
	BacklogOrder        int64                     `json:"backlog_order,omitempty"`
	BlockedNote         string                    `json:"blocked_note,omitempty"`
	BlockedNoteHTML     string                    `json:"blocked_note_html,omitempty"`
	ClientRequirement   bool                      `json:"client_requirement,omitempty"`
	Comment             string                    `json:"comment,omitempty"`
	CreatedDate         time.Time                 `json:"created_date,omitempty"`
	Description         string                    `json:"description,omitempty"`
	DescriptionHTML     string                    `json:"description_html,omitempty"`
	DueDate             string                    `json:"due_date,omitempty"`
	DueDateReason       string                    `json:"due_date_reason,omitempty"`
	DueDateStatus       string                    `json:"due_date_status,omitempty"`
	EpicOrder           int                       `json:"epic_order,omitempty"`
	Epics               []EpicMinimal             `json:"epics,omitempty"`
	ExternalReference   interface{}               `json:"external_reference,omitempty"`
	FinishDate          string                    `json:"finish_date,omitempty"`
	GeneratedFromIssue  int                       `json:"generated_from_issue,omitempty"`
	GeneratedFromTask   int                       `json:"generated_from_task,omitempty"`
	ID                  int                       `json:"id,omitempty"`
	IsBlocked           bool                      `json:"is_blocked,omitempty"`
	IsClosed            bool                      `json:"is_closed,omitempty"`
	IsVoter             bool                      `json:"is_voter,omitempty"`
	IsWatcher           bool                      `json:"is_watcher,omitempty"`
	KanbanOrder         int64                     `json:"kanban_order,omitempty"`
	Milestone           int                       `json:"milestone,omitempty"`
	MilestoneName       string                    `json:"milestone_name,omitempty"`
	MilestoneSlug       string                    `json:"milestone_slug,omitempty"`
	ModifiedDate        time.Time                 `json:"modified_date,omitempty"`
	Neighbors           struct {
		Next struct {
			ID      int    `json:"id,omitempty"`
			Ref     int    `json:"ref,omitempty"`
			Subject string `json:"subject,omitempty"`
		} `json:"next,omitempty"`
		Previous struct {
			ID      int    `json:"id,omitempty"`
			Ref     int    `json:"ref,omitempty"`
			Subject string `json:"subject,omitempty"`
		} `json:"previous,omitempty"`
	} `json:"neighbors,omitempty"`
	OriginIssue      *UserStoryOrigin      `json:"origin_issue,omitempty"`
	OriginTask       *UserStoryOrigin      `json:"origin_task,omitempty"`
	Owner            int                   `json:"owner,omitempty"`
	OwnerExtraInfo   OwnerExtraInfo        `json:"owner_extra_info,omitempty"`
	Points           AgilePoints           `json:"points,omitempty"`
	Project          int                   `json:"project"`
	ProjectExtraInfo ProjectExtraInfo      `json:"project_extra_info,omitempty"`
	Ref              int                   `json:"ref,omitempty"`
	SprintOrder      int                   `json:"sprint_order,omitempty"`
	Status           int                   `json:"status,omitempty"`
	StatusExtraInfo  StatusExtraInfo       `json:"status_extra_info,omitempty"`
	Subject          string                `json:"subject"`
	Tags             Tags                  `json:"tags,omitempty"`
	Tasks            []UserStoryNestedTask `json:"tasks"`
	TeamRequirement  bool                  `json:"team_requirement,omitempty"`
	TotalAttachments int                   `json:"total_attachments,omitempty"`
	TotalComments    int                   `json:"total_comments,omitempty"`
	TotalPoints      float64               `json:"total_points,omitempty"`
	TotalVoters      int                   `json:"total_voters,omitempty"`
	TotalWatchers    int                   `json:"total_watchers,omitempty"`
	TribeGig         TribeGig              `json:"tribe_gig,omitempty"`
	Version          int                   `json:"version,omitempty"`
	Watchers         []int                 `json:"watchers,omitempty"`
}

UserStoryDetail => https://taigaio.github.io/taiga-doc/dist/api.html#object-userstory-detail

func (*UserStoryDetail) AsUserStory

func (u *UserStoryDetail) AsUserStory() (*UserStory, error)

AsUserStory packs the returned UserStoryDetail into a generic UserStory struct

type UserStoryDetailGET

type UserStoryDetailGET struct {
	AssignedTo          int                       `json:"assigned_to"`
	AssignedToExtraInfo AssignedToExtraInfo       `json:"assigned_to_extra_info"`
	AssignedUsers       []int                     `json:"assigned_users"`
	Attachments         []GenericObjectAttachment `json:"attachments"`
	BacklogOrder        int64                     `json:"backlog_order"`
	BlockedNote         string                    `json:"blocked_note"`
	BlockedNoteHTML     string                    `json:"blocked_note_html"`
	ClientRequirement   bool                      `json:"client_requirement"`
	Comment             string                    `json:"comment"`
	CreatedDate         time.Time                 `json:"created_date"`
	Description         string                    `json:"description"`
	DescriptionHTML     string                    `json:"description_html"`
	DueDate             string                    `json:"due_date"`
	DueDateReason       string                    `json:"due_date_reason"`
	DueDateStatus       string                    `json:"due_date_status"`
	EpicOrder           int                       `json:"epic_order"`
	Epics               []EpicMinimal             `json:"epics"`
	ExternalReference   []string                  `json:"external_reference"`
	FinishDate          time.Time                 `json:"finish_date"`
	GeneratedFromIssue  int                       `json:"generated_from_issue"`
	GeneratedFromTask   int                       `json:"generated_from_task"`
	ID                  int                       `json:"id"`
	IsBlocked           bool                      `json:"is_blocked"`
	IsClosed            bool                      `json:"is_closed"`
	IsVoter             bool                      `json:"is_voter"`
	IsWatcher           bool                      `json:"is_watcher"`
	KanbanOrder         int64                     `json:"kanban_order"`
	Milestone           int                       `json:"milestone"`
	MilestoneName       string                    `json:"milestone_name"`
	MilestoneSlug       string                    `json:"milestone_slug"`
	ModifiedDate        time.Time                 `json:"modified_date"`
	Neighbors           Neighbors                 `json:"neighbors"`
	OriginIssue         int                       `json:"origin_issue"`
	OriginTask          *UserStoryOrigin          `json:"origin_task"`
	Owner               int                       `json:"owner"`
	OwnerExtraInfo      OwnerExtraInfo            `json:"owner_extra_info"`
	Points              Points                    `json:"points"`
	Project             int                       `json:"project"`
	ProjectExtraInfo    ProjectExtraInfo          `json:"project_extra_info"`
	Ref                 int                       `json:"ref"`
	SprintOrder         int                       `json:"sprint_order"`
	Status              int                       `json:"status"`
	StatusExtraInfo     StatusExtraInfo           `json:"status_extra_info"`
	Subject             string                    `json:"subject"`
	Tags                Tags                      `json:"tags"`
	Tasks               []UserStoryNestedTask     `json:"tasks"`
	TeamRequirement     bool                      `json:"team_requirement"`
	TotalAttachments    int                       `json:"total_attachments"`
	TotalComments       int                       `json:"total_comments"`
	TotalPoints         float64                   `json:"total_points"`
	TotalVoters         int                       `json:"total_voters"`
	TotalWatchers       int                       `json:"total_watchers"`
	TribeGig            TribeGig                  `json:"tribe_gig"`
	Version             int                       `json:"version"`
	Watchers            []int                     `json:"watchers"`
}

UserStoryDetailGET => https://taigaio.github.io/taiga-doc/dist/api.html#object-userstory-detail-get

func (*UserStoryDetailGET) AsUserStory

func (u *UserStoryDetailGET) AsUserStory() (*UserStory, error)

AsUserStory packs the returned UserStoryDetailGET into a generic UserStory struct

type UserStoryDetailLIST

type UserStoryDetailLIST []struct {
	AssignedTo          int                       `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo       `json:"assigned_to_extra_info,omitempty"`
	AssignedUsers       []int                     `json:"assigned_users,omitempty"`
	Attachments         []GenericObjectAttachment `json:"attachments,omitempty"`
	BacklogOrder        int                       `json:"backlog_order,omitempty"`
	BlockedNote         string                    `json:"blocked_note,omitempty"`
	ClientRequirement   bool                      `json:"client_requirement,omitempty"`
	Comment             string                    `json:"comment,omitempty"`
	CreatedDate         time.Time                 `json:"created_date,omitempty"`
	DueDate             string                    `json:"due_date"`
	DueDateReason       string                    `json:"due_date_reason"`
	DueDateStatus       string                    `json:"due_date_status"`
	EpicOrder           int                       `json:"epic_order,omitempty"`
	Epics               []EpicMinimal             `json:"epics,omitempty"`
	ExternalReference   interface{}               `json:"external_reference,omitempty"`
	FinishDate          time.Time                 `json:"finish_date,omitempty"`
	GeneratedFromIssue  int                       `json:"generated_from_issue,omitempty"`
	GeneratedFromTask   int                       `json:"generated_from_task,omitempty"`
	ID                  int                       `json:"id,omitempty"`
	IsBlocked           bool                      `json:"is_blocked,omitempty"`
	IsClosed            bool                      `json:"is_closed,omitempty"`
	IsVoter             bool                      `json:"is_voter,omitempty"`
	IsWatcher           bool                      `json:"is_watcher,omitempty"`
	KanbanOrder         int                       `json:"kanban_order,omitempty"`
	Milestone           int                       `json:"milestone,omitempty"`
	MilestoneName       string                    `json:"milestone_name,omitempty"`
	MilestoneSlug       string                    `json:"milestone_slug,omitempty"`
	ModifiedDate        time.Time                 `json:"modified_date,omitempty"`
	OriginIssue         *UserStoryOrigin          `json:"origin_issue,omitempty"`
	OriginTask          *UserStoryOrigin          `json:"origin_task,omitempty"`
	Owner               int                       `json:"owner,omitempty"`
	OwnerExtraInfo      OwnerExtraInfo            `json:"owner_extra_info,omitempty"`
	Points              AgilePoints               `json:"points,omitempty"`
	Project             int                       `json:"project,omitempty"`
	ProjectExtraInfo    ProjectExtraInfo          `json:"project_extra_info,omitempty"`
	Ref                 int                       `json:"ref,omitempty"`
	SprintOrder         int                       `json:"sprint_order,omitempty"`
	Status              int                       `json:"status,omitempty"`
	StatusExtraInfo     StatusExtraInfo           `json:"status_extra_info,omitempty"`
	Subject             string                    `json:"subject,omitempty"`
	Tags                Tags                      `json:"tags,omitempty"`
	Tasks               []UserStoryNestedTask     `json:"tasks"`
	TeamRequirement     bool                      `json:"team_requirement,omitempty"`
	TotalAttachments    int                       `json:"total_attachments,omitempty"`
	TotalComments       int                       `json:"total_comments,omitempty"`
	TotalPoints         float64                   `json:"total_points,omitempty"`
	TotalVoters         int                       `json:"total_voters,omitempty"`
	TotalWatchers       int                       `json:"total_watchers,omitempty"`
	TribeGig            TribeGig                  `json:"tribe_gig,omitempty"`
	Version             int                       `json:"version,omitempty"`
	Watchers            []int                     `json:"watchers,omitempty"`
}

UserStoryDetailLIST => https://taigaio.github.io/taiga-doc/dist/api.html#object-userstory-detail-list

func (*UserStoryDetailLIST) AsUserStory

func (u *UserStoryDetailLIST) AsUserStory() ([]UserStory, error)

AsUserStory packs the returned UserStoryDetailLIST into a generic UserStory struct

type UserStoryExtraInfo

type UserStoryExtraInfo struct {
	Epics   []EpicMinimal `json:"epics"`
	ID      int           `json:"id"`
	Ref     int           `json:"ref"`
	Subject string        `json:"subject"`
}

UserStoryExtraInfo is a read-only field

type UserStoryNestedTask

type UserStoryNestedTask struct {
	Subject   string `json:"subject"`
	ID        int    `json:"id"`
	Ref       int    `json:"ref"`
	IsBlocked bool   `json:"is_blocked"`
	IsIocaine bool   `json:"is_iocaine"`
	StatusID  int    `json:"status_id"`
	IsClosed  bool   `json:"is_closed"`
}

UserStoryNestedTask is returned only when IncludeTasks is set to true in UserStoryQueryParams

type UserStoryOrigin

type UserStoryOrigin struct {
	ID      int    `json:"id,omitempty"`
	Ref     int    `json:"ref,omitempty"`
	Subject string `json:"subject,omitempty"`
}

UserStoryOrigin stores the bare minimum fields of the original User Story as a reference https://github.com/taigaio/taiga-back/blob/886ef47d0621388a11aeea61a269f00d13d32f8d/taiga/projects/userstories/serializers.py#L34

type UserStoryQueryParams

type UserStoryQueryParams struct {
	Project            int    `url:"project,omitempty"`
	Milestone          int    `url:"milestone,omitempty"`
	MilestoneIsNull    bool   `url:"milestone__isnull,omitempty"`
	Status             int    `url:"status,omitempty"`
	StatusIsArchived   bool   `url:"status__is_archived,omitempty"`
	Tags               string `url:"tags,omitempty"` // Comma separated strings (no whitespace)
	Watchers           int    `url:"watchers,omitempty"`
	AssignedTo         int    `url:"assigned_to,omitempty"`
	Epic               int    `url:"epic,omitempty"`
	Role               int    `url:"role,omitempty"`
	StatusIsClosed     bool   `url:"status__is_closed,omitempty"`
	IncludeAttachments bool   `url:"include_attachments,omitempty"`
	IncludeTasks       bool   `url:"include_tasks,omitempty"`

	ExcludeStatus     int `url:"exclude_status,omitempty"`
	ExcludeTags       int `url:"exclude_tags,omitempty"` // Comma separated strings (no whitespace)
	ExcludeAssignedTo int `url:"exclude_assigned_to,omitempty"`
	ExcludeRole       int `url:"exclude_role,omitempty"`
	ExcludeEpic       int `url:"exclude_epic,omitempty"`
}

UserStoryQueryParams holds fields to be used as URL query parameters to filter the queried objects

To set `OrderBy`, use the methods attached to this struct

type UserStoryService

type UserStoryService struct {
	Endpoint string
	// contains filtered or unexported fields
}

UserStoryService is a handle to actions related to UserStories

https://taigaio.github.io/taiga-doc/dist/api.html#user-stories

func (*UserStoryService) Clone

func (s *UserStoryService) Clone(srcUS *UserStory) (*UserStory, error)

Clone clones an existing UserStory with most fields

Available Meta: UserStoryDetail

func (*UserStoryService) Create

func (s *UserStoryService) Create(userStory *UserStory) (*UserStory, error)

Create creates a new User Story | https://taigaio.github.io/taiga-doc/dist/api.html#user-stories-create

Available Meta: *UserStoryDetail

func (*UserStoryService) CreateAttachment

func (s *UserStoryService) CreateAttachment(attachment *Attachment, userstory *UserStory) (*Attachment, error)

CreateAttachment creates a new UserStory attachment => https://taigaio.github.io/taiga-doc/dist/api.html#user-stories-create-attachment

func (*UserStoryService) Edit

func (s *UserStoryService) Edit(us *UserStory) (*UserStory, error)

Edit sends a PATCH request to edit a User Story -> https://taigaio.github.io/taiga-doc/dist/api.html#user-stories-edit Available Meta: UserStoryDetail

func (*UserStoryService) Get

func (s *UserStoryService) Get(userStoryID int) (*UserStory, error)

Get -> https://taigaio.github.io/taiga-doc/dist/api.html#user-stories-get

Available Meta: *UserStoryDetailGET

func (*UserStoryService) GetByRef

func (s *UserStoryService) GetByRef(userStoryRef int, project *Project) (*UserStory, error)

GetByRef returns a User Story by Ref -> https://taigaio.github.io/taiga-doc/dist/api.html#user-stories-get-by-ref

The passed userStoryRef should be an int taken from the UserStory's URL The passed *Project struct should have at least one of the following fields set:

ID 	 (int)
Slug (string)

If none of the above fields are set, an error is returned. If both fields are set, *Project.ID will be preferred.

Available Meta: UserStoryDetailGET

func (*UserStoryService) List

func (s *UserStoryService) List(queryParams *UserStoryQueryParams) ([]UserStory, error)

List returns all User Stories | https://taigaio.github.io/taiga-doc/dist/api.html#user-stories-list Available Meta: *[]UserStoryDetailLIST

type UserStoryStatus

type UserStoryStatus struct {
	Color      string `json:"color"`
	ID         int    `json:"id"`
	IsArchived bool   `json:"is_archived"`
	IsClosed   bool   `json:"is_closed"`
	Name       string `json:"name"`
	Order      int    `json:"order"`
	ProjectID  int    `json:"project_id"`
	Slug       string `json:"slug"`
	WipLimit   int    `json:"wip_limit"`
}

UserStoryStatus -> https://taigaio.github.io/taiga-doc/dist/api.html#user-story-statuses

type UserWatched

type UserWatched struct {
	AssignedTo          int                 `json:"assigned_to"`
	AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info"`
	CreatedDate         time.Time           `json:"created_date"`
	Description         string              `json:"description"`
	ID                  int                 `json:"id"`
	IsPrivate           bool                `json:"is_private"`
	IsVoter             bool                `json:"is_voter"`
	IsWatcher           bool                `json:"is_watcher"`
	LogoSmallURL        string              `json:"logo_small_url"`
	Name                string              `json:"name"`
	Project             int                 `json:"project"`
	ProjectBlockedCode  string              `json:"project_blocked_code"`
	ProjectIsPrivate    bool                `json:"project_is_private"`
	ProjectName         string              `json:"project_name"`
	ProjectSlug         string              `json:"project_slug"`
	Ref                 int                 `json:"ref"`
	Slug                string              `json:"slug"`
	Status              string              `json:"status"`
	StatusColor         string              `json:"status_color"`
	Subject             string              `json:"subject"`
	TagsColors          []TagsColors        `json:"tags_colors,omitempty"`
	TotalVoters         int                 `json:"total_voters"`
	TotalWatchers       int                 `json:"total_watchers"`
	Type                string              `json:"type"`
}

UserWatched => https://taigaio.github.io/taiga-doc/dist/api.html#object-watched-detail

type UsersQueryParams

type UsersQueryParams struct {
	Project int `url:"project,omitempty"`
}

UsersQueryParams holds fields to be used as URL query parameters to filter the queried objects

type Voted

type Voted struct {
	AssignedTo          int                 `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info,omitempty"`
	CreatedDate         time.Time           `json:"created_date,omitempty"`
	Description         string              `json:"description,omitempty"`
	ID                  int                 `json:"id,omitempty"`
	IsPrivate           bool                `json:"is_private,omitempty"`
	IsVoter             bool                `json:"is_voter,omitempty"`
	IsWatcher           bool                `json:"is_watcher,omitempty"`
	LogoSmallURL        string              `json:"logo_small_url,omitempty"`
	Name                string              `json:"name,omitempty"`
	Project             int                 `json:"project,omitempty"`
	ProjectBlockedCode  string              `json:"project_blocked_code,omitempty"`
	ProjectIsPrivate    bool                `json:"project_is_private,omitempty"`
	ProjectName         string              `json:"project_name,omitempty"`
	ProjectSlug         string              `json:"project_slug,omitempty"`
	Ref                 int                 `json:"ref,omitempty"`
	Slug                string              `json:"slug,omitempty"`
	Status              string              `json:"status,omitempty"`
	StatusColor         string              `json:"status_color,omitempty"`
	Subject             string              `json:"subject,omitempty"`
	TagsColors          []TagsColors        `json:"tags_colors,omitempty"`
	TotalVoters         int                 `json:"total_voters,omitempty"`
	TotalWatchers       int                 `json:"total_watchers,omitempty"`
	Type                string              `json:"type,omitempty"`
}

Voted represents Voted | https://taigaio.github.io/taiga-doc/dist/api.html#object-voted-detail

type Watched

type Watched struct {
	AssignedTo          int                 `json:"assigned_to,omitempty"`
	AssignedToExtraInfo AssignedToExtraInfo `json:"assigned_to_extra_info,omitempty"`
	CreatedDate         time.Time           `json:"created_date,omitempty"`
	Description         string              `json:"description,omitempty"`
	ID                  int                 `json:"id,omitempty"`
	IsPrivate           bool                `json:"is_private,omitempty"`
	IsVoter             bool                `json:"is_voter,omitempty"`
	IsWatcher           bool                `json:"is_watcher,omitempty"`
	LogoSmallURL        string              `json:"logo_small_url,omitempty"`
	Name                string              `json:"name,omitempty"`
	Project             int                 `json:"project,omitempty"`
	ProjectBlockedCode  string              `json:"project_blocked_code,omitempty"`
	ProjectIsPrivate    bool                `json:"project_is_private,omitempty"`
	ProjectName         string              `json:"project_name,omitempty"`
	ProjectSlug         string              `json:"project_slug,omitempty"`
	Ref                 int                 `json:"ref,omitempty"`
	Slug                string              `json:"slug,omitempty"`
	Status              string              `json:"status,omitempty"`
	StatusColor         string              `json:"status_color,omitempty"`
	Subject             string              `json:"subject,omitempty"`
	TagsColors          []TagsColors        `json:"tags_colors,omitempty"`
	TotalVoters         int                 `json:"total_voters,omitempty"`
	TotalWatchers       int                 `json:"total_watchers,omitempty"`
	Type                string              `json:"type,omitempty"`
}

Watched represents Watched | https://taigaio.github.io/taiga-doc/dist/api.html#object-watched-detail

type Webhook

type Webhook struct {
	ID          int    `json:"id,omitempty"`
	Key         string `json:"key,omitempty"`
	LogsCounter int    `json:"logs_counter,omitempty"`
	Name        string `json:"name,omitempty"`
	Project     int    `json:"project,omitempty"`
	URL         string `json:"url,omitempty"`
}

Webhook => https://taigaio.github.io/taiga-doc/dist/api.html#object-webhook-detail

type WebhookLog

type WebhookLog struct {
	ID          int    `json:"id"`
	Webhook     int    `json:"webhook"`
	URL         string `json:"url"`
	Status      int    `json:"status"`
	RequestData struct {
		By struct {
			ID         int    `json:"id"`
			Photo      string `json:"photo"`
			Username   string `json:"username"`
			FullName   string `json:"full_name"`
			Permalink  string `json:"permalink"`
			GravatarID string `json:"gravatar_id"`
		} `json:"by"`
		Data struct {
			Test string `json:"test"`
		} `json:"data"`
		Date   time.Time `json:"date"`
		Type   string    `json:"type"`
		Action string    `json:"action"`
	} `json:"request_data"`
	RequestHeaders struct {
		ContentType            string `json:"Content-Type"`
		ContentLength          string `json:"Content-Length"`
		XHubSignature          string `json:"X-Hub-Signature"`
		XTAIGAWEBHOOKSIGNATURE string `json:"X-TAIGA-WEBHOOK-SIGNATURE"`
	} `json:"request_headers"`
	ResponseData    string `json:"response_data"`
	ResponseHeaders struct {
		Date                       string `json:"Date"`
		Vary                       string `json:"Vary"`
		Pragma                     string `json:"Pragma"`
		Server                     string `json:"Server"`
		Expires                    string `json:"Expires"`
		Connection                 string `json:"Connection"`
		SetCookie                  string `json:"Set-Cookie"`
		ContentType                string `json:"Content-Type"`
		CacheControl               string `json:"Cache-Control"`
		ReferrerPolicy             string `json:"Referrer-Policy"`
		TransferEncoding           string `json:"Transfer-Encoding"`
		AccessControlAllowOrigin   string `json:"Access-Control-Allow-Origin"`
		AccessControlExposeHeaders string `json:"Access-Control-Expose-Headers"`
	} `json:"response_headers"`
	Duration     float64   `json:"duration"`
	Created      time.Time `json:"created"`
	ErrorMessage string    `json:"_error_message,omitempty"`
}

WebhookLog => https://taigaio.github.io/taiga-doc/dist/api.html#object-webhook-log-detail

type WebhookQueryParameters

type WebhookQueryParameters struct {
	ProjectID int `url:"project,omitempty"`
	WebhookID int `url:"webhook,omitempty"`
}

WebhookQueryParameters represents URL query parameters to filter responses

type WebhookService

type WebhookService struct {
	Endpoint     string
	EndpointLogs string
	// contains filtered or unexported fields
}

WebhookService is a handle to actions related to Webhooks

https://taigaio.github.io/taiga-doc/dist/api.html#webhooks

func (*WebhookService) CreateWebhook

func (s *WebhookService) CreateWebhook(webhook *Webhook) (*Webhook, error)

CreateWebhook creates a new Webhook https://taigaio.github.io/taiga-doc/dist/api.html#webhooks-create

func (*WebhookService) DeleteWebhook

func (s *WebhookService) DeleteWebhook(webhook *Webhook) error

DeleteWebhook sends a DELETE request to delete a Webhook https://taigaio.github.io/taiga-doc/dist/api.html#webhooks-delete

func (*WebhookService) EditWebhook

func (s *WebhookService) EditWebhook(webhook *Webhook) (*Webhook, error)

EditWebhook sends a PATCH request to edit a Webhook https://taigaio.github.io/taiga-doc/dist/api.html#webhooks-edit

func (*WebhookService) GetWebhook

func (s *WebhookService) GetWebhook(webhook *Webhook) (*Webhook, error)

GetWebhook returns a Webhook by ID https://taigaio.github.io/taiga-doc/dist/api.html#webhooks-get

func (*WebhookService) GetWebhookLog

func (s *WebhookService) GetWebhookLog(webhook *Webhook) (*WebhookLog, error)

GetWebhookLog returns a WebhookLog by ID https://taigaio.github.io/taiga-doc/dist/api.html#webhooklogs-get

func (*WebhookService) ListWebhookLogs

func (s *WebhookService) ListWebhookLogs(queryParameters *WebhookQueryParameters) (*[]WebhookLog, error)

ListWebhookLogs returns all Webhook logs https://taigaio.github.io/taiga-doc/dist/api.html#webhooklogs-list

func (*WebhookService) ListWebhooks

func (s *WebhookService) ListWebhooks(queryParams *WebhookQueryParameters) ([]Webhook, error)

ListWebhooks returns all Webhooks https://taigaio.github.io/taiga-doc/dist/api.html#webhooks-list

func (*WebhookService) ResendWebhookRequest

func (s *WebhookService) ResendWebhookRequest(webhookLog *WebhookLog) (*WebhookLog, error)

ResendWebhookRequest resends the request from a Webhook Log by ID https://taigaio.github.io/taiga-doc/dist/api.html#webhooklogs-resend

func (*WebhookService) TestWebhook

func (s *WebhookService) TestWebhook(webhook *Webhook) (*WebhookLog, error)

TestWebhook sends an empty POST request to test a webhook https://taigaio.github.io/taiga-doc/dist/api.html#webhooks-test

type WikiPage

type WikiPage struct {
	TaigaBaseObject
	Content          string           `json:"content"`
	CreatedDate      time.Time        `json:"created_date"`
	Editions         int              `json:"editions"`
	HTML             string           `json:"html"`
	ID               int              `json:"id"`
	IsWatcher        bool             `json:"is_watcher"`
	LastModifier     int              `json:"last_modifier"`
	ModifiedDate     time.Time        `json:"modified_date"`
	Owner            int              `json:"owner"`
	Project          int              `json:"project"`
	ProjectExtraInfo ProjectExtraInfo `json:"project_extra_info"`
	Slug             string           `json:"slug"`
	TotalWatchers    int              `json:"total_watchers"`
	Version          int              `json:"version"`
}

WikiPage -> https://taigaio.github.io/taiga-doc/dist/api.html#object-wiki-detail

func (*WikiPage) GetID

func (w *WikiPage) GetID() int

GetID returns the ID

func (*WikiPage) GetProject

func (w *WikiPage) GetProject() int

GetProject returns the project ID

func (*WikiPage) GetVersion

func (w *WikiPage) GetVersion() int

GetVersion return the version

type WikiService

type WikiService struct {
	Endpoint string
	// contains filtered or unexported fields
}

WikiService is a handle to actions related to Tasks

https://taigaio.github.io/taiga-doc/dist/api.html#tasks

func (*WikiService) CreateAttachment

func (s *WikiService) CreateAttachment(attachment *Attachment, wikiPage *WikiPage) (*Attachment, error)

CreateAttachment creates a new Wiki attachment -> https://taigaio.github.io/taiga-doc/dist/api.html#wiki-create-attachment

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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