jira

package
v0.0.0-...-9196d9a Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	IssueQaContactField     = "customfield_12316243"
	IssueTargetVersionField = "customfield_12319940"
)

TODO move to the Jira Client lib

Variables

This section is empty.

Functions

func FilterPrivateIssues

func FilterPrivateIssues(issue *jiraBaseClient.Issue) bool

func IssueTargetVersionIDs

func IssueTargetVersionIDs(s jiraBaseClient.Issue) []string

IssueTargetVersionIDs TODO - move to the Jira Client/Plugin

func Metav1ToJiraTimeString

func Metav1ToJiraTimeString(t metav1.Time) string

func NewInformer

func NewInformer(client *Client, interval, maxInterval, resyncInterval time.Duration, argsFn func(metav1.ListOptions) SearchIssuesArgs, includeFn func(issue *jiraClient.Issue) bool) cache.SharedIndexInformer

func StringToMetaV1Time

func StringToMetaV1Time(timeString string) metav1.Time

func StringToTime

func StringToTime(timeString string) time.Time

Types

type Client

type Client struct {
	Client jiraClient.Client
}

func (*Client) IssueCommentsByID

func (c *Client) IssueCommentsByID(ctx context.Context, issues ...int) ([]jiraBaseClient.Issue, error)

func (*Client) IssuesByID

func (c *Client) IssuesByID(ctx context.Context, issues ...int) ([]jiraBaseClient.Issue, error)

func (*Client) SearchIssues

func (c *Client) SearchIssues(ctx context.Context, args SearchIssuesArgs) ([]jiraBaseClient.Issue, error)

type ClientError

type ClientError struct {
	Err Error
}

func (*ClientError) Error

func (e *ClientError) Error() string

type CommentAccessor

type CommentAccessor interface {
	Get(id int) (*IssueComments, bool)
}

type CommentDiskStore

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

func NewCommentDiskStore

func NewCommentDiskStore(path string, maxAge time.Duration) *CommentDiskStore

func (*CommentDiskStore) CloseIssue

func (s *CommentDiskStore) CloseIssue(bug *IssueComments) error

func (*CommentDiskStore) DeleteIssue

func (s *CommentDiskStore) DeleteIssue(bug *Issue) error

func (*CommentDiskStore) NotifyChanged

func (s *CommentDiskStore) NotifyChanged(id int)

func (*CommentDiskStore) Run

func (s *CommentDiskStore) Run(ctx context.Context, lister *IssueLister, store CommentAccessor, disableWrite bool)

func (*CommentDiskStore) Sync

func (s *CommentDiskStore) Sync(keys []string) ([]*IssueComments, error)

type CommentStore

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

func NewCommentStore

func NewCommentStore(client *Client, refreshInterval time.Duration, persisted PersistentCommentStore) *CommentStore

func (*CommentStore) Get

func (s *CommentStore) Get(id int) (*IssueComments, bool)

func (*CommentStore) Run

func (s *CommentStore) Run(ctx context.Context, informer cache.SharedInformer) error

func (*CommentStore) Stats

func (s *CommentStore) Stats() Stats

type CommentVisibility

type CommentVisibility struct {
	Type  string `json:"type,omitempty" structs:"type,omitempty"`
	Value string `json:"value,omitempty" structs:"value,omitempty"`
}

type Error

type Error struct {
	Error   bool   `json:"error"`
	Message string `json:"message"`
	Code    int    `json:"code"`
}

type IDString

type IDString int

func (*IDString) UnmarshalJSON

func (s *IDString) UnmarshalJSON(data []byte) error

type Issue

type Issue struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	Info jiraBaseClient.Issue
}

func (Issue) DeepCopyObject

func (b Issue) DeepCopyObject() runtime.Object

type IssueComments

type IssueComments struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	Info        jiraBaseClient.Issue
	RefreshTime time.Time
	Comments    []*jiraBaseClient.Comment
}

func NewIssueComments

func NewIssueComments(id string, info *jiraBaseClient.Comments) *IssueComments

func ReadBugComments

func ReadBugComments(path string) (*IssueComments, error)

func (IssueComments) DeepCopyObject

func (b IssueComments) DeepCopyObject() runtime.Object

type IssueInfoList

type IssueInfoList struct {
	Issues []jiraBaseClient.Issue `json:"issues"`
	Faults []interface{}          `json:"faults"`
}

type IssueList

type IssueList struct {
	metav1.TypeMeta
	metav1.ListMeta

	Items []Issue
}

func NewIssueList

func NewIssueList(issues []jiraBaseClient.Issue, includeFn func(issue *jiraBaseClient.Issue) bool) *IssueList

func (*IssueList) DeepCopyObject

func (b *IssueList) DeepCopyObject() runtime.Object

type IssueLister

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

func NewIssueLister

func NewIssueLister(indexer cache.Indexer) *IssueLister

NewIssueLister lists issues out of a cache.

func (*IssueLister) Get

func (s *IssueLister) Get(id int) (*Issue, error)

func (*IssueLister) List

func (s *IssueLister) List(selector labels.Selector) (ret []*Issue, err error)

type ListWatcher

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

func (*ListWatcher) List

func (lw *ListWatcher) List(options metav1.ListOptions) (runtime.Object, error)

func (*ListWatcher) Watch

func (lw *ListWatcher) Watch(options metav1.ListOptions) (watch.Interface, error)

type PersistentCommentStore

type PersistentCommentStore interface {
	Sync(keys []string) ([]*IssueComments, error)
	NotifyChanged(id int)
	DeleteIssue(*Issue) error
	CloseIssue(*IssueComments) error
}

type SearchIssuesArgs

type SearchIssuesArgs struct {
	LastChangeTime time.Time
	Jql            string
	IncludeFields  []string
	MaxResults     int
	StartAt        int
}

type Stats

type Stats struct {
	Issues int
}

Jump to

Keyboard shortcuts

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