jira_watcher_controller

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: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BigqueryDatasetId = "jira_data"
	BigqueryTableId   = "tickets"
)

Variables

This section is empty.

Functions

func NewJiraWatcherControllerCommand

func NewJiraWatcherControllerCommand(name string) *cobra.Command

Types

type Comment

type Comment struct {
	ID      string    `bigquery:"id"`
	Author  string    `bigquery:"author"`
	Created time.Time `bigquery:"created"`
	Message string    `bigquery:"message"`
}

type Component

type Component struct {
	ID   string `bigquery:"id"`
	Name string `bigquery:"name"`
}

type Issue

type Issue struct {
	ID  string `bigquery:"id"`
	Key string `bigquery:"key"`
}

type JiraWatcherController

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

func NewJiraWatcherController

func NewJiraWatcherController(jiraClient *jira.Client, jiraInformer cache.SharedIndexInformer, jiraLister *jira.IssueLister, showPrivateMessages bool, bigQueryClient *bigquery.Client, dryRun bool) (*JiraWatcherController, error)

func (*JiraWatcherController) Enqueue

func (c *JiraWatcherController) Enqueue(obj interface{})

func (*JiraWatcherController) RunWorkers

func (c *JiraWatcherController) RunWorkers(ctx context.Context, workers int)

type Options

type Options struct {
	DryRun bool

	// Jira Options
	JiraURL             string
	JiraSearch          string
	JiraTokenPath       string
	ShowPrivateMessages bool

	// BigQuery Options
	GoogleProjectID                    string
	GoogleServiceAccountCredentialFile string
	BigQueryRefreshInterval            time.Duration
	// contains filtered or unexported fields
}

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

func (*Options) Run

func (o *Options) Run(ctx context.Context) error

func (*Options) Validate

func (o *Options) Validate(ctx context.Context) error

type Priority

type Priority struct {
	ID   string `bigquery:"id"`
	Name string `bigquery:"name"`
}

type Resolution

type Resolution struct {
	ID   string `bigquery:"id"`
	Name string `bigquery:"name"`
}

type Status

type Status struct {
	ID   string `bigquery:"id"`
	Name string `bigquery:"name"`
}

type Ticket

type Ticket struct {
	RecordCreated   time.Time   `bigquery:"record_created"`
	Issue           Issue       `bigquery:"issue"`
	Description     string      `bigquery:"description"`
	Creator         string      `bigquery:"creator"`
	Assignee        string      `bigquery:"assignee"`
	Status          Status      `bigquery:"status"`
	Priority        Priority    `bigquery:"priority"`
	Labels          []string    `bigquery:"labels"`
	TargetVersions  []Version   `bigquery:"target_versions"`
	Resolution      Resolution  `bigquery:"resolution"`
	Comments        []Comment   `bigquery:"comments"`
	Summary         string      `bigquery:"summary"`
	Components      []Component `bigquery:"components"`
	FixVersions     []Version   `bigquery:"fix_versions"`
	AffectsVersions []Version   `bigquery:"affects_versions"`
	LastChangedTime time.Time   `bigquery:"last_changed_time"`
}

func (*Ticket) Save

func (t *Ticket) Save() (map[string]bigquery.Value, string, error)

type Version

type Version struct {
	ID   string `bigquery:"id"`
	Name string `bigquery:"name"`
}

Jump to

Keyboard shortcuts

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