openproject

package
v0.0.0-...-74707a2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiLink struct {
	NamedLink
	Method string `json:"method"`
}

type Collection

type Collection[T interface{}] struct {
	Type     string `json:"_type"`
	Total    int    `json:"total"`
	Count    int    `json:"count"`
	Embedded struct {
		Elements []T `json:"elements"`
	} `json:"_embedded"`
	Links struct {
		Self NamedLink `json:"self"`
	} `json:"_links"`
}

type FormattableText

type FormattableText struct {
	Format string `json:"format"`
	Raw    string `json:"raw"`
	HTML   string `json:"html"`
}
type Link struct {
	Href string `json:"href"`
}
type NamedLink struct {
	Link
	Title string `json:"title"`
}

type Payload

type Payload struct {
	Action string `json:"action"`
}
type PayloadLink[T interface{}] struct {
	ApiLink
	Payload   T    `json:"payload"`
	Templated bool `json:"templated"`
}

type Priority

type Priority struct {
	Type      string `json:"_type"`
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Position  int    `json:"position"`
	Color     string `json:"color"`
	IsDefault bool   `json:"isDefault"`
	IsActive  bool   `json:"isActive"`
	Links     struct {
		Self NamedLink `json:"self"`
	} `json:"_links"`
}

type Project

type Project struct {
	Type              string          `json:"_type"`
	ID                int             `json:"id"`
	Identifier        string          `json:"identifier"`
	Name              string          `json:"name"`
	Active            bool            `json:"active"`
	Public            bool            `json:"public"`
	Description       FormattableText `json:"description"`
	CreatedAt         time.Time       `json:"createdAt"`
	UpdatedAt         time.Time       `json:"updatedAt"`
	StatusExplanation FormattableText `json:"statusExplanation"`
	Links             struct {
		Self                         NamedLink     `json:"self"`
		CreateWorkPackage            ApiLink       `json:"createWorkPackage"`
		CreateWorkPackageImmediately ApiLink       `json:"createWorkPackageImmediately"`
		WorkPackages                 ApiLink       `json:"workPackages"`
		Storages                     []interface{} `json:"storages"`
		Categories                   ApiLink       `json:"categories"`
		Versions                     ApiLink       `json:"versions"`
		Memberships                  ApiLink       `json:"memberships"`
		Types                        ApiLink       `json:"types"`
		Update                       ApiLink       `json:"update"`
		UpdateImmediately            ApiLink       `json:"updateImmediately"`
		Delete                       ApiLink       `json:"delete"`
		Schema                       ApiLink       `json:"schema"`
		Ancestors                    []interface{} `json:"ancestors"`
		Parent                       struct {
			Href interface{} `json:"href"`
		} `json:"parent"`
		Status NamedLink `json:"status"`
	} `json:"_links"`
}
type ResourceLink struct {
	NamedLink
	Type string `json:"type"`
}

type Status

type Status struct {
	Type             string      `json:"_type"`
	ID               int         `json:"id"`
	Name             string      `json:"name"`
	IsClosed         bool        `json:"isClosed"`
	Color            string      `json:"color"`
	IsDefault        bool        `json:"isDefault"`
	IsReadonly       bool        `json:"isReadonly"`
	DefaultDoneRatio interface{} `json:"defaultDoneRatio"`
	Position         int         `json:"position"`
	Links            struct {
		Self NamedLink `json:"self"`
	} `json:"_links"`
}

type Type

