sdk

package
v0.0.0-...-b8869b4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const AgileBoardTypeKanban = work.BoardTypeKanban

AgileBoardTypeKanban is the enumeration value for kanban

View Source
const AgileBoardTypeOther = work.BoardTypeOther

AgileBoardTypeOther is the enumeration value for other

View Source
const AgileBoardTypeScrum = work.BoardTypeScrum

AgileBoardTypeScrum is the enumeration value for scrum

View Source
const AgileSprintStatusActive = work.SprintStatusActive

AgileSprintStatusActive is the enumeration value for active

View Source
const AgileSprintStatusClosed = work.SprintStatusClosed

AgileSprintStatusClosed is the enumeration value for closed

View Source
const AgileSprintStatusFuture = work.SprintStatusFuture

AgileSprintStatusFuture is the enumeration value for future

View Source
const SourceCodeRepoAffiliationOrganization = sourcecode.RepoAffiliationOrganization

SourceCodeRepoAffiliationOrganization is the enumeration value for organization

View Source
const SourceCodeRepoAffiliationThirdparty = sourcecode.RepoAffiliationThirdparty

SourceCodeRepoAffiliationThirdparty is the enumeration value for thirdparty

View Source
const SourceCodeRepoAffiliationUser = sourcecode.RepoAffiliationUser

SourceCodeRepoAffiliationUser is the enumeration value for user

View Source
const SourceCodeRepoVisibilityPrivate = sourcecode.RepoVisibilityPrivate

SourceCodeRepoVisibilityPrivate is the enumeration value for private

View Source
const SourceCodeRepoVisibilityPublic = sourcecode.RepoVisibilityPublic

SourceCodeRepoVisibilityPublic is the enumeration value for public

View Source
const SourceCodeUserTypeBot = sourcecode.UserTypeBot

SourceCodeUserTypeBot is a BOT user type in the source code system for describing an automated user account

View Source
const SourceCodeUserTypeDeletedSpecialUser = sourcecode.UserTypeDeletedSpecialUser

SourceCodeUserTypeDeletedSpecialUser is a Special Deleted user type for describing a deleted user account

View Source
const SourceCodeUserTypeHuman = sourcecode.UserTypeHuman

SourceCodeUserTypeHuman is a HUMAN user type in the source code system for describing a user

View Source
const WorkProjectAffiliationOrganization = work.ProjectAffiliationOrganization

WorkProjectAffiliationOrganization is the enumeration value for organization

View Source
const WorkProjectAffiliationThirdparty = work.ProjectAffiliationThirdparty

WorkProjectAffiliationThirdparty is the enumeration value for thirdparty

View Source
const WorkProjectAffiliationUser = work.ProjectAffiliationUser

WorkProjectAffiliationUser is the enumeration value for user

View Source
const WorkProjectVisibilityPrivate = work.ProjectVisibilityPrivate

WorkProjectVisibilityPrivate is the enumeration value for private

View Source
const WorkProjectVisibilityPublic = work.ProjectVisibilityPublic

WorkProjectVisibilityPublic is the enumeration value for public

Variables

View Source
var ErrTimedOut = errors.New("timeout")

ErrTimedOut returns a timeout event when our deadline is exceeded

Functions

func BoolPointer

func BoolPointer(val bool) *bool

BoolPointer returns a bool pointer from a value

func CalendarNewCalendarID

func CalendarNewCalendarID(customerID string, refID string, refType string) string

CalendarNewCalendarID provides a template for generating an ID field for Calendar

func CalendarNewEventID

func CalendarNewEventID(customerID string, refID string, refType string) string

CalendarNewEventID provides a template for generating an ID field for Event

func CalendarNewUserID

func CalendarNewUserID(customerID string, refID string, refType string) string

CalendarNewUserID provides a template for generating an ID field for User

func ConvertHTMLToMarkdown

func ConvertHTMLToMarkdown(html string) (string, error)

ConvertHTMLToMarkdown will convert HTML to Markdown

func ConvertMarkdownToHTML

func ConvertMarkdownToHTML(text string) string

ConvertMarkdownToHTML will convert markdown to html

func ConvertTimeToDateModel

func ConvertTimeToDateModel(ts time.Time, dateModel interface{})

ConvertTimeToDateModel will fill the dataModel struct with the current time

func CreateMutationPayloadFromData

func CreateMutationPayloadFromData(model string, action MutationAction, buf []byte) (interface{}, error)

CreateMutationPayloadFromData will create a mutation payload object from a data payload

func DateFromEpoch

func DateFromEpoch(t int64) time.Time

DateFromEpoch returns a time.Time from an epoch value in milliseconds

func EpochNow

func EpochNow() int64

EpochNow will return the current time as an epoch value

func Hash

func Hash(val ...interface{}) string

Hash will convert all objects to a string and return a SHA256 of the concatenated values. Uses xxhash to calculate a faster hash value that is not cryptographically secure but is OK since we use hashing mainfully for generating consistent key values or equality checks.

func IsHTTPError

func IsHTTPError(err error) (bool, int, io.Reader)

IsHTTPError returns true if an error is a HTTP error

func IsRateLimitError

func IsRateLimitError(err error) (bool, time.Duration)

IsRateLimitError returns true if an error is a rate limit error and if so, the retry after duration

func JoinURL

func JoinURL(elem ...string) string

JoinURL creates a URL string from parts

func Keys

func Keys(m map[string]bool) []string

Keys will return the keys that are true from a map[string]bool

func LogDebug

func LogDebug(logger Logger, msg string, kv ...interface{}) error

LogDebug will log an debug level log to logger

func LogError

func LogError(logger Logger, msg string, kv ...interface{}) error

LogError will log an error level log to logger

func LogFatal

func LogFatal(logger Logger, msg string, kv ...interface{})

LogFatal will log an fatal level log to logger

func LogInfo

func LogInfo(logger Logger, msg string, kv ...interface{}) error

LogInfo will log an info level log to logger

func LogWarn

func LogWarn(logger Logger, msg string, kv ...interface{}) error

LogWarn will log an warning level log to logger

func MapToStruct

func MapToStruct(m map[string]interface{}, target interface{}) error

MapToStruct will unmarshal a map into the target

func NewAgileBoardID

func NewAgileBoardID(customerID string, refID string, refType string) string

NewAgileBoardID will return the agile board id

func NewAgileKanbanID

func NewAgileKanbanID(customerID string, refID string, refType string) string

NewAgileKanbanID will return the agile kanban id

func NewAgileSprintID

func NewAgileSprintID(customerID string, refID string, refType string) string

NewAgileSprintID will return the agile sprint id

func NewSourceCodeBranchID

func NewSourceCodeBranchID(customerID string, repoID string, refType string, branchName string, firstCommitID string) string

NewSourceCodeBranchID returns a new sourcecode branch id

func NewSourceCodeCommitID

func NewSourceCodeCommitID(customerID string, sha string, refType string, repoID string) string

NewSourceCodeCommitID returns a new sourcecode commit id

func NewSourceCodePullRequestCommentID

func NewSourceCodePullRequestCommentID(customerID string, refID string, refType string, repoID string) string

NewSourceCodePullRequestCommentID returns a new sourcecode pull request comment id

func NewSourceCodePullRequestID

func NewSourceCodePullRequestID(customerID string, refID string, refType string, repoID string) string

