models

package
v0.0.0-...-1fa52ee Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0, BSD-2-Clause, ISC, + 1 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiMyselfResponse

type ApiMyselfResponse struct {
	AccountId   string
	DisplayName string
}

func (ApiMyselfResponse) TableName

func (ApiMyselfResponse) TableName() string

type BoardResponse

type BoardResponse struct {
	Id    int
	Title string
	Value string
}

type CommitUrlPattern

type CommitUrlPattern struct {
	Pattern string `json:"pattern"`
	Regex   string `json:"regex"`
}

type DeploymentType

type DeploymentType string
const DeploymentCloud DeploymentType = "Cloud"
const DeploymentServer DeploymentType = "Server"

type EpicResponse

type EpicResponse struct {
	Id    int
	Title string
	Value string
}

type JiraAccount

type JiraAccount struct {
	common.NoPKModel

	// collected fields
	ConnectionId uint64 `gorm:"primarykey"`
	AccountId    string `gorm:"primaryKey;type:varchar(100)"`
	AccountType  string `gorm:"type:varchar(100)"`
	Name         string `gorm:"type:varchar(255)"`
	Email        string `gorm:"type:varchar(255)"`
	AvatarUrl    string `gorm:"type:varchar(255)"`
	Timezone     string `gorm:"type:varchar(255)"`
}

func (JiraAccount) TableName

func (JiraAccount) TableName() string

type JiraApiParams

type JiraApiParams struct {
	ConnectionId uint64
	BoardId      uint64
}

type JiraBoard

type JiraBoard struct {
	common.Scope `mapstructure:",squash"`
	BoardId      uint64 `json:"boardId" mapstructure:"boardId" validate:"required" gorm:"primaryKey"`
	ProjectId    uint   `json:"projectId" mapstructure:"projectId"`
	Name         string `json:"name" mapstructure:"name" gorm:"type:varchar(255)"`
	Self         string `json:"self" mapstructure:"self" gorm:"type:varchar(255)"`
	Type         string `json:"type" mapstructure:"type" gorm:"type:varchar(100)"`
	Jql          string `json:"jql" mapstructure:"jql"`
}

func (JiraBoard) ScopeFullName

func (b JiraBoard) ScopeFullName() string

func (JiraBoard) ScopeId

func (b JiraBoard) ScopeId() string

func (JiraBoard) ScopeName

func (b JiraBoard) ScopeName() string

func (JiraBoard) ScopeParams

func (b JiraBoard) ScopeParams() interface{}

func (JiraBoard) TableName

func (JiraBoard) TableName() string

type JiraBoardIssue

type JiraBoardIssue struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	BoardId      uint64 `gorm:"primaryKey"`
	IssueId      uint64 `gorm:"primaryKey"`
	common.NoPKModel
}

func (JiraBoardIssue) TableName

func (JiraBoardIssue) TableName() string

type JiraBoardSprint

type JiraBoardSprint struct {
	common.NoPKModel
	ConnectionId uint64 `gorm:"primaryKey"`
	BoardId      uint64 `gorm:"primaryKey"`
	SprintId     uint64 `gorm:"primaryKey"`
}

func (JiraBoardSprint) TableName

func (JiraBoardSprint) TableName() string

type JiraConn

type JiraConn struct {
	helper.RestConnection `mapstructure:",squash"`
	helper.MultiAuth      `mapstructure:",squash"`
	helper.BasicAuth      `mapstructure:",squash"`
	helper.AccessToken    `mapstructure:",squash"`
}

JiraConn holds the essential information to connect to the Jira API

func (*JiraConn) Sanitize

func (jc *JiraConn) Sanitize() JiraConn

func (*JiraConn) SetupAuthentication

func (jc *JiraConn) SetupAuthentication(req *http.Request) errors.Error

SetupAuthentication implements the `IAuthentication` interface by delegating the actual logic to the `MultiAuth` struct to help us write less code

type JiraConnection

type JiraConnection struct {
	helper.BaseConnection `mapstructure:",squash"`
	JiraConn              `mapstructure:",squash"`
}

JiraConnection holds JiraConn plus ID/Name for database storage

func (*JiraConnection) MergeFromRequest

func (connection *JiraConnection) MergeFromRequest(target *JiraConnection, body map[string]interface{}) error

