Documentation ¶
Overview ¶
Package trello is a generated GoMock package.
Index ¶
- Variables
- type Board
- type Boards
- type CacheInMemory
- func (c *CacheInMemory) ArchiveAllCards(idList string) error
- func (c *CacheInMemory) CreateCard(createCard CreateCard) (*Card, error)
- func (c *CacheInMemory) CreateComment(createComment CreateComment) (*Comment, error)
- func (c *CacheInMemory) DeleteComment(idCard, idComment string) error
- func (c *CacheInMemory) FindBoard(query string) (*Board, error)
- func (c *CacheInMemory) FindBoards() (Boards, error)
- func (c *CacheInMemory) FindCard(idList string, query string) (*Card, error)
- func (c *CacheInMemory) FindCards(idList string) (Cards, error)
- func (c *CacheInMemory) FindComment(idCard string, idComment string) (*Comment, error)
- func (c *CacheInMemory) FindComments(idCard string) (Comments, error)
- func (c *CacheInMemory) FindLabels(idBoard string) (Labels, error)
- func (c *CacheInMemory) FindList(idBoard string, query string) (*List, error)
- func (c *CacheInMemory) FindLists(idBoard string) (Lists, error)
- func (c *CacheInMemory) Refresh()
- func (c *CacheInMemory) UpdateCard(updateCard UpdateCard) (*Card, error)
- func (c *CacheInMemory) UpdateComment(updateComment UpdateComment) (*Comment, error)
- type Card
- type CardToCreate
- type CardToEdit
- type Cards
- type Comment
- type CommentData
- type CommentDataCard
- type CommentMemberCreator
- type Comments
- type CreateCard
- type CreateComment
- type HttpRepository
- func (h HttpRepository) ArchiveAllCards(idList string) error
- func (h HttpRepository) CreateCard(createCard CreateCard) (*Card, error)
- func (h HttpRepository) CreateComment(createComment CreateComment) (*Comment, error)
- func (h HttpRepository) DeleteComment(idCard, idComment string) error
- func (h HttpRepository) FindBoard(query string) (*Board, error)
- func (h HttpRepository) FindBoards() (Boards, error)
- func (h HttpRepository) FindCard(idList string, query string) (*Card, error)
- func (h HttpRepository) FindCards(idList string) (Cards, error)
- func (h HttpRepository) FindComment(_, idComment string) (*Comment, error)
- func (h HttpRepository) FindComments(idCard string) (Comments, error)
- func (h HttpRepository) FindLabels(idBoard string) (Labels, error)
- func (h HttpRepository) FindList(idBoard string, query string) (*List, error)
- func (h HttpRepository) FindLists(idBoard string) (Lists, error)
- func (h HttpRepository) Refresh()
- func (h HttpRepository) UpdateCard(updateCard UpdateCard) (*Card, error)
- func (h HttpRepository) UpdateComment(updateComment UpdateComment) (*Comment, error)
- type Label
- type LabelFilter
- type Labels
- type List
- type Lists
- type MockRepository
- func (m *MockRepository) ArchiveAllCards(idList string) error
- func (m *MockRepository) CreateCard(createCard CreateCard) (*Card, error)
- func (m *MockRepository) CreateComment(createComment CreateComment) (*Comment, error)
- func (m *MockRepository) DeleteComment(idCard, idComment string) error
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) FindBoard(query string) (*Board, error)
- func (m *MockRepository) FindBoards() (Boards, error)
- func (m *MockRepository) FindCard(idList, query string) (*Card, error)
- func (m *MockRepository) FindCards(idList string) (Cards, error)
- func (m *MockRepository) FindComment(idCard, idComment string) (*Comment, error)
- func (m *MockRepository) FindComments(idCard string) (Comments, error)
- func (m *MockRepository) FindLabels(idBoard string) (Labels, error)
- func (m *MockRepository) FindList(idBoard, query string) (*List, error)
- func (m *MockRepository) FindLists(idBoard string) (Lists, error)
- func (m *MockRepository) Refresh()
- func (m *MockRepository) UpdateCard(updateCard UpdateCard) (*Card, error)
- func (m *MockRepository) UpdateComment(updateComment UpdateComment) (*Comment, error)
- type MockRepositoryMockRecorder
- func (mr *MockRepositoryMockRecorder) ArchiveAllCards(idList interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) CreateCard(createCard interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) CreateComment(createComment interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) DeleteComment(idCard, idComment interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindBoard(query interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindBoards() *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindCard(idList, query interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindCards(idList interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindComment(idCard, idComment interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindComments(idCard interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindLabels(idBoard interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindList(idBoard, query interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindLists(idBoard interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) Refresh() *gomock.Call
- func (mr *MockRepositoryMockRecorder) UpdateCard(updateCard interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) UpdateComment(updateComment interface{}) *gomock.Call
- type Path
- type PathResolver
- type Repository
- type Session
- type UpdateCard
- type UpdateComment
Constants ¶
This section is empty.
Variables ¶
var LabelFilterByColor = func(s string, l Label) bool {
return s == l.Color
}
var LabelFilterByID = func(s string, l Label) bool {
return s == l.ID
}
var LabelFilterByTCliColor = func(s string, l Label) bool {
return s == l.ToTCliColor()
}
var LabelFilterOr = func(filters ...LabelFilter) LabelFilter { return func(s string, l Label) bool { for _, filter := range filters { if filter(s, l) { return true } } return false } }
Functions ¶
This section is empty.
Types ¶
type Board ¶
type Board struct { ID string `json:"id"` Name string `json:"name"` ShortLink string `json:"shortLink"` ShortURL string `json:"shortUrl"` DateLastActivity string `json:"dateLastActivity"` }
func (Board) SanitizedName ¶
type CacheInMemory ¶
type CacheInMemory struct { *Boards // contains filtered or unexported fields }
CacheInMemory is a decorator that caches the results of the proxified Repository in memory
func (*CacheInMemory) ArchiveAllCards ¶
func (c *CacheInMemory) ArchiveAllCards(idList string) error
func (*CacheInMemory) CreateCard ¶
func (c *CacheInMemory) CreateCard(createCard CreateCard) (*Card, error)
func (*CacheInMemory) CreateComment ¶
func (c *CacheInMemory) CreateComment(createComment CreateComment) (*Comment, error)
func (*CacheInMemory) DeleteComment ¶
func (c *CacheInMemory) DeleteComment(idCard, idComment string) error
func (*CacheInMemory) FindBoards ¶
func (c *CacheInMemory) FindBoards() (Boards, error)
func (*CacheInMemory) FindCard ¶
func (c *CacheInMemory) FindCard(idList string, query string) (*Card, error)
func (*CacheInMemory) FindComment ¶
func (c *CacheInMemory) FindComment(idCard string, idComment string) (*Comment, error)
func (*CacheInMemory) FindComments ¶
func (c *CacheInMemory) FindComments(idCard string) (Comments, error)
func (*CacheInMemory) FindLabels ¶
func (c *CacheInMemory) FindLabels(idBoard string) (Labels, error)
func (*CacheInMemory) FindList ¶
func (c *CacheInMemory) FindList(idBoard string, query string) (*List, error)
func (*CacheInMemory) Refresh ¶
func (c *CacheInMemory) Refresh()
func (*CacheInMemory) UpdateCard ¶
func (c *CacheInMemory) UpdateCard(updateCard UpdateCard) (*Card, error)
func (*CacheInMemory) UpdateComment ¶
func (c *CacheInMemory) UpdateComment(updateComment UpdateComment) (*Comment, error)
type Card ¶
type Card struct { ID string `json:"id" toml:"id"` Name string `json:"name" toml:"name"` Desc string `json:"desc" toml:"desc"` IDBoard string `json:"idBoard" toml:"idBoard"` IDList string `json:"idList" toml:"idList"` Closed bool `json:"closed" toml:"closed"` ShortLink string `json:"shortLink" toml:"shortLink"` ShortURL string `json:"shortUrl" toml:"shortUrl"` Pos float64 `json:"pos" toml:"pos"` Labels `json:"labels" toml:"labels"` }
func (Card) SanitizedName ¶
type CardToCreate ¶
type CardToCreate struct { Name string `yaml:"name" toml:"name"` Desc string `yaml:"desc" toml:"desc"` IDList string `yaml:"idList" toml:"idList"` Pos string `yaml:"pos,omitempty" toml:"pos,omitempty"` // "top", "bottom" or a positive float Labels []string `yaml:"labels" toml:"labels"` }
CardToCreate is the representation used in the card creation it's different from the other card representation because we do not want to expose everything to the user like for instance, the card ID as the user
func NewCardToCreate ¶
func NewCardToCreate(card Card, defaultLabels []string) CardToCreate
func (CardToCreate) GetPos ¶
func (ctc CardToCreate) GetPos() interface{}
type CardToEdit ¶
type CardToEdit struct { Name string `yaml:"name" toml:"name"` Desc string `yaml:"desc" toml:"desc"` Closed bool `yaml:"closed" toml:"closed"` IDList string `yaml:"idList" toml:"idList"` Labels []string `yaml:"labels" toml:"labels"` Pos string `yaml:"pos,omitempty" toml:"pos,omitempty"` // "top", "bottom" or a positive float }
CardToEdit is the representation used in the card edition it's different from the other card representation because we do not want to expose everything to the user like for instance, the card ID as the user
func NewCardToEdit ¶
func NewCardToEdit(card Card) CardToEdit
func (CardToEdit) GetPos ¶
func (cte CardToEdit) GetPos() interface{}
type Comment ¶
type Comment struct { ID string `json:"id"` Date string `json:"date"` Data CommentData `json:"data"` MemberCreator CommentMemberCreator `json:"memberCreator"` }
func FindComment ¶
type CommentData ¶
type CommentData struct { Card CommentDataCard `json:"card"` Text string `json:"text"` }
type CommentDataCard ¶
type CommentMemberCreator ¶
type CreateCard ¶
type CreateCard struct { Name string `json:"name" toml:"name"` Desc string `json:"desc" toml:"desc"` IDList string `json:"idList" toml:"idList"` IDLabels string `json:"idLabels,omitempty" toml:"idLabels,omitempty"` Closed bool `json:"closed,omitempty" toml:"closed,omitempty"` Pos interface{} `json:"pos,omitempty" toml:"pos,omitempty"` // "top", "bottom" or a positive float }
CreateCard represents the resources used to create a new card See https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-post for more info
func NewCreateCard ¶
func NewCreateCard(card Card) CreateCard
type CreateComment ¶
type HttpRepository ¶
HttpRepository fetches the results from Trello APIs
func (HttpRepository) ArchiveAllCards ¶
func (h HttpRepository) ArchiveAllCards(idList string) error
func (HttpRepository) CreateCard ¶
func (h HttpRepository) CreateCard(createCard CreateCard) (*Card, error)
func (HttpRepository) CreateComment ¶
func (h HttpRepository) CreateComment(createComment CreateComment) (*Comment, error)
func (HttpRepository) DeleteComment ¶
func (h HttpRepository) DeleteComment(idCard, idComment string) error
func (HttpRepository) FindBoards ¶
func (h HttpRepository) FindBoards() (Boards, error)
func (HttpRepository) FindCard ¶
func (h HttpRepository) FindCard(idList string, query string) (*Card, error)
func (HttpRepository) FindComment ¶
func (h HttpRepository) FindComment(_, idComment string) (*Comment, error)
func (HttpRepository) FindComments ¶
func (h HttpRepository) FindComments(idCard string) (Comments, error)
func (HttpRepository) FindLabels ¶
func (h HttpRepository) FindLabels(idBoard string) (Labels, error)
func (HttpRepository) FindList ¶
func (h HttpRepository) FindList(idBoard string, query string) (*List, error)
func (HttpRepository) Refresh ¶
func (h HttpRepository) Refresh()
func (HttpRepository) UpdateCard ¶
func (h HttpRepository) UpdateCard(updateCard UpdateCard) (*Card, error)
func (HttpRepository) UpdateComment ¶
func (h HttpRepository) UpdateComment(updateComment UpdateComment) (*Comment, error)
type Label ¶
type Label struct { ID string `json:"id"` IDBoard string `json:"idBoard"` Name string `json:"name"` Color string `json:"color"` }
func (Label) ToTCliColor ¶
type LabelFilter ¶
type Labels ¶
type Labels []Label
func (Labels) IDLabelsInString ¶
func (Labels) ToSliceTCliColors ¶
type List ¶
type List struct { ID string `json:"id"` Name string `json:"name"` IDBoard string `json:"idBoard"` }
func (List) SanitizedName ¶
type MockRepository ¶
type MockRepository struct {
// contains filtered or unexported fields
}
MockRepository is a mock of Repository interface.
func NewMockRepository ¶
func NewMockRepository(ctrl *gomock.Controller) *MockRepository
NewMockRepository creates a new mock instance.
func (*MockRepository) ArchiveAllCards ¶
func (m *MockRepository) ArchiveAllCards(idList string) error
ArchiveAllCards mocks base method.
func (*MockRepository) CreateCard ¶
func (m *MockRepository) CreateCard(createCard CreateCard) (*Card, error)
CreateCard mocks base method.
func (*MockRepository) CreateComment ¶
func (m *MockRepository) CreateComment(createComment CreateComment) (*Comment, error)
CreateComment mocks base method.
func (*MockRepository) DeleteComment ¶
func (m *MockRepository) DeleteComment(idCard, idComment string) error
DeleteComment mocks base method.
func (*MockRepository) EXPECT ¶
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRepository) FindBoard ¶
func (m *MockRepository) FindBoard(query string) (*Board, error)
FindBoard mocks base method.
func (*MockRepository) FindBoards ¶
func (m *MockRepository) FindBoards() (Boards, error)
FindBoards mocks base method.
func (*MockRepository) FindCard ¶
func (m *MockRepository) FindCard(idList, query string) (*Card, error)
FindCard mocks base method.
func (*MockRepository) FindCards ¶
func (m *MockRepository) FindCards(idList string) (Cards, error)
FindCards mocks base method.
func (*MockRepository) FindComment ¶
func (m *MockRepository) FindComment(idCard, idComment string) (*Comment, error)
FindComment mocks base method.
func (*MockRepository) FindComments ¶
func (m *MockRepository) FindComments(idCard string) (Comments, error)
FindComments mocks base method.
func (*MockRepository) FindLabels ¶
func (m *MockRepository) FindLabels(idBoard string) (Labels, error)
FindLabels mocks base method.
func (*MockRepository) FindList ¶
func (m *MockRepository) FindList(idBoard, query string) (*List, error)
FindList mocks base method.
func (*MockRepository) FindLists ¶
func (m *MockRepository) FindLists(idBoard string) (Lists, error)
FindLists mocks base method.
func (*MockRepository) UpdateCard ¶
func (m *MockRepository) UpdateCard(updateCard UpdateCard) (*Card, error)
UpdateCard mocks base method.
func (*MockRepository) UpdateComment ¶
func (m *MockRepository) UpdateComment(updateComment UpdateComment) (*Comment, error)
UpdateComment mocks base method.
type MockRepositoryMockRecorder ¶
type MockRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRepositoryMockRecorder is the mock recorder for MockRepository.
func (*MockRepositoryMockRecorder) ArchiveAllCards ¶
func (mr *MockRepositoryMockRecorder) ArchiveAllCards(idList interface{}) *gomock.Call
ArchiveAllCards indicates an expected call of ArchiveAllCards.
func (*MockRepositoryMockRecorder) CreateCard ¶
func (mr *MockRepositoryMockRecorder) CreateCard(createCard interface{}) *gomock.Call
CreateCard indicates an expected call of CreateCard.
func (*MockRepositoryMockRecorder) CreateComment ¶
func (mr *MockRepositoryMockRecorder) CreateComment(createComment interface{}) *gomock.Call
CreateComment indicates an expected call of CreateComment.
func (*MockRepositoryMockRecorder) DeleteComment ¶
func (mr *MockRepositoryMockRecorder) DeleteComment(idCard, idComment interface{}) *gomock.Call
DeleteComment indicates an expected call of DeleteComment.
func (*MockRepositoryMockRecorder) FindBoard ¶
func (mr *MockRepositoryMockRecorder) FindBoard(query interface{}) *gomock.Call
FindBoard indicates an expected call of FindBoard.
func (*MockRepositoryMockRecorder) FindBoards ¶
func (mr *MockRepositoryMockRecorder) FindBoards() *gomock.Call
FindBoards indicates an expected call of FindBoards.
func (*MockRepositoryMockRecorder) FindCard ¶
func (mr *MockRepositoryMockRecorder) FindCard(idList, query interface{}) *gomock.Call
FindCard indicates an expected call of FindCard.
func (*MockRepositoryMockRecorder) FindCards ¶
func (mr *MockRepositoryMockRecorder) FindCards(idList interface{}) *gomock.Call
FindCards indicates an expected call of FindCards.
func (*MockRepositoryMockRecorder) FindComment ¶
func (mr *MockRepositoryMockRecorder) FindComment(idCard, idComment interface{}) *gomock.Call
FindComment indicates an expected call of FindComment.
func (*MockRepositoryMockRecorder) FindComments ¶
func (mr *MockRepositoryMockRecorder) FindComments(idCard interface{}) *gomock.Call
FindComments indicates an expected call of FindComments.
func (*MockRepositoryMockRecorder) FindLabels ¶
func (mr *MockRepositoryMockRecorder) FindLabels(idBoard interface{}) *gomock.Call
FindLabels indicates an expected call of FindLabels.
func (*MockRepositoryMockRecorder) FindList ¶
func (mr *MockRepositoryMockRecorder) FindList(idBoard, query interface{}) *gomock.Call
FindList indicates an expected call of FindList.
func (*MockRepositoryMockRecorder) FindLists ¶
func (mr *MockRepositoryMockRecorder) FindLists(idBoard interface{}) *gomock.Call
FindLists indicates an expected call of FindLists.
func (*MockRepositoryMockRecorder) Refresh ¶
func (mr *MockRepositoryMockRecorder) Refresh() *gomock.Call
Refresh indicates an expected call of Refresh.
func (*MockRepositoryMockRecorder) UpdateCard ¶
func (mr *MockRepositoryMockRecorder) UpdateCard(updateCard interface{}) *gomock.Call
UpdateCard indicates an expected call of UpdateCard.
func (*MockRepositoryMockRecorder) UpdateComment ¶
func (mr *MockRepositoryMockRecorder) UpdateComment(updateComment interface{}) *gomock.Call
UpdateComment indicates an expected call of UpdateComment.
type PathResolver ¶
type PathResolver struct {
Path
}
func NewPathResolver ¶
func NewPathResolver(session *Session) PathResolver
type Repository ¶
type Repository interface { Refresh() FindBoards() (Boards, error) FindBoard(query string) (*Board, error) FindLabels(idBoard string) (Labels, error) FindLists(idBoard string) (Lists, error) FindList(idBoard string, query string) (*List, error) FindCards(idList string) (Cards, error) FindCard(idList string, query string) (*Card, error) ArchiveAllCards(idList string) error CreateCard(createCard CreateCard) (*Card, error) UpdateCard(updateCard UpdateCard) (*Card, error) FindComments(idCard string) (Comments, error) FindComment(idCard string, idComment string) (*Comment, error) CreateComment(createComment CreateComment) (*Comment, error) UpdateComment(updateComment UpdateComment) (*Comment, error) DeleteComment(idCard, idComment string) error }
Repository to call perform CRUD operation on Trello resources We may want to update this interface to accept channels to support async
func NewCacheInMemory ¶
func NewCacheInMemory(r Repository) Repository
func NewHttpRepository ¶
func NewHttpRepository(c conf.Conf, debug bool) Repository
type UpdateCard ¶
type UpdateCard struct { ID string `json:"id" toml:"id"` Name string `json:"name" toml:"name"` Desc string `json:"desc" toml:"desc"` IDBoard string `json:"idBoard" toml:"idBoard"` IDList string `json:"idList" toml:"idList"` IDLabels string `json:"idLabels,omitempty" toml:"idLabels,omitempty"` Closed bool `json:"closed,omitempty" toml:"closed,omitempty"` Pos interface{} `json:"pos,omitempty" toml:"pos,omitempty"` // "top", "bottom" or a positive float }
UpdateCard represents the resources used to update a card See https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put for more info
func NewUpdateCard ¶
func NewUpdateCard(card Card) UpdateCard