NewSourceCodePullRequestID returns a new sourcecode pullrequest id

func NewSourceCodePullRequestReviewID

func NewSourceCodePullRequestReviewID(customerID string, refID string, refType string, repoID string) string

NewSourceCodePullRequestReviewID returns a new sourcecode pull request review id

func NewSourceCodeRepoID

func NewSourceCodeRepoID(customerID string, refID string, refType string) string

NewSourceCodeRepoID returns the new sourcecode repo id

func NewSourceCodeUserID

func NewSourceCodeUserID(customerID string, refType string, refID string) string

NewSourceCodeUserID returns a new sourcecode user id

func NewWorkConfigID

func NewWorkConfigID(customerID string, refType string, integrationInstanceID string) string

NewWorkConfigID will return the work config id

func NewWorkIssueCommentID

func NewWorkIssueCommentID(customerID string, refID string, refType string, projectID string) string

NewWorkIssueCommentID will return the work issue comment id

func NewWorkIssueID

func NewWorkIssueID(customerID string, refID string, refType string) string

NewWorkIssueID will return the work issue id

func NewWorkIssuePriorityID

func NewWorkIssuePriorityID(customerID string, refType string, refID string) string

NewWorkIssuePriorityID will return the work issue priority id

func NewWorkIssueStatusID

func NewWorkIssueStatusID(customerID string, refType string, refID string) string

NewWorkIssueStatusID will return the work issue status id

func NewWorkIssueTypeID

func NewWorkIssueTypeID(customerID string, refType string, refID string) string

NewWorkIssueTypeID will return the work issue type id

func NewWorkProjectID

func NewWorkProjectID(customerID string, refID string, refType string) string

NewWorkProjectID will return the work project id

func NewWorkUserID

func NewWorkUserID(customerID string, refID string, refType string) string

NewWorkUserID will return the work user id

func StringArrayPointer

func StringArrayPointer(vals []string) *[]string

StringArrayPointer returns a pointer to the value

func StringPointer

func StringPointer(val interface{}) *string

StringPointer return a string pointer from a value

func Stringify

func Stringify(val interface{}) string

Stringify will return a JSON stringified representation of val

func StringifyPretty

func StringifyPretty(val interface{}) string

StringifyPretty will return a JSON stringified representation of val which is formatted

func StringifyReader

func StringifyReader(val interface{}) io.Reader

StringifyReader sometimes you just need a reader that reads serialize json. this is your function

func TimeToEpoch

func TimeToEpoch(tv time.Time) int64

TimeToEpoch returns an epoch time from a time.Time

Types

type AgileBoard

type AgileBoard = work.Board

AgileBoard is the agile board

type AgileBoardColumns

type AgileBoardColumns = work.BoardColumns

AgileBoardColumns is the columns for an agile board

type AgileBoardType

type AgileBoardType = work.BoardType

AgileBoardType is the board type

type AgileBoardUpdate

type AgileBoardUpdate struct {
	Set struct {
		Active *bool
		Name   *string
	}
	Unset struct {
	}
	Push struct {
	}
	Pull struct {
	}
}

AgileBoardUpdate is an action for update a work.Board

type AgileKanban

type AgileKanban = work.Kanban

AgileKanban is a kanban board

type AgileKanbanColumns

type AgileKanbanColumns = work.KanbanColumns

AgileKanbanColumns is the columns for a kanban board

type AgileSprint

type AgileSprint = work.Sprint

AgileSprint is a sprint board

type AgileSprintClosedDate

type AgileSprintClosedDate = work.SprintCompletedDate

AgileSprintClosedDate is the sprint closed date

type AgileSprintColumns

type AgileSprintColumns = work.SprintColumns

AgileSprintColumns is the sprint columns

type AgileSprintCreateMutation

type AgileSprintCreateMutation struct {
	Name         string            `json:"name"`             // Name is the name of the sprint
	Goal         *string           `json:"goal,omitempty"`   // Goal is the optional goal for the sprint
	Status       AgileSprintStatus `json:"status,omitempty"` // Status is the status of the sprint
	StartDate    time.Time         `json:"start_date"`       // StartDate is the start date for the sprint
	EndDate      time.Time         `json:"end_date"`         // EndDate is the end date for the sprint
	IssueRefIDs  []string          `json:"issue_ref_ids"`    // IssueRefIDs is an array of issue ref_ids to add to the sprint
	ProjectRefID string            `json:"project_id"`       // ProjectID is the id to the issue project as a ref_id
}

AgileSprintCreateMutation is an create mutation for a sprint

type AgileSprintEndDate

type AgileSprintEndDate = work.SprintEndedDate

AgileSprintEndDate is the sprint planned end date

type AgileSprintStartDate

type AgileSprintStartDate = work.SprintStartedDate

AgileSprintStartDate is the sprint planned start date

type AgileSprintStatus

type AgileSprintStatus = work.SprintStatus

AgileSprintStatus is the sprint status

type AgileSprintUpdate

type AgileSprintUpdate struct {
	Set struct {
		Active        *bool
		Name          *string
		Goal          *string
		StartedDate   *time.Time
		CompletedDate *time.Time
		EndedDate     *time.Time
		Status        *work.SprintStatus
	}
	Unset struct {
		Goal *string
	}
	Push struct {
	}
	Pull struct {
	}
}

AgileSprintUpdate is an action for update a work.Sprint

type AgileSprintUpdateMutation

type AgileSprintUpdateMutation struct {
	Set struct {
		Name        *string            `json:"name,omitempty"`          // Name is the name of the sprint to update
		Goal        *string            `json:"goal,omitempty"`          // Goal is the optional goal for the sprint
		Status      *AgileSprintStatus `json:"status,omitempty"`        // Status is the status of the sprint
		StartDate   *time.Time         `json:"start_date,omitempty"`    // StartDate is the start date for the sprint
		EndDate     *time.Time         `json:"end_date,omitempty"`      // EndDate is the end date for the sprint
		IssueRefIDs []string           `json:"issue_ref_ids,omitempty"` // IssueRefIDs is an array of issue ref_ids to add to the sprint
	} `json:"set"`
	Unset struct {
		IssueRefIDs []string `json:"issue_ref_ids,omitempty"` // IssueRefIDs is an array of issue ref_ids to remove from the sprint
	} `json:"unset"`
}

AgileSprintUpdateMutation is an update mutation for a sprint

type Async

type Async interface {
	Do(f func() error)
	Wait() error
}

Async simple async interface

func NewAsync

func NewAsync(concurrency int) Async

NewAsync instantiates a new Async object

type AuthManager

type AuthManager interface {
	// RefreshOAuth2Token will refresh the OAuth2 access token using the provided refreshToken and return a new access token
	RefreshOAuth2Token(refType string, refreshToken string) (string, error)
	// PrivateKey will return a private key stored by the integration UI
	PrivateKey(identifier Identifier) (*rsa.PrivateKey, error)
}

AuthManager is the authentication manager when handling pinpoint auth services

type AuthorizationType

type AuthorizationType string

AuthorizationType is the type of authorization supported for a given location

const (
	// OAuth1AuthorizationType is the OAuth1 protocol
	OAuth1AuthorizationType AuthorizationType = "oauth1"
	// OAuth2AuthorizationType is the OAuth2 protocol
	OAuth2AuthorizationType AuthorizationType = "oauth2"
	// BasicAuthorizationType is the basic authentication protocol
	BasicAuthorizationType AuthorizationType = "basic"
	// APIKeyAuthorizationType is an apikey
	APIKeyAuthorizationType AuthorizationType = "apikey"
)

