gobacklog

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

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 15 Imported by: 0

README

go-backlog

GoDoc

Backlog API Client for Golang.

Install

$ go get github.com/griffin-stewie/go-backlog

Usage

$ go run ./example/main.go
// Sample code
package main

import (
	"log"
	"net/url"
	"os"

	backlog "github.com/griffin-stewie/go-backlog"
)

func main() {
	token := os.Getenv("BACKLOG_TOKEN")
	if token == "" {
		log.Fatalln("You need Backlog access token.")
	}

	URL, err := url.Parse("https://YOURSPACE.backlog.jp")
	if err != nil {
		log.Fatalf("ERROR: %s", err.Error())
	}

	client := backlog.NewClient(URL, token)

	issues, err := client.Issues()
	if err != nil {
		log.Fatalf("ERROR: %s", err.Error())
	}

	log.Printf("issues: %#+v", issues)
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrintResponseJSON = false

PrintResponseJSON is bool

View Source
var Verbose = false

Verbose is bool

Functions

This section is empty.

Types

type ActivitiesOption

type ActivitiesOption struct {
	ActivityTypeIDs []int  `url:"activityTypeId[],omitempty"`
	MinID           int    `url:"minId,omitempty"`
	MaxID           int    `url:"maxId,omitempty"`
	Count           int    `url:"count,omitempty"`
	Order           string `url:"order,omitempty"`
}

ActivitiesOption represents

func (*ActivitiesOption) ParamString

func (c *ActivitiesOption) ParamString() (string, error)

ParamString returns

func (*ActivitiesOption) Values

func (c *ActivitiesOption) Values() (url.Values, error)

Values returns

type Activity

type Activity struct {
	ID      *int     `json:"id,omitempty"`
	Project *Project `json:"project,omitempty"`
	Type    *int     `json:"type,omitempty"`
	Content *Content `json:"content,omitempty"`
	// Notifications *Notification `json:"notifications,omitempty"` // TODO
	CreatedUser *User      `json:"createdUser,omitempty"`
	Created     *time.Time `json:"created,omitempty"`
}

Activity represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type ActivitySlice

type ActivitySlice []*Activity

ActivitySlice is a slice of type *Activity. Use it where you would use []*Activity.

func (ActivitySlice) Count

func (rcv ActivitySlice) Count(fn func(*Activity) bool) (result int)

Count gives the number elements of ActivitySlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (ActivitySlice) Distinct

func (rcv ActivitySlice) Distinct() (result ActivitySlice)

Distinct returns a new ActivitySlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (ActivitySlice) DistinctBy

func (rcv ActivitySlice) DistinctBy(equal func(*Activity, *Activity) bool) (result ActivitySlice)

DistinctBy returns a new ActivitySlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (ActivitySlice) First

func (rcv ActivitySlice) First(fn func(*Activity) bool) (result *Activity, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (ActivitySlice) GroupByBool

func (rcv ActivitySlice) GroupByBool(fn func(*Activity) bool) map[bool]ActivitySlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (ActivitySlice) GroupByInt

func (rcv ActivitySlice) GroupByInt(fn func(*Activity) int) map[int]ActivitySlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (ActivitySlice) GroupByString

func (rcv ActivitySlice) GroupByString(fn func(*Activity) string) map[string]ActivitySlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (ActivitySlice) MaxBy

func (rcv ActivitySlice) MaxBy(less func(*Activity, *Activity) bool) (result *Activity, err error)

MaxBy returns an element of ActivitySlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (ActivitySlice) MinBy

func (rcv ActivitySlice) MinBy(less func(*Activity, *Activity) bool) (result *Activity, err error)

MinBy returns an element of ActivitySlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (ActivitySlice) Shuffle

func (rcv ActivitySlice) Shuffle() ActivitySlice

Shuffle returns a shuffled copy of ActivitySlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (ActivitySlice) SortBy

func (rcv ActivitySlice) SortBy(less func(*Activity, *Activity) bool) ActivitySlice

SortBy returns a new ordered ActivitySlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (ActivitySlice) Where

func (rcv ActivitySlice) Where(fn func(*Activity) bool) (result ActivitySlice)

Where returns a new ActivitySlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type Assignee

type Assignee struct {
	ID          *int    `json:"id,omitempty"`
	UserID      *string `json:"userId,omitempty"`
	Name        *string `json:"name,omitempty"`
	RoleType    *int    `json:"roleType,omitempty"`
	Lang        *string `json:"lang,omitempty"`
	MailAddress *string `json:"mailAddress,omitempty"`
}

Assignee represents

type Attachment

type Attachment struct {
	ID          *int       `json:"id,omitempty"`
	Name        *string    `json:"name,omitempty"`
	Size        *int64     `json:"size,omitempty"`
	CreatedUser *User      `json:"createdUser,omitempty"`
	Created     *time.Time `json:"created,omitempty"`
}

Attachment represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type AttachmentSlice

type AttachmentSlice []*Attachment

AttachmentSlice is a slice of type *Attachment. Use it where you would use []*Attachment.

func (AttachmentSlice) Count

func (rcv AttachmentSlice) Count(fn func(*Attachment) bool) (result int)

Count gives the number elements of AttachmentSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (AttachmentSlice) Distinct

func (rcv AttachmentSlice) Distinct() (result AttachmentSlice)

Distinct returns a new AttachmentSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (AttachmentSlice) DistinctBy

func (rcv AttachmentSlice) DistinctBy(equal func(*Attachment, *Attachment) bool) (result AttachmentSlice)

DistinctBy returns a new AttachmentSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (AttachmentSlice) First

func (rcv AttachmentSlice) First(fn func(*Attachment) bool) (result *Attachment, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (AttachmentSlice) GroupByBool

func (rcv AttachmentSlice) GroupByBool(fn func(*Attachment) bool) map[bool]AttachmentSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (AttachmentSlice) GroupByInt

func (rcv AttachmentSlice) GroupByInt(fn func(*Attachment) int) map[int]AttachmentSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (AttachmentSlice) GroupByString

func (rcv AttachmentSlice) GroupByString(fn func(*Attachment) string) map[string]AttachmentSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (AttachmentSlice) MaxBy

func (rcv AttachmentSlice) MaxBy(less func(*Attachment, *Attachment) bool) (result *Attachment, err error)

MaxBy returns an element of AttachmentSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (AttachmentSlice) MinBy

func (rcv AttachmentSlice) MinBy(less func(*Attachment, *Attachment) bool) (result *Attachment, err error)

MinBy returns an element of AttachmentSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (AttachmentSlice) Shuffle

func (rcv AttachmentSlice) Shuffle() AttachmentSlice

Shuffle returns a shuffled copy of AttachmentSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (AttachmentSlice) SortBy

func (rcv AttachmentSlice) SortBy(less func(*Attachment, *Attachment) bool) AttachmentSlice

SortBy returns a new ordered AttachmentSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (AttachmentSlice) Where

func (rcv AttachmentSlice) Where(fn func(*Attachment) bool) (result AttachmentSlice)

Where returns a new AttachmentSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type BacklogError

type BacklogError struct {
	Message  string `json:"message,omitempty"`
	Code     int    `json:"code,omitempty"`
	MoreInfo string `json:"moreInfo,omitempty"`
}

BacklogError is error model +gen * slice:"Where,Count,SortBy,GroupBy[string],Select[string]"

type BacklogErrorResponse

type BacklogErrorResponse struct {
	Errors BacklogErrorSlice `json:"errors"`
}

BacklogErrorResponse is error model

type BacklogErrorSlice

type BacklogErrorSlice []*BacklogError

BacklogErrorSlice is a slice of type *BacklogError. Use it where you would use []*BacklogError.

func (BacklogErrorSlice) Count

func (rcv BacklogErrorSlice) Count(fn func(*BacklogError) bool) (result int)

Count gives the number elements of BacklogErrorSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (BacklogErrorSlice) GroupByString

func (rcv BacklogErrorSlice) GroupByString(fn func(*BacklogError) string) map[string]BacklogErrorSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (BacklogErrorSlice) SelectString

func (rcv BacklogErrorSlice) SelectString(fn func(*BacklogError) string) (result []string)

SelectString projects a slice of string from BacklogErrorSlice, typically called a map in other frameworks. See: http://clipperhouse.github.io/gen/#Select

func (BacklogErrorSlice) SortBy

SortBy returns a new ordered BacklogErrorSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (BacklogErrorSlice) Where

func (rcv BacklogErrorSlice) Where(fn func(*BacklogError) bool) (result BacklogErrorSlice)

Where returns a new BacklogErrorSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type Category

type Category struct {
	ID           *int    `json:"id,omitempty"`
	Name         *string `json:"name,omitempty"`
	DisplayOrder *int    `json:"displayOrder,omitempty"`
}

Category represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type CategorySlice

type CategorySlice []*Category

CategorySlice is a slice of type *Category. Use it where you would use []*Category.

func (CategorySlice) Count

func (rcv CategorySlice) Count(fn func(*Category) bool) (result int)

Count gives the number elements of CategorySlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (CategorySlice) Distinct

func (rcv CategorySlice) Distinct() (result CategorySlice)

Distinct returns a new CategorySlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (CategorySlice) DistinctBy

func (rcv CategorySlice) DistinctBy(equal func(*Category, *Category) bool) (result CategorySlice)

DistinctBy returns a new CategorySlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (CategorySlice) First

func (rcv CategorySlice) First(fn func(*Category) bool) (result *Category, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (CategorySlice) GroupByBool

func (rcv CategorySlice) GroupByBool(fn func(*Category) bool) map[bool]CategorySlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (CategorySlice) GroupByInt

func (rcv CategorySlice) GroupByInt(fn func(*Category) int) map[int]CategorySlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (CategorySlice) GroupByString

func (rcv CategorySlice) GroupByString(fn func(*Category) string) map[string]CategorySlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (CategorySlice) MaxBy

func (rcv CategorySlice) MaxBy(less func(*Category, *Category) bool) (result *Category, err error)

MaxBy returns an element of CategorySlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (CategorySlice) MinBy

func (rcv CategorySlice) MinBy(less func(*Category, *Category) bool) (result *Category, err error)

MinBy returns an element of CategorySlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (CategorySlice) Shuffle

func (rcv CategorySlice) Shuffle() CategorySlice

Shuffle returns a shuffled copy of CategorySlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (CategorySlice) SortBy

func (rcv CategorySlice) SortBy(less func(*Category, *Category) bool) CategorySlice

SortBy returns a new ordered CategorySlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (CategorySlice) Where

func (rcv CategorySlice) Where(fn func(*Category) bool) (result CategorySlice)

Where returns a new CategorySlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type Change

type Change struct {
	Field    *string `json:"field,omitempty"`
	NewValue *string `json:"new_value,omitempty"`
	OldValue *string `json:"old_value,omitempty"`
	Type     *string `json:"type,omitempty"`
}

Change represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type ChangeSlice

type ChangeSlice []*Change

ChangeSlice is a slice of type *Change. Use it where you would use []*Change.

func (ChangeSlice) Count

func (rcv ChangeSlice) Count(fn func(*Change) bool) (result int)

Count gives the number elements of ChangeSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (ChangeSlice) Distinct

func (rcv ChangeSlice) Distinct() (result ChangeSlice)

Distinct returns a new ChangeSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (ChangeSlice) DistinctBy

func (rcv ChangeSlice) DistinctBy(equal func(*Change, *Change) bool) (result ChangeSlice)

DistinctBy returns a new ChangeSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (ChangeSlice) First

func (rcv ChangeSlice) First(fn func(*Change) bool) (result *Change, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (ChangeSlice) GroupByBool

func (rcv ChangeSlice) GroupByBool(fn func(*Change) bool) map[bool]ChangeSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (ChangeSlice) GroupByInt

func (rcv ChangeSlice) GroupByInt(fn func(*Change) int) map[int]ChangeSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (ChangeSlice) GroupByString

func (rcv ChangeSlice) GroupByString(fn func(*Change) string) map[string]ChangeSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (ChangeSlice) MaxBy

func (rcv ChangeSlice) MaxBy(less func(*Change, *Change) bool) (result *Change, err error)

MaxBy returns an element of ChangeSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (ChangeSlice) MinBy

func (rcv ChangeSlice) MinBy(less func(*Change, *Change) bool) (result *Change, err error)

MinBy returns an element of ChangeSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (ChangeSlice) Shuffle

func (rcv ChangeSlice) Shuffle() ChangeSlice

Shuffle returns a shuffled copy of ChangeSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (ChangeSlice) SortBy

func (rcv ChangeSlice) SortBy(less func(*Change, *Change) bool) ChangeSlice

SortBy returns a new ordered ChangeSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (ChangeSlice) Where

func (rcv ChangeSlice) Where(fn func(*Change) bool) (result ChangeSlice)

Where returns a new ChangeSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type Client

type Client struct {
	BaseURL    *url.URL
	HTTPClient *http.Client
	APIKey     string
}

Client is

func NewClient

func NewClient(baseURL *url.URL, APIKey string) *Client

NewClient returns Backlog HTTP Client

func (*Client) Delete

func (c *Client) Delete(endpoint string, params url.Values) ([]byte, error)

Delete DELETE method

func (*Client) DiskUsage

func (c *Client) DiskUsage() (*DiskUsage, error)

DiskUsage /api/v2/space/diskUsage

func (*Client) DownloadAttachment

func (c *Client) DownloadAttachment(issueIDOrKey string, attachmentID int) (io.ReadCloser, string, error)

DownloadAttachment returns /api/v2/issues/:issueIdOrKey/attachments/:attachmentId

func (*Client) Get

func (c *Client) Get(endpoint string, params url.Values) ([]byte, error)

Get GET method

func (*Client) IssueWithKey

func (c *Client) IssueWithKey(issueIDOrKey string) (*Issue, error)

IssueWithKey is

func (*Client) Issues

func (c *Client) Issues() (IssueSlice, error)

Issues is

func (*Client) IssuesWithOption

func (c *Client) IssuesWithOption(opt *IssuesOption) (IssueSlice, error)

IssuesWithOption is

func (*Client) Myself

func (c *Client) Myself() (*User, error)

Myself returns

func (*Client) Post

func (c *Client) Post(endpoint string, params url.Values) ([]byte, error)

Post POST method

func (*Client) ProjectWithID

func (c *Client) ProjectWithID(projectID int) (*Project, error)

ProjectWithID returns project information. /api/v2/projects/:projectIdOrKey

func (*Client) ProjectWithKey

func (c *Client) ProjectWithKey(projectKey string) (*Project, error)

ProjectWithKey returns project information. /api/v2/projects/:projectIdOrKey

func (*Client) ProjectsWithOption

func (c *Client) ProjectsWithOption(option *ProjectsOption) (ProjectSlice, error)

ProjectsWithOption returns project information. /api/v2/projects

func (*Client) Put

func (c *Client) Put(endpoint string, params url.Values) ([]byte, error)

Put PUT method

func (*Client) Space

func (c *Client) Space() (*Space, error)

Space returns

func (*Client) SpaceActivities

func (c *Client) SpaceActivities(option *ActivitiesOption) (ActivitySlice, error)

SpaceActivities `/api/v2/space/activities`

func (*Client) SpaceNotification

func (c *Client) SpaceNotification() (*SpaceNotification, error)

SpaceNotification /api/v2/space/notification

func (*Client) User

func (c *Client) User(userID int) (*User, error)

User /api/v2/users/:userId

func (*Client) Users

func (c *Client) Users() (UserSlice, error)

Users /api/v2/users

type Comment

type Comment struct {
	ID      *int    `json:"id,omitempty"`
	Content *string `json:"content,omitempty"`
}

Comment represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type Content

type Content struct {
	ID          *int            `json:"id,omitempty"`
	KeyID       *int            `json:"key_id,omitempty"`
	Summary     *string         `json:"summary,omitempty"`
	Description *string         `json:"description,omitempty"`
	Comment     *Comment        `json:"comment,omitempty"`
	Changes     *ChangeSlice    `json:"changes,omitempty"`
	Attachments AttachmentSlice `json:"attachments,omitempty"`
	SharedFile  *SharedFile     `json:"shared_files,omitempty"`
}

Content represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type ContentSlice

type ContentSlice []*Content

ContentSlice is a slice of type *Content. Use it where you would use []*Content.

func (ContentSlice) Count

func (rcv ContentSlice) Count(fn func(*Content) bool) (result int)

Count gives the number elements of ContentSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (ContentSlice) Distinct

func (rcv ContentSlice) Distinct() (result ContentSlice)

Distinct returns a new ContentSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (ContentSlice) DistinctBy

func (rcv ContentSlice) DistinctBy(equal func(*Content, *Content) bool) (result ContentSlice)

DistinctBy returns a new ContentSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (ContentSlice) First

func (rcv ContentSlice) First(fn func(*Content) bool) (result *Content, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (ContentSlice) GroupByBool

func (rcv ContentSlice) GroupByBool(fn func(*Content) bool) map[bool]ContentSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (ContentSlice) GroupByInt

func (rcv ContentSlice) GroupByInt(fn func(*Content) int) map[int]ContentSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (ContentSlice) GroupByString

func (rcv ContentSlice) GroupByString(fn func(*Content) string) map[string]ContentSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (ContentSlice) MaxBy

func (rcv ContentSlice) MaxBy(less func(*Content, *Content) bool) (result *Content, err error)

MaxBy returns an element of ContentSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (ContentSlice) MinBy

func (rcv ContentSlice) MinBy(less func(*Content, *Content) bool) (result *Content, err error)

MinBy returns an element of ContentSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (ContentSlice) Shuffle

func (rcv ContentSlice) Shuffle() ContentSlice

Shuffle returns a shuffled copy of ContentSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (ContentSlice) SortBy

func (rcv ContentSlice) SortBy(less func(*Content, *Content) bool) ContentSlice

SortBy returns a new ordered ContentSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (ContentSlice) Where

func (rcv ContentSlice) Where(fn func(*Content) bool) (result ContentSlice)

Where returns a new ContentSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type CustomField

type CustomField struct {
	ID          *int                   `json:"id,omitempty"`
	Name        *string                `json:"name,omitempty"`
	FieldTypeID *int                   `json:"fieldTypeId,omitempty"`
	Value       *CustomFieldValueSlice `json:"value,omitempty"`
}

CustomField represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type CustomFieldSlice

type CustomFieldSlice []*CustomField

CustomFieldSlice is a slice of type *CustomField. Use it where you would use []*CustomField.

func (CustomFieldSlice) Count

func (rcv CustomFieldSlice) Count(fn func(*CustomField) bool) (result int)

Count gives the number elements of CustomFieldSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (CustomFieldSlice) Distinct

func (rcv CustomFieldSlice) Distinct() (result CustomFieldSlice)

Distinct returns a new CustomFieldSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (CustomFieldSlice) DistinctBy

func (rcv CustomFieldSlice) DistinctBy(equal func(*CustomField, *CustomField) bool) (result CustomFieldSlice)

DistinctBy returns a new CustomFieldSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (CustomFieldSlice) First

func (rcv CustomFieldSlice) First(fn func(*CustomField) bool) (result *CustomField, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (CustomFieldSlice) GroupByBool

func (rcv CustomFieldSlice) GroupByBool(fn func(*CustomField) bool) map[bool]CustomFieldSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (CustomFieldSlice) GroupByInt

func (rcv CustomFieldSlice) GroupByInt(fn func(*CustomField) int) map[int]CustomFieldSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (CustomFieldSlice) GroupByString

func (rcv CustomFieldSlice) GroupByString(fn func(*CustomField) string) map[string]CustomFieldSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (CustomFieldSlice) MaxBy

func (rcv CustomFieldSlice) MaxBy(less func(*CustomField, *CustomField) bool) (result *CustomField, err error)

MaxBy returns an element of CustomFieldSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (CustomFieldSlice) MinBy

func (rcv CustomFieldSlice) MinBy(less func(*CustomField, *CustomField) bool) (result *CustomField, err error)

MinBy returns an element of CustomFieldSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (CustomFieldSlice) Shuffle

func (rcv CustomFieldSlice) Shuffle() CustomFieldSlice

Shuffle returns a shuffled copy of CustomFieldSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (CustomFieldSlice) SortBy

func (rcv CustomFieldSlice) SortBy(less func(*CustomField, *CustomField) bool) CustomFieldSlice

SortBy returns a new ordered CustomFieldSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (CustomFieldSlice) Where

func (rcv CustomFieldSlice) Where(fn func(*CustomField) bool) (result CustomFieldSlice)

Where returns a new CustomFieldSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type CustomFieldValue

type CustomFieldValue struct {
	ID           *int    `json:"id,omitempty"`
	Name         *string `json:"name,omitempty"`
	DisplayOrder *int    `json:"displayOrder,omitempty"`
}

CustomFieldValue represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type CustomFieldValueSlice

type CustomFieldValueSlice []*CustomFieldValue

CustomFieldValueSlice is a slice of type *CustomFieldValue. Use it where you would use []*CustomFieldValue.

func (CustomFieldValueSlice) Count

func (rcv CustomFieldValueSlice) Count(fn func(*CustomFieldValue) bool) (result int)

Count gives the number elements of CustomFieldValueSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (CustomFieldValueSlice) Distinct

func (rcv CustomFieldValueSlice) Distinct() (result CustomFieldValueSlice)

Distinct returns a new CustomFieldValueSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (CustomFieldValueSlice) DistinctBy

func (rcv CustomFieldValueSlice) DistinctBy(equal func(*CustomFieldValue, *CustomFieldValue) bool) (result CustomFieldValueSlice)

DistinctBy returns a new CustomFieldValueSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (CustomFieldValueSlice) First

func (rcv CustomFieldValueSlice) First(fn func(*CustomFieldValue) bool) (result *CustomFieldValue, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (CustomFieldValueSlice) GroupByBool

func (rcv CustomFieldValueSlice) GroupByBool(fn func(*CustomFieldValue) bool) map[bool]CustomFieldValueSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (CustomFieldValueSlice) GroupByInt

func (rcv CustomFieldValueSlice) GroupByInt(fn func(*CustomFieldValue) int) map[int]CustomFieldValueSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (CustomFieldValueSlice) GroupByString

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (CustomFieldValueSlice) MaxBy

func (rcv CustomFieldValueSlice) MaxBy(less func(*CustomFieldValue, *CustomFieldValue) bool) (result *CustomFieldValue, err error)

MaxBy returns an element of CustomFieldValueSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (CustomFieldValueSlice) MinBy

func (rcv CustomFieldValueSlice) MinBy(less func(*CustomFieldValue, *CustomFieldValue) bool) (result *CustomFieldValue, err error)

MinBy returns an element of CustomFieldValueSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (CustomFieldValueSlice) Shuffle

Shuffle returns a shuffled copy of CustomFieldValueSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (CustomFieldValueSlice) SortBy

SortBy returns a new ordered CustomFieldValueSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (CustomFieldValueSlice) Where

func (rcv CustomFieldValueSlice) Where(fn func(*CustomFieldValue) bool) (result CustomFieldValueSlice)

Where returns a new CustomFieldValueSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type DiskUsage

type DiskUsage struct {
	Capacity    *int                 `json:"capacity,omitempty"`
	Issue       *int                 `json:"issue,omitempty"`
	Wiki        *int                 `json:"wiki,omitempty"`
	File        *int                 `json:"file,omitempty"`
	Subversion  *int                 `json:"subversion,omitempty"`
	Git         *int                 `json:"git,omitempty"`
	PullRequest *int                 `json:"pullRequest,omitempty"`
	Details     DiskUsageDetailSlice `json:"details,omitempty"`
}

DiskUsage represents

type DiskUsageDetail

type DiskUsageDetail struct {
	ProjectID   *int `json:"projectId,omitempty"`
	Issue       *int `json:"issue,omitempty"`
	Wiki        *int `json:"wiki,omitempty"`
	File        *int `json:"file,omitempty"`
	Subversion  *int `json:"subversion,omitempty"`
	Git         *int `json:"git,omitempty"`
	PullRequest *int `json:"pullRequest,omitempty"`
}

DiskUsageDetail represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

func (*DiskUsageDetail) Total

func (d *DiskUsageDetail) Total() int

Total returns total disk usage, byte unit.

type DiskUsageDetailSlice

type DiskUsageDetailSlice []*DiskUsageDetail

DiskUsageDetailSlice is a slice of type *DiskUsageDetail. Use it where you would use []*DiskUsageDetail.

func (DiskUsageDetailSlice) Count

func (rcv DiskUsageDetailSlice) Count(fn func(*DiskUsageDetail) bool) (result int)

Count gives the number elements of DiskUsageDetailSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (DiskUsageDetailSlice) Distinct

func (rcv DiskUsageDetailSlice) Distinct() (result DiskUsageDetailSlice)

Distinct returns a new DiskUsageDetailSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (DiskUsageDetailSlice) DistinctBy

func (rcv DiskUsageDetailSlice) DistinctBy(equal func(*DiskUsageDetail, *DiskUsageDetail) bool) (result DiskUsageDetailSlice)

DistinctBy returns a new DiskUsageDetailSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (DiskUsageDetailSlice) First

func (rcv DiskUsageDetailSlice) First(fn func(*DiskUsageDetail) bool) (result *DiskUsageDetail, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (DiskUsageDetailSlice) GroupByBool

func (rcv DiskUsageDetailSlice) GroupByBool(fn func(*DiskUsageDetail) bool) map[bool]DiskUsageDetailSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (DiskUsageDetailSlice) GroupByInt

func (rcv DiskUsageDetailSlice) GroupByInt(fn func(*DiskUsageDetail) int) map[int]DiskUsageDetailSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (DiskUsageDetailSlice) GroupByString

func (rcv DiskUsageDetailSlice) GroupByString(fn func(*DiskUsageDetail) string) map[string]DiskUsageDetailSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (DiskUsageDetailSlice) MaxBy

func (rcv DiskUsageDetailSlice) MaxBy(less func(*DiskUsageDetail, *DiskUsageDetail) bool) (result *DiskUsageDetail, err error)

MaxBy returns an element of DiskUsageDetailSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (DiskUsageDetailSlice) MinBy

func (rcv DiskUsageDetailSlice) MinBy(less func(*DiskUsageDetail, *DiskUsageDetail) bool) (result *DiskUsageDetail, err error)

MinBy returns an element of DiskUsageDetailSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (DiskUsageDetailSlice) Shuffle

Shuffle returns a shuffled copy of DiskUsageDetailSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (DiskUsageDetailSlice) SortBy

SortBy returns a new ordered DiskUsageDetailSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (DiskUsageDetailSlice) Where

func (rcv DiskUsageDetailSlice) Where(fn func(*DiskUsageDetail) bool) (result DiskUsageDetailSlice)

Where returns a new DiskUsageDetailSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type HTTP

type HTTP interface {
	Get()
	Post()
	Put()
	Delete()
}

HTTP interface of HTTP METHODS's methods

type Issue

type Issue struct {
	ID             *int             `json:"id,omitempty"`
	ProjectID      *int             `json:"projectId,omitempty"`
	IssueKey       *string          `json:"issueKey,omitempty"`
	KeyID          *int             `json:"keyId,omitempty"`
	IssueType      IssueType        `json:"issueType,omitempty"`
	Summary        *string          `json:"summary,omitempty"`
	Description    *string          `json:"description,omitempty"`
	Resolution     Resolution       `json:"resolution,omitempty"`
	Priority       Priority         `json:"priority,omitempty"`
	Status         Status           `json:"status,omitempty"`
	Assignee       Assignee         `json:"assignee,omitempty"`
	Category       CategorySlice    `json:"category,omitempty"`
	Versions       VersionSlice     `json:"versions,omitempty"`
	Milestone      VersionSlice     `json:"milestone,omitempty"`
	StartDate      *time.Time       `json:"startDate,omitempty"`
	DueDate        *time.Time       `json:"dueDate,omitempty"`
	EstimatedHours *int             `json:"estimatedHours,omitempty"`
	ActualHours    *int             `json:"actualHours,omitempty"`
	ParentIssueID  *int             `json:"parentIssueId,omitempty"`
	CreatedUser    *User            `json:"createdUser,omitempty"`
	Created        *time.Time       `json:"created,omitempty"`
	UpdatedUser    *User            `json:"updatedUser,omitempty"`
	Updated        *time.Time       `json:"updated,omitempty"`
	CustomFields   CustomFieldSlice `json:"customFields,omitempty"`
	Attachments    AttachmentSlice  `json:"attachments,omitempty"`
	SharedFiles    SharedFileSlice  `json:"sharedFiles,omitempty"`
	Stars          StarSlice        `json:"stars,omitempty"`
}

Issue represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type IssueSlice

type IssueSlice []*Issue

IssueSlice is a slice of type *Issue. Use it where you would use []*Issue.

func (IssueSlice) Count

func (rcv IssueSlice) Count(fn func(*Issue) bool) (result int)

Count gives the number elements of IssueSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (IssueSlice) Distinct

func (rcv IssueSlice) Distinct() (result IssueSlice)

Distinct returns a new IssueSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (IssueSlice) DistinctBy

func (rcv IssueSlice) DistinctBy(equal func(*Issue, *Issue) bool) (result IssueSlice)

DistinctBy returns a new IssueSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (IssueSlice) First

func (rcv IssueSlice) First(fn func(*Issue) bool) (result *Issue, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (IssueSlice) GroupByBool

func (rcv IssueSlice) GroupByBool(fn func(*Issue) bool) map[bool]IssueSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (IssueSlice) GroupByInt

func (rcv IssueSlice) GroupByInt(fn func(*Issue) int) map[int]IssueSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (IssueSlice) GroupByString

func (rcv IssueSlice) GroupByString(fn func(*Issue) string) map[string]IssueSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (IssueSlice) MaxBy

func (rcv IssueSlice) MaxBy(less func(*Issue, *Issue) bool) (result *Issue, err error)

MaxBy returns an element of IssueSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (IssueSlice) MinBy

func (rcv IssueSlice) MinBy(less func(*Issue, *Issue) bool) (result *Issue, err error)

MinBy returns an element of IssueSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (IssueSlice) Shuffle

func (rcv IssueSlice) Shuffle() IssueSlice

Shuffle returns a shuffled copy of IssueSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (IssueSlice) SortBy

func (rcv IssueSlice) SortBy(less func(*Issue, *Issue) bool) IssueSlice

SortBy returns a new ordered IssueSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (IssueSlice) Where

func (rcv IssueSlice) Where(fn func(*Issue) bool) (result IssueSlice)

Where returns a new IssueSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type IssueStatus

type IssueStatus int

IssueStatus enum

const (
	Open IssueStatus = iota + 1
	InProgress
	Resolved
	Closed
)

IssueStatus enum

type IssueType

type IssueType struct {
	ID           *int    `json:"id,omitempty"`
	ProjectID    *int    `json:"projectId,omitempty"`
	Name         *string `json:"name,omitempty"`
	Color        *string `json:"color,omitempty"`
	DisplayOrder *int    `json:"displayOrder,omitempty"`
}

IssueType represents

type Issues

type Issues struct {
	Issues IssueSlice
}

Issues represents

type IssuesOption

type IssuesOption struct {
	IDs            []int         `url:"id[],omitempty"`
	ProjectIDs     []int         `url:"projectId[],omitempty"`
	AssigneeIDs    []int         `url:"assigneeId[],omitempty"`
	Statuses       []IssueStatus `url:"statusId[],omitempty"`
	SharedFile     bool          `url:"sharedFile,omitempty"`
	Count          int           `url:"count,omitempty"`
	Offset         int           `url:"offset,omitempty"`
	Keyword        string        `url:"keyword,omitempty"`
	CreatedSince   string        `url:"createdSince,omitempty"`
	CreatedUntil   string        `url:"createdUntil,omitempty"`
	UpdatedSince   string        `url:"updatedSince,omitempty"`
	UpdatedUntil   string        `url:"updatedUntil,omitempty"`
	StartDateSince string        `url:"startDateSince,omitempty"`
	StartDateUntil string        `url:"startDateUntil,omitempty"`
	DueDateSince   string        `url:"dueDateSince,omitempty"`
	DueDateUntil   string        `url:"dueDateUntil,omitempty"`
	Sort           string        `url:"sort,omitempty"`
}

IssuesOption represents

func (*IssuesOption) ParamString

func (c *IssuesOption) ParamString() (string, error)

ParamString returns

func (*IssuesOption) Values

func (c *IssuesOption) Values() (url.Values, error)

Values returns

type Priority

type Priority struct {
	ID   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

Priority represents

type Project

type Project struct {
	ID                                *int    `json:"id,omitempty"`
	ProjectKey                        *string `json:"projectKey,omitempty"`
	Name                              *string `json:"name,omitempty"`
	ChartEnabled                      *bool   `json:"chartEnabled,omitempty"`
	SubtaskingEnabled                 *bool   `json:"subtaskingEnabled,omitempty"`
	ProjectLeaderCanEditProjectLeader *bool   `json:"projectLeaderCanEditProjectLeader,omitempty"`
	UseWikiTreeView                   *bool   `json:"useWikiTreeView,omitempty"`
	TextFormattingRule                *string `json:"textFormattingRule,omitempty"`
	Archived                          *bool   `json:"archived,omitempty"`
	DisplayOrder                      *int    `json:"displayOrder,omitempty"`
}

Project represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type ProjectSlice

type ProjectSlice []*Project

ProjectSlice is a slice of type *Project. Use it where you would use []*Project.

func (ProjectSlice) Count

func (rcv ProjectSlice) Count(fn func(*Project) bool) (result int)

Count gives the number elements of ProjectSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (ProjectSlice) Distinct

func (rcv ProjectSlice) Distinct() (result ProjectSlice)

Distinct returns a new ProjectSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (ProjectSlice) DistinctBy

func (rcv ProjectSlice) DistinctBy(equal func(*Project, *Project) bool) (result ProjectSlice)

DistinctBy returns a new ProjectSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (ProjectSlice) First

func (rcv ProjectSlice) First(fn func(*Project) bool) (result *Project, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (ProjectSlice) GroupByBool

func (rcv ProjectSlice) GroupByBool(fn func(*Project) bool) map[bool]ProjectSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (ProjectSlice) GroupByInt

func (rcv ProjectSlice) GroupByInt(fn func(*Project) int) map[int]ProjectSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (ProjectSlice) GroupByString

func (rcv ProjectSlice) GroupByString(fn func(*Project) string) map[string]ProjectSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (ProjectSlice) MaxBy

func (rcv ProjectSlice) MaxBy(less func(*Project, *Project) bool) (result *Project, err error)

MaxBy returns an element of ProjectSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (ProjectSlice) MinBy

func (rcv ProjectSlice) MinBy(less func(*Project, *Project) bool) (result *Project, err error)

MinBy returns an element of ProjectSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (ProjectSlice) Shuffle

func (rcv ProjectSlice) Shuffle() ProjectSlice

Shuffle returns a shuffled copy of ProjectSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (ProjectSlice) SortBy

func (rcv ProjectSlice) SortBy(less func(*Project, *Project) bool) ProjectSlice

SortBy returns a new ordered ProjectSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (ProjectSlice) Where

func (rcv ProjectSlice) Where(fn func(*Project) bool) (result ProjectSlice)

Where returns a new ProjectSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type ProjectsOption

type ProjectsOption struct {
	Archived bool `url:"archived,omitempty"`
	All      bool `url:"all,omitempty"`
}

ProjectsOption represents

func (*ProjectsOption) Values

func (c *ProjectsOption) Values() (url.Values, error)

Values returns

type Resolution

type Resolution struct {
	ID   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

Resolution represents

type SharedFile

type SharedFile struct {
	ID          *int       `json:"id,omitempty"`
	Type        *string    `json:"type,omitempty"`
	Directory   *string    `json:"dir,omitempty"`
	Name        *string    `json:"name,omitempty"`
	Size        *int64     `json:"size,omitempty"`
	CreatedUser *User      `json:"createdUser,omitempty"`
	Created     *time.Time `json:"created,omitempty"`
	UpdatedUser *User      `json:"updatedUser,omitempty"`
	Updated     *time.Time `json:"updated,omitempty"`
}

SharedFile represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type SharedFileSlice

type SharedFileSlice []*SharedFile

SharedFileSlice is a slice of type *SharedFile. Use it where you would use []*SharedFile.

func (SharedFileSlice) Count

func (rcv SharedFileSlice) Count(fn func(*SharedFile) bool) (result int)

Count gives the number elements of SharedFileSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (SharedFileSlice) Distinct

func (rcv SharedFileSlice) Distinct() (result SharedFileSlice)

Distinct returns a new SharedFileSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (SharedFileSlice) DistinctBy

func (rcv SharedFileSlice) DistinctBy(equal func(*SharedFile, *SharedFile) bool) (result SharedFileSlice)

DistinctBy returns a new SharedFileSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (SharedFileSlice) First

func (rcv SharedFileSlice) First(fn func(*SharedFile) bool) (result *SharedFile, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (SharedFileSlice) GroupByBool

func (rcv SharedFileSlice) GroupByBool(fn func(*SharedFile) bool) map[bool]SharedFileSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (SharedFileSlice) GroupByInt

func (rcv SharedFileSlice) GroupByInt(fn func(*SharedFile) int) map[int]SharedFileSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (SharedFileSlice) GroupByString

func (rcv SharedFileSlice) GroupByString(fn func(*SharedFile) string) map[string]SharedFileSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (SharedFileSlice) MaxBy

func (rcv SharedFileSlice) MaxBy(less func(*SharedFile, *SharedFile) bool) (result *SharedFile, err error)

MaxBy returns an element of SharedFileSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (SharedFileSlice) MinBy

func (rcv SharedFileSlice) MinBy(less func(*SharedFile, *SharedFile) bool) (result *SharedFile, err error)

MinBy returns an element of SharedFileSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (SharedFileSlice) Shuffle

func (rcv SharedFileSlice) Shuffle() SharedFileSlice

Shuffle returns a shuffled copy of SharedFileSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (SharedFileSlice) SortBy

func (rcv SharedFileSlice) SortBy(less func(*SharedFile, *SharedFile) bool) SharedFileSlice

SortBy returns a new ordered SharedFileSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (SharedFileSlice) Where

func (rcv SharedFileSlice) Where(fn func(*SharedFile) bool) (result SharedFileSlice)

Where returns a new SharedFileSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type SortOrder

type SortOrder string

SortOrder enum

const (
	Ascending  SortOrder = "asc"
	Descending           = "desc"
)

SortOrder enum

type Space

type Space struct {
	SpaceKey           *string    `json:"spaceKey,omitempty"`
	Name               *string    `json:"name,omitempty"`
	OwnerID            *int       `json:"ownerId,omitempty"`
	Lang               *string    `json:"lang,omitempty"`
	Timezone           *string    `json:"timezone,omitempty"`
	ReportSendTime     *string    `json:"reportSendTime,omitempty"`
	TextFormattingRule *string    `json:"textFormattingRule,omitempty"`
	Created            *time.Time `json:"created,omitempty"`
	Updated            *time.Time `json:"updated,omitempty"`
}

Space represents

type SpaceNotification

type SpaceNotification struct {
	Content *string    `json:"content,omitempty"`
	Updated *time.Time `json:"updated,omitempty"`
}

SpaceNotification represents

type Star

type Star struct {
	ID        *int       `json:"id,omitempty"`
	Comment   *string    `json:"comment,omitempty"`
	URL       *string    `json:"url,omitempty"`
	Title     *string    `json:"name,omitempty"`
	Created   *time.Time `json:"created,omitempty"`
	Presenter *User      `json:"presenter,omitempty"`
}

Star represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type StarSlice

type StarSlice []*Star

StarSlice is a slice of type *Star. Use it where you would use []*Star.

func (StarSlice) Count

func (rcv StarSlice) Count(fn func(*Star) bool) (result int)

Count gives the number elements of StarSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (StarSlice) Distinct

func (rcv StarSlice) Distinct() (result StarSlice)

Distinct returns a new StarSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (StarSlice) DistinctBy

func (rcv StarSlice) DistinctBy(equal func(*Star, *Star) bool) (result StarSlice)

DistinctBy returns a new StarSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (StarSlice) First

func (rcv StarSlice) First(fn func(*Star) bool) (result *Star, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (StarSlice) GroupByBool

func (rcv StarSlice) GroupByBool(fn func(*Star) bool) map[bool]StarSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (StarSlice) GroupByInt

func (rcv StarSlice) GroupByInt(fn func(*Star) int) map[int]StarSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (StarSlice) GroupByString

func (rcv StarSlice) GroupByString(fn func(*Star) string) map[string]StarSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (StarSlice) MaxBy

func (rcv StarSlice) MaxBy(less func(*Star, *Star) bool) (result *Star, err error)

MaxBy returns an element of StarSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (StarSlice) MinBy

func (rcv StarSlice) MinBy(less func(*Star, *Star) bool) (result *Star, err error)

MinBy returns an element of StarSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (StarSlice) Shuffle

func (rcv StarSlice) Shuffle() StarSlice

Shuffle returns a shuffled copy of StarSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (StarSlice) SortBy

func (rcv StarSlice) SortBy(less func(*Star, *Star) bool) StarSlice

SortBy returns a new ordered StarSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (StarSlice) Where

func (rcv StarSlice) Where(fn func(*Star) bool) (result StarSlice)

Where returns a new StarSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type Status

type Status struct {
	ID   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

Status represents

type User

type User struct {
	ID           *int    `json:"id,omitempty"`
	UserID       *string `json:"userId,omitempty"`
	Name         *string `json:"name,omitempty"`
	RoleType     *int    `json:"roleType,omitempty"`
	Lang         *string `json:"lang,omitempty"`
	MailAddress  *string `json:"mailAddress,omitempty"`
	NulabAccount *string `json:"nulabAccount,omitempty"`
}

User represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type UserSlice

type UserSlice []*User

UserSlice is a slice of type *User. Use it where you would use []*User.

func (UserSlice) Count

func (rcv UserSlice) Count(fn func(*User) bool) (result int)

Count gives the number elements of UserSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (UserSlice) Distinct

func (rcv UserSlice) Distinct() (result UserSlice)

Distinct returns a new UserSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (UserSlice) DistinctBy

func (rcv UserSlice) DistinctBy(equal func(*User, *User) bool) (result UserSlice)

DistinctBy returns a new UserSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (UserSlice) First

func (rcv UserSlice) First(fn func(*User) bool) (result *User, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (UserSlice) GroupByBool

func (rcv UserSlice) GroupByBool(fn func(*User) bool) map[bool]UserSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (UserSlice) GroupByInt

func (rcv UserSlice) GroupByInt(fn func(*User) int) map[int]UserSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (UserSlice) GroupByString

func (rcv UserSlice) GroupByString(fn func(*User) string) map[string]UserSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (UserSlice) MaxBy

func (rcv UserSlice) MaxBy(less func(*User, *User) bool) (result *User, err error)

MaxBy returns an element of UserSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (UserSlice) MinBy

func (rcv UserSlice) MinBy(less func(*User, *User) bool) (result *User, err error)

MinBy returns an element of UserSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (UserSlice) Shuffle

func (rcv UserSlice) Shuffle() UserSlice

Shuffle returns a shuffled copy of UserSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (UserSlice) SortBy

func (rcv UserSlice) SortBy(less func(*User, *User) bool) UserSlice

SortBy returns a new ordered UserSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (UserSlice) Where

func (rcv UserSlice) Where(fn func(*User) bool) (result UserSlice)

Where returns a new UserSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

type Version

type Version struct {
	ID             *int       `json:"id,omitempty"`
	ProjectID      *int       `json:"projectId,omitempty"`
	Name           *string    `json:"name,omitempty"`
	Description    *string    `json:"description,omitempty"`
	StartDate      *time.Time `json:"startDate,omitempty"`
	ReleaseDueDate *time.Time `json:"releaseDueDate,omitempty"`
	Archived       *bool      `json:"archived,omitempty"`
	DisplayOrder   *int       `json:"displayOrder,omitempty"`
}

Version represents +gen * slice:"Where,Count,SortBy,GroupBy[string],GroupBy[int],GroupBy[bool],first,MaxBy,MinBy,Distinct,DistinctBy,Shuffle"

type VersionSlice

type VersionSlice []*Version

VersionSlice is a slice of type *Version. Use it where you would use []*Version.

func (VersionSlice) Count

func (rcv VersionSlice) Count(fn func(*Version) bool) (result int)

Count gives the number elements of VersionSlice that return true for the passed func. See: http://clipperhouse.github.io/gen/#Count

func (VersionSlice) Distinct

func (rcv VersionSlice) Distinct() (result VersionSlice)

Distinct returns a new VersionSlice whose elements are unique. See: http://clipperhouse.github.io/gen/#Distinct

func (VersionSlice) DistinctBy

func (rcv VersionSlice) DistinctBy(equal func(*Version, *Version) bool) (result VersionSlice)

DistinctBy returns a new VersionSlice whose elements are unique, where equality is defined by a passed func. See: http://clipperhouse.github.io/gen/#DistinctBy

func (VersionSlice) First

func (rcv VersionSlice) First(fn func(*Version) bool) (result *Version, err error)

First returns the first element that returns true for the passed func. Returns error if no elements return true. See: http://clipperhouse.github.io/gen/#First

func (VersionSlice) GroupByBool

func (rcv VersionSlice) GroupByBool(fn func(*Version) bool) map[bool]VersionSlice

GroupByBool groups elements into a map keyed by bool. See: http://clipperhouse.github.io/gen/#GroupBy

func (VersionSlice) GroupByInt

func (rcv VersionSlice) GroupByInt(fn func(*Version) int) map[int]VersionSlice

GroupByInt groups elements into a map keyed by int. See: http://clipperhouse.github.io/gen/#GroupBy

func (VersionSlice) GroupByString

func (rcv VersionSlice) GroupByString(fn func(*Version) string) map[string]VersionSlice

GroupByString groups elements into a map keyed by string. See: http://clipperhouse.github.io/gen/#GroupBy

func (VersionSlice) MaxBy

func (rcv VersionSlice) MaxBy(less func(*Version, *Version) bool) (result *Version, err error)

MaxBy returns an element of VersionSlice containing the maximum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally maximal, the last such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MaxBy

func (VersionSlice) MinBy

func (rcv VersionSlice) MinBy(less func(*Version, *Version) bool) (result *Version, err error)

MinBy returns an element of VersionSlice containing the minimum value, when compared to other elements using a passed func defining ‘less’. In the case of multiple items being equally minimal, the first such element is returned. Returns error if no elements. See: http://clipperhouse.github.io/gen/#MinBy

func (VersionSlice) Shuffle

func (rcv VersionSlice) Shuffle() VersionSlice

Shuffle returns a shuffled copy of VersionSlice, using a version of the Fisher-Yates shuffle. See: http://clipperhouse.github.io/gen/#Shuffle

func (VersionSlice) SortBy

func (rcv VersionSlice) SortBy(less func(*Version, *Version) bool) VersionSlice

SortBy returns a new ordered VersionSlice, determined by a func defining ‘less’. See: http://clipperhouse.github.io/gen/#SortBy

func (VersionSlice) Where

func (rcv VersionSlice) Where(fn func(*Version) bool) (result VersionSlice)

Where returns a new VersionSlice whose elements return true for func. See: http://clipperhouse.github.io/gen/#Where

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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