func (JiraConnection) Sanitize

func (connection JiraConnection) Sanitize() JiraConnection

func (JiraConnection) TableName

func (JiraConnection) TableName() string

type JiraErrorInfo

type JiraErrorInfo struct {
	ErrorMessages []string `json:"errorMessages"`
}

type JiraIssue

type JiraIssue struct {
	// collected fields
	ConnectionId             uint64 `gorm:"primaryKey"`
	IssueId                  uint64 `gorm:"primarykey"`
	ProjectId                uint64
	ProjectName              string `gorm:"type:varchar(255)"`
	Self                     string `gorm:"type:varchar(255)"`
	IconURL                  string `gorm:"type:varchar(255);column:icon_url"`
	IssueKey                 string `gorm:"type:varchar(255)"`
	Summary                  string
	Description              string
	Type                     string `gorm:"type:varchar(255)"`
	EpicKey                  string `gorm:"type:varchar(255)"`
	StatusName               string `gorm:"type:varchar(255)"`
	StatusKey                string `gorm:"type:varchar(255)"`
	StoryPoint               *float64
	OriginalEstimateMinutes  *int64 // user input?
	AggregateEstimateMinutes int64  // sum up of all subtasks?
	RemainingEstimateMinutes int64  // could it be negative value?
	CreatorAccountId         string `gorm:"type:varchar(255)"`
	CreatorAccountType       string `gorm:"type:varchar(255)"`
	CreatorDisplayName       string `gorm:"type:varchar(255)"`
	AssigneeAccountId        string `gorm:"type:varchar(255);comment:latest assignee"`
	AssigneeAccountType      string `gorm:"type:varchar(255)"`
	AssigneeDisplayName      string `gorm:"type:varchar(255)"`
	PriorityId               uint64
	PriorityName             string `gorm:"type:varchar(255)"`
	ParentId                 uint64
	ParentKey                string `gorm:"type:varchar(255)"`
	SprintId                 uint64 // latest sprint, issue might cross multiple sprints, would be addressed by #514
	SprintName               string `gorm:"type:varchar(255)"`
	ResolutionDate           *time.Time
	Created                  time.Time
	Updated                  time.Time `gorm:"index"`
	SpentMinutes             *int64
	CommentTotal             int64
	LeadTimeMinutes          *uint
	StdType                  string `gorm:"type:varchar(255)"`
	StdStatus                string `gorm:"type:varchar(255)"`
	Components               string `gorm:"type:varchar(255)"`
	ChangelogTotal           int
	common.NoPKModel
}

func (JiraIssue) TableName

func (JiraIssue) TableName() string

type JiraIssueChangelogItems

type JiraIssueChangelogItems struct {
	common.NoPKModel

	// collected fields
	ConnectionId uint64 `gorm:"primaryKey"`
	ChangelogId  uint64 `gorm:"primaryKey"`
	Field        string `gorm:"primaryKey"`
	FieldType    string
	FieldId      string
	FromValue    string
	FromString   string
	ToValue      string
	ToString     string
}

func (JiraIssueChangelogItems) TableName

func (JiraIssueChangelogItems) TableName() string

type JiraIssueChangelogs

type JiraIssueChangelogs struct {
	common.NoPKModel

	// collected fields
	ConnectionId      uint64 `gorm:"primaryKey"`
	ChangelogId       uint64 `gorm:"primarykey"`
	IssueId           uint64 `gorm:"index"`
	AuthorAccountId   string `gorm:"type:varchar(255)"`
	AuthorDisplayName string `gorm:"type:varchar(255)"`
	AuthorActive      bool
	Created           time.Time  `gorm:"index"`
	IssueUpdated      *time.Time `comment:"corresponding issue.updated time, changelog might need update IFF changelog.issue_updated < issue.updated"`
}

func (JiraIssueChangelogs) TableName

func (JiraIssueChangelogs) TableName() string

type JiraIssueComment

type JiraIssueComment struct {
	common.NoPKModel
	ConnectionId       uint64 `gorm:"primaryKey"`
	IssueId            uint64 `gorm:"primarykey"`
	ComentId           string `gorm:"primarykey"`
	Self               string `gorm:"type:varchar(255)"`
	Body               string
	CreatorAccountId   string    `gorm:"type:varchar(255)"`
	CreatorDisplayName string    `gorm:"type:varchar(255)"`
	Created            time.Time `json:"created"`
	Updated            time.Time `json:"updated"`
	IssueUpdated       *time.Time
}