type CalendarCalendar

type CalendarCalendar = calendar.Calendar

CalendarCalendar details for the given integration calendar

type CalendarEvent

type CalendarEvent = calendar.Event

CalendarEvent event on a calendar

type CalendarEventEndDate

type CalendarEventEndDate = calendar.EventEndDate

CalendarEventEndDate represents the object structure for end_date

type CalendarEventLocation

type CalendarEventLocation = calendar.EventLocation

CalendarEventLocation represents the object structure for location

type CalendarEventParticipants

type CalendarEventParticipants = calendar.EventParticipants

CalendarEventParticipants represents the object structure for participants

type CalendarEventParticipantsStatus

type CalendarEventParticipantsStatus = calendar.EventParticipantsStatus

CalendarEventParticipantsStatus is the enumeration type for status

const CalendarEventParticipantsStatusGoing CalendarEventParticipantsStatus = calendar.EventParticipantsStatusGoing

CalendarEventParticipantsStatusGoing is the enumeration value for going

const CalendarEventParticipantsStatusMaybe CalendarEventParticipantsStatus = calendar.EventParticipantsStatusMaybe

CalendarEventParticipantsStatusMaybe is the enumeration value for maybe

const CalendarEventParticipantsStatusNotGoing CalendarEventParticipantsStatus = calendar.EventParticipantsStatusNotGoing

CalendarEventParticipantsStatusNotGoing is the enumeration value for not_going

const CalendarEventParticipantsStatusUnknown CalendarEventParticipantsStatus = calendar.EventParticipantsStatusUnknown

CalendarEventParticipantsStatusUnknown is the enumeration value for unknown

type CalendarEventStartDate

type CalendarEventStartDate = calendar.EventStartDate

CalendarEventStartDate represents the object structure for start_date

type CalendarEventStatus

type CalendarEventStatus = calendar.EventStatus

CalendarEventStatus is the enumeration type for status

const CalendarEventStatusCancelled CalendarEventStatus = calendar.EventStatusCancelled

CalendarEventStatusCancelled is the enumeration value for cancelled

const CalendarEventStatusConfirmed CalendarEventStatus = calendar.EventStatusConfirmed

CalendarEventStatusConfirmed is the enumeration value for confirmed

const CalendarEventStatusTentative CalendarEventStatus = calendar.EventStatusTentative

CalendarEventStatusTentative is the enumeration value for tentative

type CalendarUser

type CalendarUser = calendar.User

CalendarUser the calendar user

type Config

type Config struct {
	IntegrationType IntegrationType `json:"integrationType"`
	OAuth1Auth      *oauth1Auth     `json:"oauth1_auth,omitempty"`
	OAuth2Auth      *oauth2Auth     `json:"oauth2_auth,omitempty"`
	BasicAuth       *basicAuth      `json:"basic_auth,omitempty"`
	APIKeyAuth      *apikeyAuth     `json:"apikey_auth,omitempty"`
	Inclusions      *matchList      `json:"-"`
	Exclusions      *matchList      `json:"-"`
	Accounts        *ConfigAccounts `json:"-"`
	// contains filtered or unexported fields
}

Config is the integration configuration

func NewConfig

func NewConfig(kv map[string]interface{}) Config

NewConfig will return a new Config

func (Config) Exists

func (c Config) Exists(key string) bool

Exists will return true if the key exists

func (*Config) From

func (c *Config) From(key string, into interface{}) error

From will serialize a JSON value at key into the interface provided

func (Config) Get

func (c Config) Get(key string) (bool, interface{})

Get will return a value if found

func (Config) GetBool

func (c Config) GetBool(key string) (bool, bool)

GetBool will return a bool coerced value for key

func (Config) GetInt

func (c Config) GetInt(key string) (bool, int64)

GetInt will return a int coerced value for key

func (Config) GetString

func (c Config) GetString(key string) (bool, string)

GetString will return a string coerced value for key

func (*Config) Merge

func (c *Config) Merge(kv map[string]interface{})

Merge in new config

func (*Config) Parse

func (c *Config) Parse(buf []byte) error

Parse detail from a buffer into the config

type ConfigAccount

type ConfigAccount struct {
	ID     string            `json:"id"`
	Type   ConfigAccountType `json:"type"`
	Public bool              `json:"public"`
}

ConfigAccount single account

type ConfigAccountType

type ConfigAccountType string

ConfigAccountType the type of account, org or user

const (
	//ConfigAccountTypeOrg org account type
	ConfigAccountTypeOrg ConfigAccountType = "ORG"
	// ConfigAccountTypeUser user account type
	ConfigAccountTypeUser ConfigAccountType = "USER"
)

type ConfigAccounts

type ConfigAccounts map[string]*ConfigAccount

ConfigAccounts contains accounts with projects or repos to be exported

type Control

type Control interface {
	Identifier
	// Paused must be called when the integration is paused for any reason such as rate limiting
	Paused(resetAt time.Time) error
	// Resumed must be called when a paused integration is resumed
	Resumed() error
}

Control is an interface for notifying of control states

type Date

type Date = datetime.Date

Date is a date structure with epoch, offset and RFC3339 timestamp format

func NewDateWithTime

func NewDateWithTime(tv time.Time) *Date

NewDateWithTime will return a Date from a time

type Descriptor

type Descriptor struct {
	Name           string       `json:"name" yaml:"name"`
	RefType        string       `json:"ref_type" yaml:"ref_type"`
	Description    string       `json:"description" yaml:"description"`
	AvatarURL      string       `json:"avatar_url" yaml:"avatar_url"`
	Capabilities   []string     `json:"capabilities" yaml:"capabilities"`
	Installation   Installation `json:"installation" yaml:"installation"`
	BuildDate      time.Time    `json:"-" yaml:"-"`
	BuildCommitSHA string       `json:"-" yaml:"-"`
}

Descriptor is metadata about what the integration supports

func LoadDescriptor

func LoadDescriptor(descriptorBuf, build, commit string) (*Descriptor, error)

LoadDescriptor will load a descriptor from an integration

type Export

type Export interface {
	Control
	// Config is any customer specific configuration for this customer
	Config() Config
	// State is a customer specific state object for this integration and customer
	State() State
	// Stats is the stats object that an integration can use to track integration specific stats for the export
	Stats() map[string]interface{}
	// JobID will return a specific job id for this export which can be used in logs, etc
	JobID() string
	// Pipe should be called to get the pipe for streaming data back to pinpoint
	Pipe() Pipe
	// Historical if true, the integration should perform a full historical export
	Historical() bool
}

Export is a control interface for an export

type GraphQLClient

type GraphQLClient interface {
	Query(query string, variables map[string]interface{}, out interface{}, options ...WithGraphQLOption) error
}

GraphQLClient is an interface to a graphql client

type GraphQLClientManager

type GraphQLClientManager interface {
	// New is for creating a new graphql client instance that can be reused
	New(url string, headers map[string]string) GraphQLClient
}

GraphQLClientManager is an interface for creating graphql clients

type HTTPClient

