connector

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RoleIDNotFoundErr = fmt.Errorf("role id not found in role link")

Functions

func GeCustomFieldTypeAnnotation added in v0.0.15

func GeCustomFieldTypeAnnotation(annotations []*anypb.Any) string

We don't error if the annotation is not found Because it may not be present for existing configs.

func GetProjectAnnotation added in v0.0.15

func GetProjectAnnotation(annotations []*anypb.Any) *pbjira.JCIssueTypeProject

Types

type FieldOption added in v0.0.11

type FieldOption func(issue *jira.Issue)

func WithComponents added in v0.0.11

func WithComponents(componentIDs ...string) FieldOption

func WithCustomField added in v0.0.11

func WithCustomField(id string, value interface{}) FieldOption

func WithDescription added in v0.0.11

func WithDescription(description string) FieldOption

func WithLabels added in v0.0.11

func WithLabels(labels ...string) FieldOption

func WithStatus added in v0.0.11

func WithStatus(statusId string) FieldOption

func WithType added in v0.0.11

func WithType(id string) FieldOption

type Jira

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

func (*Jira) BulkCreateTickets added in v0.0.17

func (*Jira) BulkGetTickets added in v0.0.17

func (*Jira) CreateTicket added in v0.0.11

func (j *Jira) CreateTicket(ctx context.Context, ticket *v2.Ticket, schema *v2.TicketSchema) (*v2.Ticket, annotations.Annotations, error)

This is returning nil for annotations.

func (*Jira) GetIssueTypeFields added in v0.0.15

func (j *Jira) GetIssueTypeFields(ctx context.Context, projectKey, issueTypeId string, opts *jira.GetQueryIssueTypeOptions) ([]*jira.MetaDataFields, error)

func (*Jira) GetTicket added in v0.0.11

func (j *Jira) GetTicket(ctx context.Context, ticketId string) (*v2.Ticket, annotations.Annotations, error)

func (*Jira) GetTicketSchema added in v0.0.11

func (j *Jira) GetTicketSchema(ctx context.Context, schemaID string) (*v2.TicketSchema, annotations.Annotations, error)

func (*Jira) ListTicketSchemas added in v0.0.11

func (j *Jira) ListTicketSchemas(ctx context.Context, p *pagination.Token) ([]*v2.TicketSchema, string, annotations.Annotations, error)

func (*Jira) Metadata

func (o *Jira) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)

func (*Jira) ResourceSyncers

func (o *Jira) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer

func (*Jira) Validate

func (j *Jira) Validate(ctx context.Context) (annotations.Annotations, error)

type JiraBasicAuthBuilder

type JiraBasicAuthBuilder struct {
	Base *JiraOptions

	Username string
	ApiToken string
}

func (*JiraBasicAuthBuilder) New

func (b *JiraBasicAuthBuilder) New(skipProjectParticipants bool) (*Jira, error)

type JiraBuilder

type JiraBuilder interface {
	New() (*Jira, error)
}

type JiraName added in v0.0.15

type JiraName struct {
	Name string `json:"name,omitempty"`
}

type JiraOptions

type JiraOptions struct {
	Url         string
	ProjectKeys []string
}

type ProjectKeyIssueTypeIDSchemaID added in v0.0.15

type ProjectKeyIssueTypeIDSchemaID struct {
	ProjectKey  string
	IssueTypeID string
}

Format is projectKey:issueID.

func (*ProjectKeyIssueTypeIDSchemaID) Parse added in v0.0.15

func (p *ProjectKeyIssueTypeIDSchemaID) Parse(schemaID string) error

func (ProjectKeyIssueTypeIDSchemaID) String added in v0.0.15

type TicketManager added in v0.0.11

type TicketManager interface {
	GetTicket(ctx context.Context, ticketId string) (*v2.Ticket, annotations.Annotations, error)
	CreateTicket(ctx context.Context, ticket *v2.Ticket, schema *v2.TicketSchema) (*v2.Ticket, annotations.Annotations, error)
	GetTicketSchema(ctx context.Context, schemaID string) (*v2.TicketSchema, annotations.Annotations, error)
	ListTicketSchemas(ctx context.Context, pToken *pagination.Token) ([]*v2.TicketSchema, string, annotations.Annotations, error)
}

Jump to

Keyboard shortcuts

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