func (JiraIssueComment) TableName

func (JiraIssueComment) TableName() string

type JiraIssueCommit

type JiraIssueCommit struct {
	common.NoPKModel
	ConnectionId uint64 `gorm:"primaryKey"`
	IssueId      uint64 `gorm:"primaryKey"`
	CommitSha    string `gorm:"primaryKey;type:varchar(40)"`
	CommitUrl    string
	RepoUrl      string
}

func (JiraIssueCommit) TableName

func (JiraIssueCommit) TableName() string

type JiraIssueLabel

type JiraIssueLabel struct {
	ConnectionId uint64 `gorm:"primaryKey;autoIncrement:false"`
	IssueId      uint64 `gorm:"primaryKey;autoIncrement:false"`
	LabelName    string `gorm:"primaryKey;type:varchar(255)"`
	common.NoPKModel
}

func (JiraIssueLabel) TableName

func (JiraIssueLabel) TableName() string

type JiraIssueRelationship

type JiraIssueRelationship struct {
	common.NoPKModel
	ConnectionId    uint64 `gorm:"primaryKey"`
	IssueId         uint64 `gorm:"primarykey"`
	IssueKey        string `gorm:"type:varchar(255)"` // e.g. DEV-1
	TypeId          uint64 // e.g. 10001
	TypeName        string `gorm:"type:varchar(255)"` // e.g. Blocks
	Inward          string `gorm:"type:varchar(255)"` // e.g. blocks
	Outward         string `gorm:"type:varchar(255)"` // e.g. is blocked by
	InwardIssueId   uint64 `gorm:"primaryKey"`        // e.g. 116566
	InwardIssueKey  string `gorm:"type:varchar(255)"` // e.g. DEV-2
	OutwardIssueId  uint64 `gorm:"primaryKey"`        // e.g. 116567
	OutwardIssueKey string `gorm:"type:varchar(255)"` // e.g. DEV-3
}

func (JiraIssueRelationship) TableName

func (JiraIssueRelationship) TableName() string

type JiraIssueType

type JiraIssueType struct {
	ConnectionId     uint64 `gorm:"primaryKey;autoIncrement:false"`
	Self             string `json:"self" gorm:"type:varchar(255)"`
	Id               string `json:"id" gorm:"primaryKey;type:varchar(255)"`
	Description      string `json:"description"`
	IconURL          string `json:"iconUrl" gorm:"type:varchar(255)"`
	Name             string `json:"name" gorm:"type:varchar(255)"`
	UntranslatedName string `json:"untranslatedName" gorm:"type:varchar(255)"`
	Subtask          bool   `json:"subtask"`
	AvatarID         uint64 `json:"avatarId"`
	HierarchyLevel   int    `json:"hierarchyLevel"`
	common.NoPKModel
}

func (JiraIssueType) TableName

func (JiraIssueType) TableName() string

type JiraProject

type JiraProject struct {
	common.NoPKModel

	// collected fields
	ConnectionId uint64 `gorm:"primarykey"`
	Id           string `gorm:"primaryKey;type:varchar(255)"`
	ProjectKey   string `gorm:"type:varchar(255)"`
	Name         string `gorm:"type:varchar(255)"`
}

func (JiraProject) TableName

func (JiraProject) TableName() string
type JiraRemotelink struct {
	common.NoPKModel

	// collected fields
	ConnectionId uint64 `gorm:"primaryKey"`
	RemotelinkId uint64 `gorm:"primarykey"`
	IssueId      uint64 `gorm:"index"`
	RawJson      json.RawMessage
	Self         string
	Title        string
	Url          string
	IssueUpdated *time.Time
}

func (JiraRemotelink) TableName

func (JiraRemotelink) TableName() string

type JiraScopeConfig

