pivotal

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MPL-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Epic

type Epic struct {
	ID        int       `json:"id"`
	Kind      string    `json:"kind"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	//    CreatedAt   int64    `json:"created_at"`
	//    UpdatedAt   int64    `json:"updated_at"`
	ProjectID int    `json:"project_id"`
	Name      string `json:"name"`
	URL       string `json:"url"`
	Label     Label  `json:"label"`
}

type EpicResponse

type EpicResponse struct {
	Epics             []Epic `json:"epics"`
	TotalHits         int    `json:"total_hits"`
	TotalHitsWithDone int    `json:"total_hits_with_done"`
}

type Error

type Error struct {
	Code  string `json:"code"`
	Kind  string `json:"kind"`
	Error string `json:"error"`
}

type Label

type Label struct {
	ID        int       `json:"id"`
	ProjectID int       `json:"project_id"`
	Kind      string    `json:"kind"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type PivotalClient

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

func NewPivotalClient

func NewPivotalClient(token string, projectId string) *PivotalClient

type PivotalSource

type PivotalSource struct {
	Err error
	// contains filtered or unexported fields
}

func NewPivotalSource

func NewPivotalSource(name string, filter string, client *PivotalClient, widget *Widget) *PivotalSource

NewPivotalSource returns a new Pivotal Filter source with a name

func (*PivotalSource) Open

func (source *PivotalSource) Open()

Open: Will open Pivotal search url with filter applied using the utils helper

func (*PivotalSource) OpenPulls

func (source *PivotalSource) OpenPulls()

OpenPulls will open the GitHub Pull Requests URL using the utils helper

type PivotalTrackerResponse

type PivotalTrackerResponse struct {
	Stories *StoryResponse `json:"stories"`
	Epics   *EpicResponse  `json:"epics"`
	Query   string         `json:"query"`
}

type Resource

type Resource struct {
	Response interface{}
	Raw      string
}

type Settings

type Settings struct {
	*cfg.Common
	// contains filtered or unexported fields
}

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings

type Story

type Story struct {
	Kind       string    `json:"kind"`
	ID         int       `json:"id"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
	AcceptedAt time.Time `json:"accepted_at"`
	//    CreatedAt       int64    `json:"created_at"`
	//    UpdatedAt       int64    `json:"updated_at"`
	//    AcceptedAt      int64    `json:"accepted_at"`
	Estimate        int                `json:"estimate"`
	StoryType       string             `json:"story_type"`
	StoryPriority   string             `json:"story_priority"`
	Name            string             `json:"name"`
	Description     string             `json:"description"`
	CurrentState    string             `json:"current_state"`
	RequestedByID   int                `json:"requested_by_id"`
	URL             string             `json:"url"`
	ProjectID       int                `json:"project_id"`
	OwnerIDs        []int              `json:"owner_ids"`
	OwnedByID       int                `json:"owned_by_id"`
	Labels          []Label            `json:"labels"`
	Tasks           []interface{}      `json:"tasks"`
	PullRequests    []StoryPullRequest `json:"pull_requests"`
	CicdEvents      []interface{}      `json:"cicd_events"`
	Branches        []StoryBranch      `json:"branches"`
	Blockers        []interface{}      `json:"blockers"`
	FollowerIDs     []int              `json:"follower_ids"`
	Comments        []StoryComment     `json:"comments"`
	BlockedStoryIDs []int              `json:"blocked_story_ids"`
	Reviews         []StoryReview      `json:"reviews"`
	Project         StoryProject       `json:"project"`
}

type StoryBranch

type StoryBranch struct {
	ID            int    `json:"id,omitempty"`
	Name          string `json:"name,omitempty"`
	CommitHash    string `json:"commit_hash,omitempty"`
	CommitMessage string `json:"commit_message,omitempty"`
	AuthorName    string `json:"author_name,omitempty"`
	AuthorEmail   string `json:"author_email,omitempty"`
	CreatedAt     string `json:"created_at,omitempty"`
}

type StoryComment

type StoryComment struct {
	Kind        string        `json:"kind"`
	ID          int64         `json:"id"`
	Text        string        `json:"text"`
	PersonID    int64         `json:"person_id"`
	CreatedAt   int64         `json:"created_at"`
	UpdatedAt   int64         `json:"updated_at"`
	StoryID     int64         `json:"story_id"`
	Attachments []interface{} `json:"attachments"`
	Reactions   []interface{} `json:"reactions"`
}

type StoryLabel

type StoryLabel struct {
	ID        int    `json:"id"`
	ProjectID int    `json:"project_id"`
	Kind      string `json:"kind"`
	Name      string `json:"name"`
	CreatedAt int64  `json:"created_at"`
	UpdatedAt int64  `json:"updated_at"`
}

type StoryProject

type StoryProject struct {
	ID                          int    `json:"id"`
	Kind                        string `json:"kind"`
	Name                        string `json:"name"`
	Version                     int    `json:"version"`
	IterationLength             int    `json:"iteration_length"`
	WeekStartDay                string `json:"week_start_day"`
	PointScale                  string `json:"point_scale"`
	PointScaleIsCustom          bool   `json:"point_scale_is_custom"`
	BugsAndChoresAreEstimatable bool   `json:"bugs_and_chores_are_estimatable"`
	AutomaticPlanning           bool   `json:"automatic_planning"`
	EnableTasks                 bool   `json:"enable_tasks"`
	TimeZone                    struct {
		Kind      string `json:"kind"`
		OlsonName string `json:"olson_name"`
		Offset    string `json:"offset"`
	} `json:"time_zone"`
	VelocityAveragedOver         int    `json:"velocity_averaged_over"`
	NumberOfDoneIterationsToShow int    `json:"number_of_done_iterations_to_show"`
	HasGoogleDomain              bool   `json:"has_google_domain"`
	EnableIncomingEmails         bool   `json:"enable_incoming_emails"`
	InitialVelocity              int    `json:"initial_velocity"`
	Public                       bool   `json:"public"`
	AtomEnabled                  bool   `json:"atom_enabled"`
	ProjectType                  string `json:"project_type"`
	HasCICDIntegration           bool   `json:"has_cicd_integration"`
	Capabilities                 struct {
		PrioritySupport         bool `json:"priority_support"`
		LabelsPanel             bool `json:"labels_panel"`
		LabelsPanelBulkActions  bool `json:"labels_panel_bulk_actions"`
		DigitalRiverIntegration bool `json:"digital_river_integration"`
		DigitalRiverDebug       bool `json:"digital_river_debug"`
		StartSendingDRNotices   bool `json:"start_sending_dr_notices"`
		EnableEAPEvents         bool `json:"enable_eap_events"`
	} `json:"capabilities"`
	StartDate                   string `json:"start_date"`
	StartTime                   int64  `json:"start_time"`
	ShownIterationsStartTime    int64  `json:"shown_iterations_start_time"`
	CreatedAt                   int64  `json:"created_at"`
	UpdatedAt                   int64  `json:"updated_at"`
	ShowStoryPriority           bool   `json:"show_story_priority"`
	ShowPriorityIcon            bool   `json:"show_priority_icon"`
	ShowPriorityIconInAllPanels bool   `json:"show_priority_icon_in_all_panels"`
	Epics                       []struct {
		ID      int    `json:"id"`
		Name    string `json:"name"`
		LabelID int    `json:"label_id"`
	} `json:"epics"`
}

type StoryPullRequest

type StoryPullRequest struct {
	ID        int       `json:"id"`
	Kind      string    `json:"kind"`
	StoryID   int       `json:"story_id"`
	Owner     string    `json:"owner"`
	Repo      string    `json:"repo"`
	HostURL   string    `json:"host_url"`
	Status    string    `json:"status"`
	Number    int       `json:"number"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type StoryResponse

type StoryResponse struct {
	Stories              []Story `json:"stories"`
	TotalPoints          int     `json:"total_points"`
	TotalPointsCompleted int     `json:"total_points_completed"`
	TotalHits            int     `json:"total_hits"`
	TotalHitsWithDone    int     `json:"total_hits_with_done"`
}

type StoryReview

type StoryReview struct {
	ID           int    `json:"id"`
	ReviewerID   int    `json:"reviewer_id"`
	Kind         string `json:"kind"`
	StoryID      int    `json:"story_id"`
	ReviewTypeID int    `json:"review_type_id"`
	Status       string `json:"status"`
	CreatedAt    int    `json:"created_at"`
	UpdatedAt    int    `json:"updated_at"`
}

type StoryTask

type StoryTask struct {
	ID          int    `json:"id"`
	Kind        string `json:"kind"`
	Description string `json:"description"`
	Complete    bool   `json:"complete"`
	Position    int    `json:"position"`
	CreatedAt   int64  `json:"created_at"`
	UpdatedAt   int64  `json:"updated_at"`
	StoryID     int    `json:"story_id"`
}

type User

type User struct {
	ID int `json:"id"`
}

type Widget

type Widget struct {
	view.MultiSourceWidget
	view.ScrollableWidget
	// contains filtered or unexported fields
}

A Widget represents a Todoist widget

func NewWidget

func NewWidget(tviewApp *tview.Application, redrawChan chan bool, pages *tview.Pages, settings *Settings) *Widget

NewWidget creates a new instance of a widget

func (*Widget) CurrentSource

func (widget *Widget) CurrentSource() *PivotalSource

func (*Widget) Open

func (widget *Widget) Open()

func (*Widget) OpenPulls

func (widget *Widget) OpenPulls()

func (*Widget) Refresh

func (widget *Widget) Refresh()

Jump to

Keyboard shortcuts

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