type HTTPClient interface {
	// Get will call a HTTP GET method and set the result (if JSON) to out
	Get(out interface{}, options ...WithHTTPOption) (*HTTPResponse, error)
	// Post will call a HTTP POST method passing the data and set the result (if JSON) to out
	Post(data io.Reader, out interface{}, options ...WithHTTPOption) (*HTTPResponse, error)
	// Put will call a HTTP PUT method passing the data and set the result (if JSON) to out
	Put(data io.Reader, out interface{}, options ...WithHTTPOption) (*HTTPResponse, error)
	// Patch will call a HTTP PATCH method passing the data and set the result (if JSON) to out
	Patch(data io.Reader, out interface{}, options ...WithHTTPOption) (*HTTPResponse, error)
	// Delete will call a HTTP DELETE method and set the result (if JSON) to out
	Delete(out interface{}, options ...WithHTTPOption) (*HTTPResponse, error)
}

HTTPClient is an interface to a HTTP client

type HTTPClientManager

type HTTPClientManager interface {
	// New is for creating a new HTTP client instance that can be reused
	New(url string, headers map[string]string) HTTPClient
}

HTTPClientManager is an interface for creating HTTP clients

type HTTPError

type HTTPError struct {
	StatusCode int
	Body       io.Reader
}

HTTPError is returned if the error is a non-200 status code

func (*HTTPError) Error

func (e *HTTPError) Error() string

type HTTPOptions

type HTTPOptions struct {
	Request     *http.Request
	Response    *HTTPResponse // only set in the response case or nil in the request case
	Deadline    time.Time
	ShouldRetry bool
	RetryAfter  time.Duration
	Transport   http.RoundTripper
}

HTTPOptions is a holder for options

type HTTPResponse

type HTTPResponse struct {
	StatusCode int
	Headers    http.Header
	Body       []byte
}

HTTPResponse is a struct returned by the HTTPClient

type Identifier

type Identifier interface {
	// CustomerID will return the customer id for this instance
	CustomerID() string
	// IntegrationInstanceID will return the unique instance id for this integration for a customer
	IntegrationInstanceID() string
	// RefType for the integration
	RefType() string
}

Identifier is an interface for getting the ids of the current execution

func NewSimpleIdentifier

func NewSimpleIdentifier(customerID string, integrationInstanceID string, refType string) Identifier

NewSimpleIdentifier will return an identifier, should only be used in rare occasions for calling sdk apis that require an Identifier but are outside the scope of a webhook, mutation, enroll, dismiss, or validate since all those implement Identifier

type Installation

type Installation struct {
	Modes       []InstallationMode  `json:"modes" yaml:"modes"`
	Cloud       *InstallationConfig `json:"cloud,omitempty" yaml:"cloud"`
	SelfManaged *InstallationConfig `json:"selfmanaged,omitempty" yaml:"selfmanaged"`
}

Installation is metadata about the installation

type InstallationConfig

type InstallationConfig struct {
	Capabilities  []string            `json:"capabilities,omitempty" yaml:"capabilities"`
	Authorization []AuthorizationType `json:"authorizations" yaml:"authorizations"`
}

InstallationConfig is metadata about a specific installation mode

type InstallationMode

type InstallationMode string

InstallationMode is the type of installation

const (
	// InstallationModeCloud is for running the agent in the pinpoint cloud fully managed environment
	InstallationModeCloud InstallationMode = "cloud"
	// InstallationModeSelfManaged is for running the agent in a customers self managed environment
	InstallationModeSelfManaged InstallationMode = "selfmanaged"
)

type Instance

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

Instance is an instance of an integration for a specific customer and integration instance

func NewInstance

func NewInstance(config Config, state State, pipe Pipe, customerID string, refType string, integrationInstanceID string) *Instance

NewInstance returns a new instance of the integration

func (*Instance) Config

func (i *Instance) Config() Config

Config is a customer specific config object for this integration and customer

func (*Instance) CustomerID

func (i *Instance) CustomerID() string

CustomerID will return the customer id for the export

func (*Instance) IntegrationInstanceID

func (i *Instance) IntegrationInstanceID() string

IntegrationInstanceID will return the unique instance id for this integration for a customer

func (*Instance) Pipe

func (i *Instance) Pipe() Pipe

Pipe returns a pipe in the case the integration wants to send data back to pinpoint

func (*Instance) RefType

func (i *Instance) RefType() string

RefType returns the integration ref_type

func (*Instance) State

func (i *Instance) State() State

State is a customer specific state object for this integration and customer

type Integration

type Integration interface {
	// Start is called when the integration is starting up
	Start(logger Logger, config Config, manager Manager) error
	// Validate is called before a new integration instance is added to determine
	// if the config is valid and the integration can properly communicate with the
	// source system. The result and the error will both be delivered to the App.
	// Returning a nil error is considered a successful validation.
	Validate(validate Validate) (result map[string]interface{}, err error)
	// Enroll is called when a new integration instance is added
	Enroll(instance Instance) error
	// Dismiss is called when an existing integration instance is removed
	Dismiss(instance Instance) error
	// Export is called to tell the integration to run an export
	Export(export Export) error
	// WebHook is called when a webhook is received on behalf of the integration
	WebHook(webhook WebHook) error
	// Mutation is called when a mutation request is received on behalf of the integration
	Mutation(mutation Mutation) error
	// Stop is called when the integration is shutting down for cleanup
	Stop() error
}

Integration is the interface that integrations implement

type IntegrationType

type IntegrationType string

IntegrationType is the integration type

const (
	// CloudIntegration is a cloud managed integration
	CloudIntegration IntegrationType = "CLOUD"
	// SelfManagedIntegration is a self-managed integration
	SelfManagedIntegration IntegrationType = "SELFMANAGED"
)

type Logger

type Logger = log.Logger

Logger is a logger interface

func LogWith

func LogWith(logger Logger, keyvals ...interface{}) Logger

LogWith will return a new logger adding keyvalues to all logs

func NewNoOpTestLogger

func NewNoOpTestLogger() Logger

NewNoOpTestLogger returns a no-op test logger

type Manager

type Manager interface {
	// GraphQLManager returns a graphql manager instance
	GraphQLManager() GraphQLClientManager
	// HTTPManager returns a HTTP manager instance
	HTTPManager() HTTPClientManager
	// WebHookManager returns the WebHook manager instance
	WebHookManager() WebHookManager
	// AuthManager returns the Auth manager instance
	AuthManager() AuthManager
	// UserManager returns the User manager instance
	UserManager() UserManager
	// Close is called on shutdown to cleanup any resources
	Close() error
}

Manager is the control interface that integrations can use to perform tasks on its behalf

type Model

type Model = datamodel.Model

Model is a data model type

func NewAgileBoardUpdate

func NewAgileBoardUpdate(customerID string, integrationInstanceID string, refID string, refType string, val AgileBoardUpdate) Model

NewAgileBoardUpdate will create a new update object for work.Board which can be sent to an sdk.Pipe using Write

func NewAgileSprintUpdate

func NewAgileSprintUpdate(customerID string, integrationInstanceID string, refID string, refType string, val AgileSprintUpdate) Model

NewAgileSprintUpdate will create a new update object for work.Sprint which can be sent to an sdk.Pipe using Write

func NewWorkIssueCommentUpdate

func NewWorkIssueCommentUpdate(customerID string, integrationInstanceID string, refID string, refType string, projectRefID string, val WorkIssueCommentUpdate) Model

