trello

package
v0.0.0-...-1ace73d Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

* trellofs - A Trello POSIX filesystem * Copyright (C) 2022 Joao Eduardo Luis <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version.

* trellofs - A Trello POSIX filesystem * Copyright (C) 2022 Joao Eduardo Luis <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version.

* trellofs - A Trello POSIX filesystem * Copyright (C) 2022 Joao Eduardo Luis <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeEndpoint

func MakeEndpoint(endpoint string, fields []string) string

Types

type Board

type Board struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Desc     string `json:"desc"`
	DescData string `json:"descData"`
	Closed   bool   `json:"closed"`
}

func (*Board) GetCards

func (board *Board) GetCards(ctx *TrelloCtx) ([]Card, error)

func (*Board) GetLists

func (board *Board) GetLists(
	client *TrelloCtx,
) ([]List, error)

type Card

type Card struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Desc string `json:"desc"`

	ListID    string   `json:"idList"`
	BoardID   string   `json:"idBoard"`
	MemberIDs []string `json:"idMembers"`

	Labels      []CardLabel `json:"labels"`
	Due         string      `json:"due"`
	DueComplete bool        `json:"dueComplete"`
	LastActive  string      `json:"dateLastActivity"`

	Board *Board
}

type CardLabel

type CardLabel struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type EntityType

type EntityType uint16
const (
	TYPE_NONE EntityType = iota
	TYPE_WORKSPACE
	TYPE_BOARD
	TYPE_LIST
	TYPE_CARD
	TYPE_BOARD_CARDS
	TYPE_BOARD_LISTS
)

type List

type List struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Closed bool   `json:"closed"`
	Board  *Board
}

func (*List) GetCards

func (list *List) GetCards(
	client *TrelloCtx,
) ([]Card, error)

type TrelloCtx

type TrelloCtx struct {
	ID    string
	Key   string
	Token string
	// contains filtered or unexported fields
}

func Trello

func Trello(id string, key string, token string) *TrelloCtx

func (*TrelloCtx) ApiGet

func (t *TrelloCtx) ApiGet(endpoint string) ([]byte, error)

func (*TrelloCtx) NewRequest

func (t *TrelloCtx) NewRequest(
	method string,
	endpoint string,
	body io.Reader,
) (*http.Request, error)

type Workspace

type Workspace struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Desc        string `json:"desc"`
}

func GetWorkspaces

func GetWorkspaces(ctx *TrelloCtx) ([]Workspace, error)

func (*Workspace) GetBoards

func (workspace *Workspace) GetBoards(
	ctx *TrelloCtx,
) ([]Board, error)

Jump to

Keyboard shortcuts

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