trello

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBoardNotFound = errors.New("board not found")

ErrBoardNotFound is returned when a board is not found

Functions

This section is empty.

Types

type Backend added in v0.1.2

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

Backend ensures the state is updated as required

func NewBackend added in v0.1.2

func NewBackend(cfg *Config) *Backend

NewBackend returns a new instance of Backend

func (*Backend) Run added in v0.1.2

func (u *Backend) Run(ctx context.Context)

Run executes the loop exuting the requests via the trello client

func (*Backend) Store added in v0.1.2

func (u *Backend) Store() *store.Store

Store returns the Store instance to which new data is stored

type Client

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

Client makes requests via the trello API to get data for the current user

func NewClient

func NewClient(cfg *Config) *Client

NewClient returns a new instance of Client

func (*Client) Board

func (t *Client) Board(name string) (*trello.Board, []trello.List, []trello.Card, error)

Board returns a domain.Board populated with the latest info about the specified board

func (*Client) CardActions added in v0.1.2

func (t *Client) CardActions(card *trello.Card) ([]trello.Action, error)

CardActions returns a list of trello.Action for the provided card

type Config

type Config struct {
	User, Key, Token     string
	Timeout              time.Duration
	SelectedBoard        string
	BoardRefreshInterval time.Duration
}

Config is the state configuration, including trello authentication details

Jump to

Keyboard shortcuts

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