NewWorkIssueCommentUpdate will create a new update object for work.IssueComment which can be sent to an sdk.Pipe using Write

func NewWorkIssueUpdate

func NewWorkIssueUpdate(customerID string, integrationInstanceID string, refID string, refType string, val WorkIssueUpdate) Model

NewWorkIssueUpdate will create a new update object for work.Issue which can be sent to an sdk.Pipe using Write

func NewWorkProjectUpdate

func NewWorkProjectUpdate(customerID string, integrationInstanceID string, refID string, refType string, val WorkProjectUpdate) Model

NewWorkProjectUpdate will create a new update object for work.Project which can be sent to an sdk.Pipe using Write

type Mutation

type Mutation interface {
	Control
	// Config is any customer specific configuration for this customer
	Config() Config
	// State is a customer specific state object for this integration and customer
	State() State
	// Pipe should be called to get the pipe for streaming data back to pinpoint
	Pipe() Pipe
	// ID is the primary key of the payload
	ID() string
	// Model is the name of the model of the payload
	Model() string
	// Action is the mutation action
	Action() MutationAction
	// Payload is the payload of the mutation which is one of the mutation types
	Payload() interface{}
	// User is the user that is requesting the mutation and any authorization details that might be required
	User() MutationUser
}

Mutation is a control interface for a mutation

type MutationAction

type MutationAction string

MutationAction is a mutation action type

const (
	// CreateAction is a create mutation action
	CreateAction MutationAction = "create"
	// UpdateAction is a update mutation action
	UpdateAction MutationAction = "update"
	// DeleteAction is a delete mutation action
	DeleteAction MutationAction = "delete"
)

type MutationUser

type MutationUser struct {
	// ID is the ref_id to the source system
	ID         string      `json:"id"`
	OAuth2Auth *oauth2Auth `json:"oauth2_auth,omitempty"`
	BasicAuth  *basicAuth  `json:"basic_auth,omitempty"`
	APIKeyAuth *apikeyAuth `json:"apikey_auth,omitempty"`
}

MutationUser is the user that is requesting the mutation

type NameID

type NameID struct {
	ID   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

NameID is a container for containing the ID, Name or both

type NameRefID

type NameRefID struct {
	RefID *string `json:"ref_id,omitempty"`
	Name  *string `json:"name,omitempty"`
}

NameRefID is a container for containing the RefID, Name or both

type PartialModel

type PartialModel = datamodel.PartialModel

PartialModel is a partial datamodel type with all optional fields

type Pipe

type Pipe interface {
	// Write a model back to the output system
	Write(object Model) error
	// Flush will tell the pipe to flush any pending data
	Flush() error
	// Close is called when the integration has completed and no more data will be sent
	Close() error
}

Pipe for sending data back to pinpoint

type RateLimitError

type RateLimitError struct {
	RetryAfter time.Duration
}

RateLimitError is a specific error for detection of rate limit errors

func (*RateLimitError) Error

func (e *RateLimitError) Error() string

type SourceCodeCommit

type SourceCodeCommit = sourcecode.Commit

SourceCodeCommit is the source code commit

type SourceCodeCommitCreatedDate

type SourceCodeCommitCreatedDate = sourcecode.CommitCreatedDate

SourceCodeCommitCreatedDate is the commit create date

type SourceCodePullRequest

type SourceCodePullRequest = sourcecode.PullRequest

SourceCodePullRequest is a pull request

type SourceCodePullRequestClosedDate

type SourceCodePullRequestClosedDate = sourcecode.PullRequestClosedDate

SourceCodePullRequestClosedDate is the pull request closed date

type SourceCodePullRequestComment

type SourceCodePullRequestComment = sourcecode.PullRequestComment

SourceCodePullRequestComment is a pull request comment

type SourceCodePullRequestCommentCreatedDate

type SourceCodePullRequestCommentCreatedDate = sourcecode.PullRequestCommentCreatedDate

SourceCodePullRequestCommentCreatedDate is a pull request comment created date

type SourceCodePullRequestCommentUpdatedDate

type SourceCodePullRequestCommentUpdatedDate = sourcecode.PullRequestCommentUpdatedDate

SourceCodePullRequestCommentUpdatedDate is a pull request comment updated date

type SourceCodePullRequestCommit

type SourceCodePullRequestCommit = sourcecode.PullRequestCommit

SourceCodePullRequestCommit is a pull request commit

type SourceCodePullRequestCommitCreatedDate

type SourceCodePullRequestCommitCreatedDate = sourcecode.PullRequestCommitCreatedDate

SourceCodePullRequestCommitCreatedDate is the created date for a pull request commit

type SourceCodePullRequestCreatedDate

type SourceCodePullRequestCreatedDate = sourcecode.PullRequestCreatedDate

SourceCodePullRequestCreatedDate is the pull request created date

type SourceCodePullRequestMergedDate

type SourceCodePullRequestMergedDate = sourcecode.PullRequestMergedDate

SourceCodePullRequestMergedDate is the pull request merged date

type SourceCodePullRequestReview

type SourceCodePullRequestReview = sourcecode.PullRequestReview

SourceCodePullRequestReview is a pull request review

type SourceCodePullRequestReviewCreatedDate

type SourceCodePullRequestReviewCreatedDate = sourcecode.PullRequestReviewCreatedDate

SourceCodePullRequestReviewCreatedDate is a pull request review created date

type SourceCodePullRequestReviewState

type SourceCodePullRequestReviewState = sourcecode.PullRequestReviewState

SourceCodePullRequestReviewState is a pull request review state enum

const SourceCodePullRequestReviewStateApproved SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStateApproved

SourceCodePullRequestReviewStateApproved is the enumeration value for approved

const SourceCodePullRequestReviewStateAssigned SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStateAssigned

SourceCodePullRequestReviewStateAssigned is the enumeration value for assigned

const SourceCodePullRequestReviewStateChangesRequested SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStateChangesRequested

SourceCodePullRequestReviewStateChangesRequested is the enumeration value for changes_requested

const SourceCodePullRequestReviewStateCommented SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStateCommented

SourceCodePullRequestReviewStateCommented is the enumeration value for commented

const SourceCodePullRequestReviewStateDismissed SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStateDismissed

SourceCodePullRequestReviewStateDismissed is the enumeration value for dismissed

const SourceCodePullRequestReviewStatePending SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStatePending

SourceCodePullRequestReviewStatePending is the enumeration value for pending

const SourceCodePullRequestReviewStateRequestRemoved SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStateRequestRemoved

SourceCodePullRequestReviewStateRequestRemoved is the enumeration value for request_removed

const SourceCodePullRequestReviewStateRequested SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStateRequested

SourceCodePullRequestReviewStateRequested is the enumeration value for requested

const SourceCodePullRequestReviewStateUnassigned SourceCodePullRequestReviewState = sourcecode.PullRequestReviewStateUnassigned

SourceCodePullRequestReviewStateUnassigned is the enumeration value for unassigned

type SourceCodePullRequestStatus

type SourceCodePullRequestStatus = sourcecode.PullRequestStatus

SourceCodePullRequestStatus is the pull request state enum

const SourceCodePullRequestStatusClosed SourceCodePullRequestStatus = sourcecode.PullRequestStatusClosed

SourceCodePullRequestStatusClosed is the enumeration value for closed

const SourceCodePullRequestStatusLocked SourceCodePullRequestStatus = sourcecode.PullRequestStatusLocked

SourceCodePullRequestStatusLocked is the enumeration value for locked

const SourceCodePullRequestStatusMerged SourceCodePullRequestStatus = sourcecode.PullRequestStatusMerged

SourceCodePullRequestStatusMerged is the enumeration value for merged

const SourceCodePullRequestStatusOpen SourceCodePullRequestStatus = sourcecode.PullRequestStatusOpen

SourceCodePullRequestStatusOpen is the enumeration value for open

const SourceCodePullRequestStatusSuperseded SourceCodePullRequestStatus = sourcecode.PullRequestStatusSuperseded

SourceCodePullRequestStatusSuperseded is the enumeration value for superseded

type SourceCodePullRequestUpdatedDate

type SourceCodePullRequestUpdatedDate = sourcecode.PullRequestUpdatedDate

SourceCodePullRequestUpdatedDate is the pull request updated date

type SourceCodeRepo

type SourceCodeRepo = sourcecode.Repo

SourceCodeRepo is a code repository in the source code system

type SourceCodeRepoAffiliation

type SourceCodeRepoAffiliation = sourcecode.RepoAffiliation

SourceCodeRepoAffiliation is the repo affiliation

type SourceCodeRepoVisibility

type SourceCodeRepoVisibility = sourcecode.RepoVisibility

SourceCodeRepoVisibility is the visibility of the repo

type SourceCodeUser

type SourceCodeUser = sourcecode.User

SourceCodeUser is a user in the source code system

type SourceCodeUserType

type SourceCodeUserType = sourcecode.UserType

SourceCodeUserType is a user type in the source code system

type SourcecodePullRequestUpdateMutation

type SourcecodePullRequestUpdateMutation struct {
	Set struct {
		Title       *string                      `json:"title,omitempty"`       // Title is for updating the title to the pull request
		Description *string                      `json:"description,omitempty"` // Description is for updating the description of the pull request
		Status      *SourceCodePullRequestStatus `json:"status,omitempty"`      // Status is for changing the status of the pull request
	} `json:"set"`
}

SourcecodePullRequestUpdateMutation is an update mutation for a pull request

type State

type State interface {
	// Set a value by key in state. the value must be able to serialize to JSON
	Set(key string, value interface{}) error
	// SetWithExpires will set key and value and it will automatically expire from state after expiry
	SetWithExpires(key string, value interface{}, expiry time.Duration) error
	// Get will return a value for a given key and set the value to the address of out
	Get(key string, out interface{}) (bool, error)
	// Exists return true if the key exists in state
	Exists(key string) bool
	// Delete will return data for key in state
	Delete(key string) error
	// Flush any pending data to storage
	Flush() error
}

State is a state object to allow the integration to serialize state for a given customer

type User

type User struct {
	ID                  string   `json:"_id"`
	Name                string   `json:"name"`
	Emails              []string `json:"emails"`
	RefID               string   `json:"ref_id"`
	OAuth1Authorization *struct {
		Date        int64  `json:"date_ts"`
		ConsumerKey string `json:"consumer_key"`
		Token       string `json:"token"`
		TokenSecret string `json:"token_secret"`
	} `json:"oauth1_authorization"`
	OAuth2Authorization *struct {
		Date         int64   `json:"date_ts"`
		AccessToken  string  `json:"token"`
		RefreshToken *string `json:"refresh_token"`
		Scopes       string  `json:"scopes"`
	} `json:"oauth_authorization"`
}

User is an integration user that has been linked to the integration instance for a customer

type UserManager

type UserManager interface {
	// Users will return the integration users for a given integration instance
	Users(control Control) ([]User, error)
}

UserManager is a control interface for getting users

type Validate

type Validate interface {
	Identifier
	Config() Config
}

Validate is a control interface for validating a configuration before enroll

type ValidatedAccount

type ValidatedAccount struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	AvatarURL   string `json:"avatarUrl"`
	TotalCount  int    `json:"totalCount"`
	Type        string `json:"type"`
	Public      bool   `json:"public"`
}

