Documentation ¶
Overview ¶
Package types contains various types that are used to parse responses from the API.
Index ¶
- Constants
- type Account
- type AccountID
- type Accounts
- type Attachment
- type AttachmentID
- type Attachments
- type Contact
- type ContactID
- type Contacts
- type CustomField
- type CustomFieldID
- type CustomFieldSet
- type CustomFieldType
- type CustomFields
- type CustomStatus
- type CustomStatusID
- type CustomStatuses
- type DependencyID
- type Field
- type Folder
- type FolderEntry
- type FolderID
- type FolderTree
- type Folders
- type Group
- type Groups
- type Metadata
- type Profile
- type Project
- type ProjectStatus
- type Settings
- type Subscription
- type Task
- type TaskDates
- type TaskDatesType
- type TaskEffort
- type TaskEffortMode
- type TaskID
- type TaskImportance
- type TaskStatus
- type Tasks
- type TreeScope
- type WorkDay
- type WorkDays
- type Workflow
- type WorkflowID
- type Workflows
Constants ¶
const ( ContactTypePerson = "Person" ContactTypeGroup = "Group" )
const ( WsRoot TreeScope = "WsRoot" RbRoot TreeScope = "RbRoot" WsFolder TreeScope = "WsFolder" RbFolder TreeScope = "RbFolder" WsTask TreeScope = "WsTask" RbTask TreeScope = "RbTask" Green ProjectStatus = "Green" Yellow ProjectStatus = "Yellow" Red ProjectStatus = "Red" Completed ProjectStatus = "Completed" OnHold ProjectStatus = "OnHold" Cancelled ProjectStatus = "Cancelled" )
const ( ActiveTaskStatus TaskStatus = "Active" CompletedTaskStatus TaskStatus = "Completed" DeferredTaskStatus TaskStatus = "Deferred" CancelledTaskStatus TaskStatus = "Cancelled" HighImportance TaskImportance = "High" NormalImportance TaskImportance = "Normal" LowImportance TaskImportance = "Low" BacklogType TaskDatesType = "Backlog" MilestoneType TaskDatesType = "Milestone" PlannedType TaskDatesType = "Planned" NoneEffortMode TaskEffortMode = "None" FullTimeEffortMode TaskEffortMode = "FullTime" BasicEffortMode TaskEffortMode = "Basic" FlexibleEffortMode TaskEffortMode = "Flexible" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID AccountID `json:"id"` Name string `json:"name"` DateFormat string `json:"dateFormat"` FirstDayOfWeek string `json:"firstDayOfWeek"` WorkDays WorkDays `json:"workDays"` RootFolderID FolderID `json:"rootFolderId"` RecycleBinID FolderID `json:"recycleBinID"` CreatedDate string `json:"createdDate"` Subscription Subscription `json:"subscription"` Metadata []Metadata `json:"metadata"` CustomFields CustomFieldSet `json:"customFields"` JoinedDate string `json:"joinedDate"` }
Account represents a Wrike account.
type Accounts ¶
Accounts represents a list of Wrike account.
func NewAccountsFromJSON ¶
NewAccountsFromJSON parses the given JSON (as byte sequence) and returns a new Accounts.
type Attachment ¶
type Attachment struct { ID AttachmentID `json:"id"` AuthorId string `json:"authorId"` Name string `json:"name"` CreatedDate string `json:"createdDate"` Version int `json:"version"` Type string `json:"type"` ContentType string `json:"contentType"` Size int `json:"size"` TaskId string `json:"taskId"` FolderId string `json:"folderId"` CommentId string `json:"commentId,omitempty"` CurrentAttachmentId string `json:"currentAttachmentId,omitempty"` PreviewUrl string `json:"previewUrl,omitempty"` Url string `json:"url,omitempty"` PlaylistUrl string `json:"playlistUrl,omitempty"` ReviewIds []string `json:"reviewIds,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` }
type AttachmentID ¶
type AttachmentID string
type Attachments ¶
func NewAttachmentsFromJSON ¶
func NewAttachmentsFromJSON(data []byte) (*Attachments, error)
NewTasksFromJSON parses the given JSON (as byte sequence) and returns a new Tasks.
type Contact ¶
type Contact struct { ID ContactID `json:"id"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Type string `json:"type"` Profiles []Profile `json:"profiles"` AvatarURL string `json:"avatarUrl"` Timezone string `json:"timezone"` Locale string `json:"locale"` Deleted bool `json:"deleted"` Me bool `json:"me"` MemberIDs []ContactID `json:"memberIds"` Metadata []Metadata `json:"metadata"` Phone string `json:"phone"` }
Contact represents a Wrike contact.
type Contacts ¶
Contacts represents a list of Wrike contacts.
func NewContactsFromJSON ¶
NewContactsFromJSON parses the given JSON (as byte sequence) and returns a new Contacts.
type CustomField ¶
type CustomField struct { ID CustomFieldID `json:"id"` AccountID AccountID `json:"accountId"` Title string `json:"title"` Type CustomFieldType `json:"type"` Settings Settings `json:"settings"` }
CustomField represents a custom field object, a part of account.
type CustomFieldID ¶
type CustomFieldID string
type CustomFieldSet ¶
type CustomFieldSet []CustomField
CustomFieldSet represents a list of custom field objects.
type CustomFieldType ¶
type CustomFieldType string
const ( TextType CustomFieldType = "Text" DropDownType CustomFieldType = "DropDown" NumericType CustomFieldType = "Numeric" CurrencyType CustomFieldType = "Currency" PercentageType CustomFieldType = "Percentage" DateType CustomFieldType = "Date" DurationType CustomFieldType = "Duration" CheckBoxType CustomFieldType = "CheckBox" ContactsType CustomFieldType = "Contacts" MultipleType CustomFieldType = "Multiple" )
type CustomFields ¶
type CustomFields struct { Kind string `json:"kind"` Data []CustomField `json:"data"` }
CustomFields represents a list of Wrike custom fields.
func NewCustomFieldsFromJSON ¶
func NewCustomFieldsFromJSON(data []byte) (*CustomFields, error)
NewCustomFieldsFromJSON parses the given JSON (as byte sequence) and returns a new CustomFields.
type CustomStatus ¶
type CustomStatusID ¶
type CustomStatusID string
type CustomStatuses ¶
type CustomStatuses []CustomStatus
type DependencyID ¶
type DependencyID string
type Folder ¶
type Folder struct { ID FolderID `json:"id"` AccountID AccountID `json:"accountId"` Title string `json:"title"` CreatedDate string `json:"createdDate"` UpdatedDate string `json:"updatedDate"` BriefDescription *string `json:"briefDescription,omitempty"` Description string `json:"description"` Color *string `json:"color,omitempty"` ParentIDs []FolderID `json:"parentIds"` ChildIDs []FolderID `json:"childIds"` SuperParentIDs []FolderID `json:"superParentIds"` Scope TreeScope `json:"scope"` HasAttachments bool `json:"hasAttachments"` AttachmentCount *int `json:"attachmentCount,omitempty"` Permalink string `json:"permalink"` WorkflowID WorkflowID `json:"workflowId"` Metadata *[]Metadata `json:"metadata,omitempty"` CustomFields *[]CustomField `json:"customFields,omitempty"` CustomColumnIDs *[]CustomFieldID `json:"customColumnIds"` Project *Project `json:"project"` }
type FolderEntry ¶
type FolderTree ¶
type FolderTree struct { Kind string `json:"kind"` Data []FolderEntry `json:"data"` }
func NewFolderTreeFromJSON ¶
func NewFolderTreeFromJSON(data []byte) (*FolderTree, error)
NewFolderTreeFromJSON parses the given JSON (as byte sequence) and returns a new Groups.
type Folders ¶
func NewFoldersFromJSON ¶
NewFoldersFromJSON parses the given JSON (as byte sequence) and returns a new Groups.
type Group ¶
type Group struct { ID ContactID `json:"id"` AccountID AccountID `json:"accountId"` Title string `json:"title"` MemberIDs []ContactID `json:"memberIds"` ChildIDs []ContactID `json:"childIds"` ParentIDs []ContactID `json:"parentIds"` AvatarURL string `json:"avatarUrl"` MyTeam bool `json:"myTeam"` Metadata []Metadata `json:"metadata"` }
Group represents a Wrike group.
type Groups ¶
Groups represents a list of Wrike group.
func NewGroupsFromJSON ¶
NewGroupsFromJSON parses the given JSON (as byte sequence) and returns a new Groups.
type Profile ¶
type Profile struct { AccountID string `json:"accountId"` Email string `json:"email"` Role string `json:"role"` External bool `json:"external"` Admin bool `json:"admin"` Owner bool `json:"owner"` }
Profile represents a profile, part of Contact object.
type Project ¶
type Project struct { AuthorID ContactID `json:"authorId,omitempty"` OwnerIDs []ContactID `json:"ownerIds"` Status ProjectStatus `json:"status"` StartDate string `json:"startDate,omitempty"` EndDate string `json:"endDate,omitempty"` CreatedDate string `json:"createdDate,omitempty"` CompletedDate string `json:"completedDate,omitempty"` }
type ProjectStatus ¶
type ProjectStatus string
type Settings ¶
type Settings struct { InheritanceType string `json:"inheritanceType"` DecimalPlaces int `json:"decimalPlaces"` UseThousandsSeparator bool `json:"useThousandsSeparator"` Aggregation string `json:"aggregation"` }
Settings represents a settings object, a part of account.
type Subscription ¶
type Subscription struct { Type string `json:"type"` Paid bool `json:"paid"` UserLimit int `json:"userLimit"` }
Subscription represents a subscription object, a part of account.
type Task ¶
type Task struct { ID TaskID `json:"id"` AccountID AccountID `json:"accountId"` Title string `json:"title"` Description string `json:"description,omitempty"` BriefDescription string `json:"briefDescription,omitempty"` ParentIDs []FolderID `json:"parentIds,omitempty"` SuperParentIDs []FolderID `json:"superParentIds,omitempty"` ResponsibleIDs []ContactID `json:"responsibleIds,omitempty"` Status TaskStatus `json:"status"` Importance TaskImportance `json:"importance"` CreatedDate string `json:"createdDate"` UpdatedDate string `json:"updatedDate"` CompletedDate string `json:"completedDate"` Dates TaskDates `json:"dates"` Scope TreeScope `json:"scope"` AuthorIDs []ContactID `json:"authorIds,omitempty"` CustomStatusID CustomStatusID `json:"customStatusId"` HasAttachments bool `json:"hasAttachments,omitempty"` AttachmentCount int `json:"attachmentCount,omitempty"` Permalink string `json:"permalink"` Priority string `json:"priority"` FollowedByMe bool `json:"followedByMe,omitempty"` FollwerIDs []ContactID `json:"followerIds,omitempty"` Recurrent bool `json:"recurrent,omitempty"` SuperTaskIDs []TaskID `json:"superTaskIds,omitempty"` SubTaskIDs []TaskID `json:"subTaskIds,omitempty"` DependencyIDs []DependencyID `json:"dependencyIds,omitempty"` Metadata []Metadata `json:"metadata,omitempty"` CustomFields []CustomField `json:"customFields,omitempty"` EffortAllocation TaskEffort `json:"effortAllocation,omitempty"` }
type TaskDates ¶
type TaskDates struct { Type TaskDatesType `json:"type"` Duration int `json:"duration"` Start string `json:"start"` Due string `json:"due"` WorkOnWeekends bool `json:"workOnWeekends,omitempty"` }
type TaskDatesType ¶
type TaskDatesType string
type TaskEffort ¶
type TaskEffort struct { Mode TaskEffortMode `json:"mode"` TotalEffort int `json:"totalEffort,omitempty"` AllocatedEffort int `json:"allocatedEffort,omitempty"` }
type TaskEffortMode ¶
type TaskEffortMode string
type TaskImportance ¶
type TaskImportance string
type TaskStatus ¶
type TaskStatus string
type Tasks ¶
Tasks represents a list of Wrike task.
func NewTasksFromJSON ¶
NewTasksFromJSON parses the given JSON (as byte sequence) and returns a new Tasks.
type Workflow ¶
type Workflow struct { ID WorkflowID `json:"id"` Name string `json:"name"` Standard bool `json:"standard"` Hidden bool `json:"hidden"` CustomStatuses CustomStatuses `json:"customStatuses"` }
Workflow represents a Wrike workflow.
type WorkflowID ¶
type WorkflowID string
type Workflows ¶
Workflows represents a list of Wrike workflow.
func NewWorkflowsFromJSON ¶
NewWorkflowsFromJSON parses the given JSON (as byte sequence) and returns a new Workflows.