type Type struct {
	Type        string    `json:"_type"`
	ID          int       `json:"id"`
	Name        string    `json:"name"`
	Color       string    `json:"color"`
	Position    int       `json:"position"`
	IsDefault   bool      `json:"isDefault"`
	IsMilestone bool      `json:"isMilestone"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
	Links       struct {
		Self NamedLink `json:"self"`
	} `json:"_links"`
}

type User

type User struct {
	Type        string      `json:"_type"`
	ID          int         `json:"id"`
	Name        string      `json:"name"`
	CreatedAt   time.Time   `json:"createdAt"`
	UpdatedAt   time.Time   `json:"updatedAt"`
	Login       string      `json:"login"`
	Admin       bool        `json:"admin"`
	FirstName   string      `json:"firstName"`
	LastName    string      `json:"lastName"`
	Email       string      `json:"email"`
	Avatar      string      `json:"avatar"`
	Status      string      `json:"status"`
	IdentityURL interface{} `json:"identityUrl"`
	Language    string      `json:"language"`
	Links       struct {
		Self              NamedLink    `json:"self"`
		Memberships       NamedLink    `json:"memberships"`
		ShowUser          ResourceLink `json:"showUser"`
		UpdateImmediately ApiLink      `json:"updateImmediately"`
		Lock              ApiLink      `json:"lock"`
		Delete            ApiLink      `json:"delete"`
		AuthSource        NamedLink    `json:"auth_source"`
	} `json:"_links"`
}

type WebhookPayload

type WebhookPayload struct {
	Action string `json:"action"`
}

type WorkPackage

type WorkPackage struct {
	Type                 string          `json:"_type"`
	ID                   int             `json:"id"`
	LockVersion          int             `json:"lockVersion"`
	Subject              string          `json:"subject"`
	Description          FormattableText `json:"description"`
	ScheduleManually     bool            `json:"scheduleManually"`
	StartDate            interface{}     `json:"startDate"`
	DueDate              interface{}     `json:"dueDate"`
	DerivedStartDate     interface{}     `json:"derivedStartDate"`
	DerivedDueDate       interface{}     `json:"derivedDueDate"`
	EstimatedTime        string          `json:"estimatedTime"`
	DerivedEstimatedTime interface{}     `json:"derivedEstimatedTime"`
	SpentTime            string          `json:"spentTime"`
	PercentageDone       int             `json:"percentageDone"`
	CreatedAt            time.Time       `json:"createdAt"`
	UpdatedAt            time.Time       `json:"updatedAt"`
	LaborCosts           string          `json:"laborCosts"`
	MaterialCosts        string          `json:"materialCosts"`
	OverallCosts         string          `json:"overallCosts"`
	RemainingTime        string          `json:"remainingTime"`
	Embedded             struct {
		Attachments   Collection[interface{}] `json:"attachments"`
		FileLinks     Collection[interface{}] `json:"fileLinks"`
		Relations     Collection[interface{}] `json:"relations"`
		Type          Type                    `json:"type"`
		Priority      Priority                `json:"priority"`
		Project       Project                 `json:"project"`
		Status        Status                  `json:"status"`
		Author        User                    `json:"author"`
		Responsible   User                    `json:"responsible"`
		Assignee      User                    `json:"assignee"`
		CustomActions []interface{}           `json:"customActions"`
		CostsByType   Collection[interface{}] `json:"costsByType"`
	} `json:"_embedded"`
	Links struct {
		Attachments                 Link         `json:"attachments"`
		AddAttachment               ApiLink      `json:"addAttachment"`
		FileLinks                   Link         `json:"fileLinks"`
		AddFileLink                 ApiLink      `json:"addFileLink"`
		Self                        NamedLink    `json:"self"`
		Update                      ApiLink      `json:"update"`
		Schema                      Link         `json:"schema"`
		UpdateImmediately           ApiLink      `json:"updateImmediately"`
		Delete                      ApiLink      `json:"delete"`
		LogTime                     NamedLink    `json:"logTime"`
		Move                        ResourceLink `json:"move"`
		Copy                        NamedLink    `json:"copy"`
		Pdf                         ResourceLink `json:"pdf"`
		Atom                        ResourceLink `json:"atom"`
		AvailableRelationCandidates NamedLink    `json:"availableRelationCandidates"`
		CustomFields                ResourceLink `json:"customFields"`
		ConfigureForm               ResourceLink `json:"configureForm"`
		Activities                  Link         `json:"activities"`
		AvailableWatchers           Link         `json:"availableWatchers"`
		Relations                   Link         `json:"relations"`
		Revisions                   Link         `json:"revisions"`
		Watchers                    Link         `json:"watchers"`
		AddWatcher                  PayloadLink[struct {
			User ApiLink `json:"user"`
		}] `json:"addWatcher"`
		RemoveWatcher      PayloadLink[interface{}] `json:"removeWatcher"`
		AddRelation        ApiLink                  `json:"addRelation"`
		AddChild           ApiLink                  `json:"addChild"`
		ChangeParent       ApiLink                  `json:"changeParent"`
		AddComment         ApiLink                  `json:"addComment"`
		PreviewMarkup      ApiLink                  `json:"previewMarkup"`
		TimeEntries        NamedLink                `json:"timeEntries"`
		Ancestors          []NamedLink              `json:"ancestors"`
		Category           Link                     `json:"category"`
		Type               NamedLink                `json:"type"`
		Priority           NamedLink                `json:"priority"`
		Project            NamedLink                `json:"project"`
		Status             NamedLink                `json:"status"`
		Author             NamedLink                `json:"author"`
		Responsible        NamedLink                `json:"responsible"`
		Assignee           NamedLink                `json:"assignee"`
		Version            Link                     `json:"version"`
		Parent             NamedLink                `json:"parent"`
		CustomActions      []interface{}            `json:"customActions"`
		LogCosts           ResourceLink             `json:"logCosts"`
		ShowCosts          ResourceLink             `json:"showCosts"`
		CostsByType        Link                     `json:"costsByType"`
		Github             NamedLink                `json:"github"`
		GithubPullRequests NamedLink                `json:"github_pull_requests"`
		ConvertBCF         PayloadLink[struct {
			ReferenceLinks []string `json:"reference_links"`
		}] `json:"convertBCF"`
	} `json:"_links"`
}

type WorkPackageWebhookPayload

type WorkPackageWebhookPayload struct {
	WebhookPayload
	WorkPackage WorkPackage `json:"work_package"`
}

Jump to

Keyboard shortcuts

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