ValidatedAccount is a result that can be sent back to the integration UI for a validate account

type WebHook

type WebHook interface {
	Control
	// Config is any customer specific configuration for this customer
	Config() Config
	// State is a customer specific state object for this integration and customer
	State() State
	// RefID will return the ref id from when the hook was created
	RefID() string
	// Pipe returns a pipe for sending data back to pinpoint from the web hook data
	Pipe() Pipe
	// Data returns the payload of a webhook decoded from json into a map
	Data() (map[string]interface{}, error)
	// Bytes will return the underlying data as bytes
	Bytes() []byte
	// URL the webhook callback url
	URL() string
	// Headers are the headers that came from the web hook
	Headers() map[string]string
	// Scope is the registered webhook scope
	Scope() WebHookScope
}

WebHook is a control interface for web hook data received by pinpoint on behalf of the integration

type WebHookManager

type WebHookManager interface {
	// Create is used by the integration to create a webhook on behalf of the integration for a given customer, reftype and refid
	// the result will be a fully qualified URL to the webhook endpoint that should be registered with the integration
	Create(customerID string, integrationInstanceID string, refType string, refID string, scope WebHookScope, params ...string) (string, error)
	// Delete will remove the webhook from the entity based on scope
	Delete(customerID string, integrationInstanceID string, refType string, refID string, scope WebHookScope) error
	// Exists returns true if the webhook is registered for the given entity based on ref_id and scope
	Exists(customerID string, integrationInstanceID string, refType string, refID string, scope WebHookScope) bool
	// Errored will set the errored state on the webhook and the message will be the Error() value of the error
	Errored(customerID string, integrationInstanceID string, refType string, refID string, scope WebHookScope, err error)
	// HookURL will return the webhook url
	HookURL(customerID string, integrationInstanceID string, refType string, refID string, scope WebHookScope) (string, error)
}

WebHookManager is the manager for dealing with WebHooks

type WebHookScope

type WebHookScope string

WebHookScope is the scope of the webhook

const (
	// WebHookScopeSystem is the system scope for a webhook
	WebHookScopeSystem WebHookScope = "system"
	// WebHookScopeOrg is the org scope for a webhook
	WebHookScopeOrg WebHookScope = "org"
	// WebHookScopeRepo is the repo scope for a webhook
	WebHookScopeRepo WebHookScope = "repo"
	// WebHookScopeProject is the project scope for a webhook
	WebHookScopeProject WebHookScope = "project"
)

type WithGraphQLOption

type WithGraphQLOption func(req *http.Request) error

WithGraphQLOption is an option for setting details on the request

func WithGraphQLHeader

func WithGraphQLHeader(key, value string) WithGraphQLOption

WithGraphQLHeader will add a specific header to an outgoing request

type WithHTTPOption

type WithHTTPOption func(opt *HTTPOptions) error

WithHTTPOption is an option for setting details on the request

func WithAuthorization

func WithAuthorization(value string) WithHTTPOption

WithAuthorization will set the Authorization header

func WithBasicAuth

func WithBasicAuth(username string, password string) WithHTTPOption

WithBasicAuth will add the Basic authentication header to the outgoing request

func WithContentType

func WithContentType(value string) WithHTTPOption

WithContentType will set the Content-Type header

func WithDeadline