type JiraScopeConfig struct {
	common.ScopeConfig         `mapstructure:",squash" json:",inline" gorm:"embedded"`
	EpicKeyField               string                 `mapstructure:"epicKeyField,omitempty" json:"epicKeyField" gorm:"type:varchar(255)"`
	StoryPointField            string                 `mapstructure:"storyPointField,omitempty" json:"storyPointField" gorm:"type:varchar(255)"`
	RemotelinkCommitShaPattern string                 `mapstructure:"remotelinkCommitShaPattern,omitempty" json:"remotelinkCommitShaPattern" gorm:"type:varchar(255)"`
	RemotelinkRepoPattern      []CommitUrlPattern     `mapstructure:"remotelinkRepoPattern,omitempty" json:"remotelinkRepoPattern" gorm:"type:json;serializer:json"`
	TypeMappings               map[string]TypeMapping `mapstructure:"typeMappings,omitempty" json:"typeMappings" gorm:"type:json;serializer:json"`
	ApplicationType            string                 `mapstructure:"applicationType,omitempty" json:"applicationType" gorm:"type:varchar(255)"`
}

func (*JiraScopeConfig) SetConnectionId

func (r *JiraScopeConfig) SetConnectionId(c *JiraScopeConfig, connectionId uint64)

func (JiraScopeConfig) TableName

func (r JiraScopeConfig) TableName() string

func (*JiraScopeConfig) Validate

func (r *JiraScopeConfig) Validate() errors.Error

type JiraServerInfo

type JiraServerInfo struct {
	BaseURL        string         `json:"baseUrl"`
	BuildDate      string         `json:"buildDate"`
	BuildNumber    int            `json:"buildNumber"`
	DeploymentType DeploymentType `json:"deploymentType"`
	ScmInfo        string         `json:"ScmInfo"`
	ServerTime     string         `json:"serverTime"`
	ServerTitle    string         `json:"serverTitle"`
	Version        string         `json:"version"`
	VersionNumbers []int          `json:"versionNumbers"`
}

func (JiraServerInfo) TableName

func (JiraServerInfo) TableName() string

type JiraSprint

type JiraSprint struct {
	ConnectionId  uint64 `gorm:"primaryKey"`
	SprintId      uint64 `gorm:"primaryKey"`
	Self          string `gorm:"type:varchar(255)"`
	State         string `gorm:"type:varchar(255)"`
	Name          string `gorm:"type:varchar(255)"`
	StartDate     *time.Time
	EndDate       *time.Time
	CompleteDate  *time.Time
	OriginBoardID uint64
	common.NoPKModel
}

func (JiraSprint) TableName

func (JiraSprint) TableName() string

type JiraSprintIssue

type JiraSprintIssue struct {
	common.NoPKModel
	ConnectionId     uint64 `gorm:"primaryKey"`
	SprintId         uint64 `gorm:"primaryKey"`
	IssueId          uint64 `gorm:"primaryKey"`
	ResolutionDate   *time.Time
	IssueCreatedDate *time.Time
}

func (JiraSprintIssue) TableName

func (JiraSprintIssue) TableName() string

type JiraStatus

type JiraStatus struct {
	common.NoPKModel
	ConnectionId   uint64 `gorm:"primaryKey"`
	ID             string `gorm:"primaryKey"`
	Name           string
	Self           string
	StatusCategory string
}

func (JiraStatus) TableName

func (JiraStatus) TableName() string

type JiraWorklog

type JiraWorklog struct {
	common.NoPKModel
	ConnectionId     uint64 `gorm:"primaryKey"`
	IssueId          uint64 `gorm:"primarykey"`
	WorklogId        string `gorm:"primarykey;type:varchar(255)"`
	AuthorId         string `gorm:"type:varchar(255)"`
	UpdateAuthorId   string `gorm:"type:varchar(255)"`
	TimeSpent        string `gorm:"type:varchar(255)"`
	TimeSpentSeconds int
	Updated          time.Time
	Started          time.Time
	IssueUpdated     *time.Time
}

func (JiraWorklog) TableName

func (JiraWorklog) TableName() string

type Locale

type Locale string
const LocaleEnUS Locale = "en_US"

type StatusMapping

type StatusMapping struct {
	StandardStatus string `json:"standardStatus"`
}

type StatusMappings

type StatusMappings map[string]StatusMapping

type TypeMapping

type TypeMapping struct {
	StandardType   string         `json:"standardType"`
	StatusMappings StatusMappings `json:"statusMappings"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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