func WithDeadline(duration time.Duration) WithHTTPOption

WithDeadline will set a deadline for getting a response

func WithEndpoint

func WithEndpoint(value string) WithHTTPOption

WithEndpoint will add to the url path

func WithGetQueryParameters

func WithGetQueryParameters(variables url.Values) WithHTTPOption

WithGetQueryParameters will allow the query parameters to be overriden

func WithHTTPHeader

func WithHTTPHeader(key, value string) WithHTTPOption

WithHTTPHeader will add a specific header to an outgoing request

func WithOAuth1

func WithOAuth1(manager Manager, identifier Identifier, consumerKey string, consumerSecret string, token string, tokenSecret string) WithHTTPOption

WithOAuth1 will set the appropriate headers for making an OAuth1 signed request

func WithOAuth2Refresh

func WithOAuth2Refresh(manager Manager, refType string, accessToken string, refreshToken string) WithHTTPOption

WithOAuth2Refresh will set the oauth2 information and support automatic token refresh

type WorkConfig

type WorkConfig = work.Config

WorkConfig is the work config model

type WorkConfigStatuses

type WorkConfigStatuses = work.ConfigStatuses

WorkConfigStatuses is the work config status type

type WorkIssue

type WorkIssue = work.Issue

WorkIssue is a issue

type WorkIssueAttachments

type WorkIssueAttachments = work.IssueAttachments

WorkIssueAttachments is the work issue attachments

type WorkIssueChangeLog

type WorkIssueChangeLog = work.IssueChangeLog

WorkIssueChangeLog is the issue changelog

type WorkIssueChangeLogCreatedDate

type WorkIssueChangeLogCreatedDate = work.IssueChangeLogCreatedDate

WorkIssueChangeLogCreatedDate is the issue change log created date

type WorkIssueChangeLogField

type WorkIssueChangeLogField = work.IssueChangeLogField

WorkIssueChangeLogField is the issue change log field enum

const WorkIssueChangeLogFieldAssigneeRefID WorkIssueChangeLogField = work.IssueChangeLogFieldAssigneeRefID

WorkIssueChangeLogFieldAssigneeRefID is the enumeration value for assignee_ref_id

const WorkIssueChangeLogFieldDueDate WorkIssueChangeLogField = work.IssueChangeLogFieldDueDate

WorkIssueChangeLogFieldDueDate is the enumeration value for due_date

const WorkIssueChangeLogFieldEpicID WorkIssueChangeLogField = work.IssueChangeLogFieldEpicID

WorkIssueChangeLogFieldEpicID is the enumeration value for epic_id

const WorkIssueChangeLogFieldIdentifier WorkIssueChangeLogField = work.IssueChangeLogFieldIdentifier

WorkIssueChangeLogFieldIdentifier is the enumeration value for identifier

const WorkIssueChangeLogFieldParentID WorkIssueChangeLogField = work.IssueChangeLogFieldParentID

WorkIssueChangeLogFieldParentID is the enumeration value for parent_id

const WorkIssueChangeLogFieldPriority WorkIssueChangeLogField = work.IssueChangeLogFieldPriority

WorkIssueChangeLogFieldPriority is the enumeration value for priority

const WorkIssueChangeLogFieldProjectID WorkIssueChangeLogField = work.IssueChangeLogFieldProjectID

WorkIssueChangeLogFieldProjectID is the enumeration value for project_id

const WorkIssueChangeLogFieldReporterRefID WorkIssueChangeLogField = work.IssueChangeLogFieldReporterRefID

WorkIssueChangeLogFieldReporterRefID is the enumeration value for reporter_ref_id

const WorkIssueChangeLogFieldResolution WorkIssueChangeLogField = work.IssueChangeLogFieldResolution

WorkIssueChangeLogFieldResolution is the enumeration value for resolution

const WorkIssueChangeLogFieldSprintIds WorkIssueChangeLogField = work.IssueChangeLogFieldSprintIds

WorkIssueChangeLogFieldSprintIds is the enumeration value for sprint_ids

const WorkIssueChangeLogFieldStatus WorkIssueChangeLogField = work.IssueChangeLogFieldStatus

WorkIssueChangeLogFieldStatus is the enumeration value for status

const WorkIssueChangeLogFieldTags WorkIssueChangeLogField = work.IssueChangeLogFieldTags

WorkIssueChangeLogFieldTags is the enumeration value for tags

const WorkIssueChangeLogFieldTitle WorkIssueChangeLogField = work.IssueChangeLogFieldTitle

WorkIssueChangeLogFieldTitle is the enumeration value for title

const WorkIssueChangeLogFieldType WorkIssueChangeLogField = work.IssueChangeLogFieldType

WorkIssueChangeLogFieldType is the enumeration value for type

type WorkIssueComment

type WorkIssueComment = work.IssueComment

WorkIssueComment is a issue comment

type WorkIssueCommentCreatedDate

type WorkIssueCommentCreatedDate = work.IssueCommentCreatedDate

WorkIssueCommentCreatedDate is the issue comment created date

type WorkIssueCommentUpdate

type WorkIssueCommentUpdate struct {
	Set struct {
		Active *bool
	}
	Unset struct {
	}
	Push struct {
	}
	Pull struct {
	}
}

WorkIssueCommentUpdate is an action for update a work.IssueComment

type WorkIssueCommentUpdatedDate

type WorkIssueCommentUpdatedDate = work.IssueCommentUpdatedDate

WorkIssueCommentUpdatedDate is the issue comment updated date

type WorkIssueCreateMutation

type WorkIssueCreateMutation struct {
	Title         string   `json:"title"`               // Title is for setting the title of the issue
	Description   string   `json:"description"`         // Description is for setting the description of the issue
	AssigneeRefID *string  `json:"assignee,omitempty"`  // AssigneeRefID is for setting the assignee of the issue to a ref_id
	Priority      *NameID  `json:"priority,omitempty"`  // Priority is for setting the priority of the issue
	Type          *NameID  `json:"type,omitempty"`      // Type is for setting the issue type of the issue
	ProjectRefID  string   `json:"project_id"`          // ProjectID is the id to the issue project as a ref_id
	Epic          *NameID  `json:"epic,omitempty"`      // Epic is for setting an epic for the issue
	ParentRefID   *string  `json:"parent_id,omitempty"` // ParentRefID is for setting the parent issue as a ref_id
	Labels        []string `json:"labels,omitempty"`    // Labels is for setting the labels for an issue
}

WorkIssueCreateMutation is a create mutation for a issue

type WorkIssueCreatedDate

type WorkIssueCreatedDate = work.IssueCreatedDate

WorkIssueCreatedDate is the issue created date

type WorkIssueDueDate

type WorkIssueDueDate = work.IssueDueDate

WorkIssueDueDate is the issue due date

type WorkIssueLinkedIssues

type WorkIssueLinkedIssues = work.IssueLinkedIssues

WorkIssueLinkedIssues is the issue linked issues

type WorkIssueLinkedIssuesLinkType

type WorkIssueLinkedIssuesLinkType = work.IssueLinkedIssuesLinkType

WorkIssueLinkedIssuesLinkType is the linked isuse link type enum

const WorkIssueLinkedIssuesLinkTypeBlocks WorkIssueLinkedIssuesLinkType = work.IssueLinkedIssuesLinkTypeBlocks

WorkIssueLinkedIssuesLinkTypeBlocks is the enumeration value for blocks

const WorkIssueLinkedIssuesLinkTypeCauses WorkIssueLinkedIssuesLinkType = work.IssueLinkedIssuesLinkTypeCauses

WorkIssueLinkedIssuesLinkTypeCauses is the enumeration value for causes

const WorkIssueLinkedIssuesLinkTypeClones WorkIssueLinkedIssuesLinkType = work.IssueLinkedIssuesLinkTypeClones

WorkIssueLinkedIssuesLinkTypeClones is the enumeration value for clones

const WorkIssueLinkedIssuesLinkTypeDuplicates WorkIssueLinkedIssuesLinkType = work.IssueLinkedIssuesLinkTypeDuplicates

WorkIssueLinkedIssuesLinkTypeDuplicates is the enumeration value for duplicates

const WorkIssueLinkedIssuesLinkTypeRelates WorkIssueLinkedIssuesLinkType = work.IssueLinkedIssuesLinkTypeRelates

WorkIssueLinkedIssuesLinkTypeRelates is the enumeration value for relates

type WorkIssuePlannedEndDate

type WorkIssuePlannedEndDate = work.IssuePlannedEndDate

WorkIssuePlannedEndDate is the issue planned end date

type WorkIssuePlannedStartDate

type WorkIssuePlannedStartDate = work.IssuePlannedStartDate

WorkIssuePlannedStartDate is the issue planned start date

type WorkIssuePriority

type WorkIssuePriority = work.IssuePriority

WorkIssuePriority is a issue priority

type WorkIssueStatus

type WorkIssueStatus = work.IssueStatus

WorkIssueStatus is a issue status

type WorkIssueTransitions

type WorkIssueTransitions = work.IssueTransitions

WorkIssueTransitions is the issue transitions

type WorkIssueType

type WorkIssueType = work.IssueType

WorkIssueType is a issue type

type WorkIssueTypeMappedType

type WorkIssueTypeMappedType = work.IssueTypeMappedType

WorkIssueTypeMappedType is the issue type mapped type enum

const WorkIssueTypeMappedTypeBug WorkIssueTypeMappedType = work.IssueTypeMappedTypeBug

WorkIssueTypeMappedTypeBug is the enumeration value for bug

const WorkIssueTypeMappedTypeEnhancement WorkIssueTypeMappedType = work.IssueTypeMappedTypeEnhancement

WorkIssueTypeMappedTypeEnhancement is the enumeration value for enhancement

const WorkIssueTypeMappedTypeEpic WorkIssueTypeMappedType = work.IssueTypeMappedTypeEpic

WorkIssueTypeMappedTypeEpic is the enumeration value for epic

const WorkIssueTypeMappedTypeFeature WorkIssueTypeMappedType = work.IssueTypeMappedTypeFeature

WorkIssueTypeMappedTypeFeature is the enumeration value for feature

const WorkIssueTypeMappedTypeStory WorkIssueTypeMappedType = work.IssueTypeMappedTypeStory

WorkIssueTypeMappedTypeStory is the enumeration value for story

const WorkIssueTypeMappedTypeSubtask WorkIssueTypeMappedType = work.IssueTypeMappedTypeSubtask

WorkIssueTypeMappedTypeSubtask is the enumeration value for subtask

const WorkIssueTypeMappedTypeTask WorkIssueTypeMappedType = work.IssueTypeMappedTypeTask

WorkIssueTypeMappedTypeTask is the enumeration value for task

const WorkIssueTypeMappedTypeUnknown WorkIssueTypeMappedType = work.IssueTypeMappedTypeUnknown

WorkIssueTypeMappedTypeUnknown is the enumeration value for unknown

type WorkIssueUpdate

type WorkIssueUpdate struct {
	Set struct {
		Title            *string
		Description      *string
		Active           *bool
		StoryPoints      *float32
		Identifier       *string
		ProjectID        *string
		URL              *string
		DueDate          *time.Time
		Priority         *NameID
		Type             *NameID
		Status           *NameID
		AssigneeRefID    *string
		ParentID         *string
		Tags             *[]string
		EpicID           *string
		Resolution       *string
		PlannedStartDate *time.Time
		PlannedEndDate   *time.Time
		SprintIDs        *[]string
		Transitions      *[]NameRefID
	}
	Unset struct {
		StoryPoints      *bool
		DueDate          *bool
		ParentID         *bool
		EpicID           *bool
		PlannedStartDate *bool
		PlannedEndDate   *bool
	}
	Push struct {
		Tags         *[]string
		SprintIDs    *[]string
		ChangeLogs   *[]WorkIssueChangeLog
		LinkedIssues *[]WorkIssueLinkedIssues
	}
	Pull struct {
		Tags         *[]string
		SprintIDs    *[]string
		LinkedIssues *[]WorkIssueLinkedIssues
	}
}

WorkIssueUpdate is an action for update a work.Issue

type WorkIssueUpdateMutation

type WorkIssueUpdateMutation struct {
	Set struct {
		Title         *string `json:"title"`                // Title is for updating the title to the issue
		Transition    *NameID `json:"transition,omitempty"` // Transition information (if used) for the issue
		Status        *NameID `json:"status,omitempty"`     // Status is for changing the status of the issue
		Priority      *NameID `json:"priority,omitempty"`   // Priority is for changing the priority of the issue
		Resolution    *NameID `json:"resolution,omitempty"` // Resolution is for changing the resolution of the issue
		Epic          *NameID `json:"epic,omitempty"`       // Epic is for updating the epic for the issue
		AssigneeRefID *string `json:"assignee,omitempty"`   // AssigneeRefID is for changing the assignee of the issue to a ref_id
	} `json:"set"`
	Unset struct {
		Epic     bool `json:"epic"`     // Epic is for removing the epic from the issue (if set to true)
		Assignee bool `json:"assignee"` // Assignee is for removing the assignee from the issue (if set to true)
	} `json:"unset"`
}

WorkIssueUpdateMutation is an update mutation for a issue

type WorkIssueUpdatedDate

type WorkIssueUpdatedDate = work.IssueUpdatedDate

WorkIssueUpdatedDate is the issue updated date

type WorkProject

type WorkProject = work.Project

WorkProject is a project

type WorkProjectAffiliation

type WorkProjectAffiliation = work.ProjectAffiliation

WorkProjectAffiliation is the project affiliation

type WorkProjectCapability

type WorkProjectCapability = work.ProjectCapability

WorkProjectCapability is the project capability

type WorkProjectIssueResolutions

type WorkProjectIssueResolutions = work.ProjectIssueResolutions

WorkProjectIssueResolutions is a work.ProjectIssueResolutions

type WorkProjectIssueTypes

type WorkProjectIssueTypes = work.ProjectIssueTypes

WorkProjectIssueTypes is a work.ProjectIssueTypes

type WorkProjectUpdate

type WorkProjectUpdate struct {
	Set struct {
		Active      *bool
		Name        *string
		Description *string
	}
	Unset struct {
	}
	Push struct {
	}
	Pull struct {
	}
}

WorkProjectUpdate is an action for update a work.Project

type WorkProjectVisibility

type WorkProjectVisibility = work.ProjectVisibility

WorkProjectVisibility is the visibility of the project

type WorkUser

type WorkUser = work.User

WorkUser is a user in the work system

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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