models

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyYAML

func PrettyYAML(t *Task) string

Types

type APIResponse

type APIResponse struct {

	// code
	Code int64 `json:"code,omitempty"`

	// message
	Message string `json:"message,omitempty"`

	// type
	Type string `json:"type,omitempty"`
}

APIResponse Api response

swagger:model ApiResponse

func (*APIResponse) ContextValidate

func (m *APIResponse) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this Api response based on context it is used

func (*APIResponse) MarshalBinary

func (m *APIResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIResponse) UnmarshalBinary

func (m *APIResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIResponse) Validate

func (m *APIResponse) Validate(formats strfmt.Registry) error

Validate validates this Api response

type Account

type Account struct {

	// The user's display name on the website.
	Alias string `json:"alias,omitempty"`

	// The user's prefered format for representing dates. (0=M D, Y, 1=M/D/Y, 2=D/M/Y, 3=Y-M-D)
	Dateformat int32 `json:"dateformat,omitempty"`

	// The user's login email address.
	Email string `json:"email,omitempty"`

	// If the task is due this many months into the future, the user wants them to be hidde
	Hidemonths int32 `json:"hidemonths,omitempty"`

	// The due date lead-time by which tasks should will appear on the hotlist.
	Hotlistduedate int32 `json:"hotlistduedate,omitempty"`

	// The priority value above which tasks should appear on the hotlist.
	Hotlistpriority int32 `json:"hotlistpriority,omitempty"`

	// A timestamp that indicates the last time that any note was deleted from this account. You can quickly check this field to determine if you need to identify and remove notes from your application.
	LastdeleteNote int32 `json:"lastdelete_note,omitempty"`

	// A timestamp that indicates the last time that any task was deleted from this account. You can quickly check this field to determine if you need to identify and remove tasks from your application.
	LastdeleteTask int32 `json:"lastdelete_task,omitempty"`

	// A timestamp that indicates the last time that a context was added, edited or deleted. You can quickly check this field to determine if you need to refresh your cached context list.
	LasteditContext int32 `json:"lastedit_context,omitempty"`

	// A timestamp that indicates the last time that any task was added or edited on this account. You can quickly check this field to determine if you need to download updates.
	LasteditFolder int32 `json:"lastedit_folder,omitempty"`

	// A timestamp that indicates the last time that a goal was edited, edited or deleted. You can quickly check this field to determine if you need to refresh your cached goal list.
	LasteditGoal int32 `json:"lastedit_goal,omitempty"`

	// A timestamp that indicates the last time that any list was edited on this account. You can quickly check this field to determine if you need to sync lists.
	LasteditList int32 `json:"lastedit_list,omitempty"`

	// A timestamp that indicates the last time that a context was added, edited or deleted. You can quickly check this field to determine if you need to refresh your cached context list.
	LasteditLocation int32 `json:"lastedit_location,omitempty"`

	// A timestamp that indicates the last time that any note was added or edited on this account. You can quickly check this field to determine if you need to download updates.
	LasteditNote int32 `json:"lastedit_note,omitempty"`

	// A timestamp that indicates the last time that any outline was edited on this account. You can quickly check this field to determine if you need to sync outlines.
	LasteditOutline int32 `json:"lastedit_outline,omitempty"`

	// A timestamp that indicates the last time that any task was added or edited on this account. You can quickly check this field to determine if you need to download updates.
	LasteditTask int32 `json:"lastedit_task,omitempty"`

	// Whether or not the user is a Silver or Gold Subscriber. You need to know this if you want to use subtasks. A value of 0 means a free account. 1 means Silver and 2 means Gold or higher.
	Pro int32 `json:"pro,omitempty"`

	// The user's preference for viewing counters showing the number of tasks in each section.
	Showtabnums int32 `json:"showtabnums,omitempty"`

	// The number of half hours that the user's timezone is offset from the server's timezone. A value of -4 means that the user's timezone is 2 hours earlier than the server's timezone. The server is in the Eastern Standard Timezone.
	Timezone int32 `json:"timezone,omitempty"`

	// A unique string that identifies the user. You will need to store this and compare when a user re-authenticates their account to make sure you are syncing with the same account.
	Userid string `json:"userid,omitempty"`
}

Account account

swagger:model Account

func (*Account) ContextValidate

func (m *Account) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this account based on context it is used

func (*Account) MarshalBinary

func (m *Account) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Account) UnmarshalBinary

func (m *Account) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Account) Validate

func (m *Account) Validate(formats strfmt.Registry) error

Validate validates this account

type Context

type Context struct {

	// id
	ID int64 `json:"id,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// private
	Private int64 `json:"private,omitempty"`
}

Context context

swagger:model Context

func (*Context) ContextValidate

func (m *Context) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this context based on context it is used

func (*Context) MarshalBinary

func (m *Context) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Context) UnmarshalBinary

func (m *Context) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Context) Validate

func (m *Context) Validate(formats strfmt.Registry) error

Validate validates this context

type Environment

type Environment struct {
	Name            string `json:"name,omitempty"`
	Space           string `json:"space,omitempty"`
	Project         string `json:"project,omitempty"`
	DefaultAssignee string `json:"default-assignee,omitempty"`
	DefaultAssigner string `json:"default-assigner,omitempty"`
}

Environment is a model for environment.

type EnvironmentWithKey

type EnvironmentWithKey struct {
	Environment
	Key string
}

type Error

type Error struct {

	// error code
	// Required: true
	ErrorCode *int64 `json:"errorCode"`

	// error desc
	// Required: true
	ErrorDesc *string `json:"errorDesc"`
}

Error error

swagger:model Error

func (*Error) ContextValidate

func (m *Error) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type FetchTasksMsg

type FetchTasksMsg struct {
	IsHardRefresh bool
}

type Folder

type Folder struct {

	// archived
	Archived int64 `json:"archived,omitempty"`

	// id
	ID int64 `json:"id,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// ord
	Ord int64 `json:"ord,omitempty"`

	// private
	Private int64 `json:"private,omitempty"`
}

Folder folder

swagger:model Folder

func (*Folder) ContextValidate

func (m *Folder) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this folder based on context it is used

func (*Folder) MarshalBinary

func (m *Folder) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Folder) UnmarshalBinary

func (m *Folder) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Folder) Validate

func (m *Folder) Validate(formats strfmt.Registry) error

Validate validates this folder

type Goal

type Goal struct {

	// archived
	Archived int64 `json:"archived,omitempty"`

	// contributes
	Contributes int64 `json:"contributes,omitempty"`

	// id
	ID int64 `json:"id,omitempty"`

	// level
	Level int64 `json:"level,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// note
	Note string `json:"note,omitempty"`

	// private
	Private int64 `json:"private,omitempty"`
}

Goal goal

swagger:model Goal

func (*Goal) ContextValidate

func (m *Goal) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this goal based on context it is used

func (*Goal) MarshalBinary

func (m *Goal) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Goal) UnmarshalBinary

func (m *Goal) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Goal) Validate

func (m *Goal) Validate(formats strfmt.Registry) error

Validate validates this goal

type Item

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

func NewItem

func NewItem(id int64, title string) Item

func (Item) Description

func (i Item) Description() string

func (Item) FilterValue

func (i Item) FilterValue() string

func (Item) ID

func (i Item) ID() int64

func (Item) Title

func (i Item) Title() string

type PaginatedAPIResponse

type PaginatedAPIResponse []interface{}

PaginatedAPIResponse paginated Api response

swagger:model PaginatedApiResponse

func (PaginatedAPIResponse) ContextValidate

func (m PaginatedAPIResponse) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this paginated Api response based on context it is used

func (PaginatedAPIResponse) Validate

func (m PaginatedAPIResponse) Validate(formats strfmt.Registry) error

Validate validates this paginated Api response

type PaginatedInfo

type PaginatedInfo struct {

	// num
	Num int64 `json:"num,omitempty"`

	// total
	Total int64 `json:"total,omitempty"`
}

PaginatedInfo paginated info

swagger:model PaginatedInfo

func (*PaginatedInfo) ContextValidate

func (m *PaginatedInfo) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this paginated info based on context it is used

func (*PaginatedInfo) MarshalBinary

func (m *PaginatedInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PaginatedInfo) UnmarshalBinary

func (m *PaginatedInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PaginatedInfo) Validate

func (m *PaginatedInfo) Validate(formats strfmt.Registry) error

Validate validates this paginated info

type RefreshPropertiesMsg

type RefreshPropertiesMsg struct {
}

RefreshPropertiesMsg refresh context, goals, folders etc.

type RefreshTasksMsg

type RefreshTasksMsg struct {
}

RefreshTasksMsg refresh tasks.

type RefreshUIMsg

type RefreshUIMsg struct {
}

RefreshUIMsg refreshes UI actually, did nothing in Update().

type ReturnMsg

type ReturnMsg struct {
}

ReturnMsg is a message for return parent component, just like tea.Quit.

type RichTask

type RichTask struct {
	Task
	TheContext *Context `json:"the_context"`
	TheFolder  *Folder  `json:"the_folder"`
	TheGoal    *Goal    `json:"the_goal"`
}

func (RichTask) AddedString

func (t RichTask) AddedString() string

func (RichTask) CompletedString

func (t RichTask) CompletedString() string

func (RichTask) DueString

func (t RichTask) DueString() string

func (RichTask) LengthString

func (t RichTask) LengthString() string
func (t RichTask) Link() string

func (RichTask) ModifiedString

func (t RichTask) ModifiedString() string

func (RichTask) PriorityString

func (t RichTask) PriorityString() string

func (RichTask) RepeatString

func (t RichTask) RepeatString() string

func (RichTask) StarString

func (t RichTask) StarString() string

func (RichTask) StatusString

func (t RichTask) StatusString() string

func (RichTask) TagString

func (t RichTask) TagString() string

func (RichTask) ThatContext

func (t RichTask) ThatContext() Context

ThatContext returns the context of the task if the context is not set, it returns a default context.

func (RichTask) ThatFolder

func (t RichTask) ThatFolder() Folder

ThatFolder returns the folder of the task if the folder is not set, it returns a default folder.

func (RichTask) ThatGoal

func (t RichTask) ThatGoal() Goal

ThatGoal returns the goal of the task if the goal is not set, it returns a default goal.

func (RichTask) TheDueDate

func (t RichTask) TheDueDate() time.Time

func (RichTask) TheDueTime

func (t RichTask) TheDueTime() time.Time

func (RichTask) TimerString

func (t RichTask) TimerString() string

TimerString return the timer string of the task if timer is on, * will be added in the front.

type SavedSearch

type SavedSearch struct {

	// Indicates the state of the "Match" option for a search. There are two possible values. "All" means that all the root rules and groups must match (The outer boolean will be AND and the inner boolean will be OR). "Any" means that only one of the root rules or groups must match (The outer boolean will be OR and the inner boolean will be AND).
	Bool string `json:"bool,omitempty"`

	// The id number of the saved search. This is unique per user, but two different users may have different searches with the same id.
	ID int64 `json:"id,omitempty"`

	// The display name for the saved search, up to 32 characters.
	Name string `json:"name,omitempty"`

	// In the JSON return format, this contains the nested rules for the saved search. Each group will have a numerical index (which may or may not be consecutive). Order does not matter.
	Search map[string]SearchGroup `json:"search,omitempty"`
}

SavedSearch saved search

swagger:model SavedSearch

func (*SavedSearch) ContextValidate

func (m *SavedSearch) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this saved search based on the context it is used

func (*SavedSearch) MarshalBinary

func (m *SavedSearch) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SavedSearch) UnmarshalBinary

func (m *SavedSearch) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SavedSearch) Validate

func (m *SavedSearch) Validate(formats strfmt.Registry) error

Validate validates this saved search

type SearchGroup

type SearchGroup map[string]SearchGroupItem

SearchGroup search group

swagger:model SearchGroup

func (SearchGroup) ContextValidate

func (m SearchGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search group based on the context it is used

func (SearchGroup) Validate

func (m SearchGroup) Validate(formats strfmt.Registry) error

Validate validates this search group

type SearchGroupItem

type SearchGroupItem struct {

	// The name of the field being inspected.
	Field string `json:"field,omitempty"`

	// The type of search being performed.
	// - contains : Matches a string if it contains this substring
	// - yes : Boolean true
	// - is : Exact value match
	// - begins with : Matches a string if it starts with this substring
	// - ends with : Matches a string if it ends with this substring
	// - does not contain : Matches a string if it does not contain this substring
	// - no : Boolean false
	// - is not : Exact value mismatch
	// - is after : Matches a date if it comes after this value
	// - is more than : Matches a number if it comes after this value
	// - is before : Matches a date if it comes before this value
	// - is less than : Matches a number if it comes before this value
	// - was in the last : Matches a date if it was in the last X days
	// - was not in the last : Matches a date if it was not in the last X days
	// - is in the next : Matches a date if it is in the next X days
	// - is not in the next : Matches a date if it is not in the next X days
	// - is in : Matches a date if it is in exactly X days
	// - is not in : Matches a date if it is not in exactly X days
	// - was : Matches a date if it was exactly X days ago
	// - was not : Matches a date if it was not exactly X days ago
	// - exists : Matches if the field has a non-zero value
	// - does not exist : Matches if the field is empty or zero
	//
	Type string `json:"type,omitempty"`

	// The value to search with.
	Value string `json:"value,omitempty"`
}

SearchGroupItem search group item

swagger:model SearchGroupItem

func (*SearchGroupItem) ContextValidate

func (m *SearchGroupItem) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this search group item based on context it is used

func (*SearchGroupItem) MarshalBinary

func (m *SearchGroupItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchGroupItem) UnmarshalBinary

func (m *SearchGroupItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchGroupItem) Validate

func (m *SearchGroupItem) Validate(formats strfmt.Registry) error

Validate validates this search group item

type SidebarItemChangeMsg

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

func NewSidebarItemChangeMsg

func NewSidebarItemChangeMsg(tab string, item Item) *SidebarItemChangeMsg

func (SidebarItemChangeMsg) Item

func (m SidebarItemChangeMsg) Item() Item

func (SidebarItemChangeMsg) Tab

func (m SidebarItemChangeMsg) Tab() string

type StatusMsg

type StatusMsg struct {
	Mode         string
	ClearMode    bool
	Message      string
	ClearMessage bool
	Info1        string
	ClearInfo1   bool
	Info2        string
	ClearInfo2   bool
}

StatusMsg is a message for status.

type Task

type Task struct {

	// A GMT unix timestamp for when the task was last modified.
	Added int64 `json:"added,omitempty"`

	// The user id of the collaborator who assigned the task (Subscription required for user).
	Addedby int64 `json:"addedby,omitempty"`

	// An array of attachment items. Each item will contain the following three fields. Attachments are currently read only. You can use the id number to reference the outline, list or note that you can get via this API. File's are not currently readable, but we plan to add this functionality soon.
	// id: The unique id number for the attachment
	// kind: The kind of attachment (file,note,outline,list)
	// name: The display name of the attachment
	//
	Attatchment string `json:"attatchment,omitempty"`

	// This is used with Subscriptions that have access to subtasks. This will indicate the number of child tasks that this task has. This will be 0 for subtasks or for regular tasks without subtasks.
	Children int64 `json:"children,omitempty"`

	// A GMT unix timestamp for when the task was completed. If the task is not completed, the value will be 0. Toodledo does not track the time that a task was completed, so tasks will always appear to be completed at noon.
	Completed int64 `json:"completed,omitempty"`

	// The id number of the context. Omit this field or set it to 0 to leave the task unassigned to a context.
	Context int64 `json:"context,omitempty"`

	// A GMT unix timestamp for when the task is due. The time component of this timestamp doesn't matter. When fetching from the server, it will always be noon.
	Duedate int64 `json:"duedate,omitempty"`

	// An integer representing the due date modifier.
	// 0 = Due By
	// 1 = Due On (=)
	// 2 = Due After (>)
	// 3 = Optionally (?)
	//
	Duedatemod int64 `json:"duedatemod"`

	// A GMT unix timestamp for when the task is due. If the task does not have a time set, then this will be 0. If the task has a duetime without a duedate set, then the date component of this timestamp will be Jan 1, 1970. Times are stored as floating times. In other words, 10am is always 10am, regardless of your timezone. You can convert this timestamp to a GMT string and display the time component without worrying about timezones.
	Duetime int64 `json:"duetime,omitempty"`

	// The id number of the folder. Omit this field or set it to 0 to leave the task unassigned to a folder.
	Folder int64 `json:"folder,omitempty"`

	// The id number of the goal. Omit this field or set it to 0 to leave the task unassigned to a goal.
	Goal int64 `json:"goal,omitempty"`

	// The server id number for this task. It is guaranteed to be unique per account, but two different accounts may have two different tasks with the same id number.
	ID int64 `json:"id,omitempty"`

	// An integer representing the number of minutes that the task will take to complete.
	Length int64 `json:"length,omitempty"`

	// The id number of the location. Omit this field or set it to 0 to leave the task unassigned to a location.
	Location int64 `json:"location,omitempty"`

	// A text string up to 1024 bytes long for storing metadata about the task. This is useful for syncing data that cannot otherwise be synced to Toodledo. This data is unique per task ID. This data is private to your App ID. Neither the user, nor other App IDs can see the data that you put in here. Because of an implementation detail, using the meta field introduces extra latency to each API call, so you should only use this field when necessary.
	Meta string `json:"meta,omitempty"`

	// A GMT unix timestamp for when the task was last modified.
	Modified int64 `json:"modified,omitempty"`

	// A text string up to 32,000 bytes long. New lines should be sent as \n.
	Note string `json:"note,omitempty"`

	// This is used with Subscriptions that have access to subtasks. This is an integer that indicates the manual order of subtasks within the parent task. Currently this is read-only.
	Order int64 `json:"order,omitempty"`

	// This is used with Subscriptions that have access to subtasks. To create a subtask, set this to the id number of the parent task. The default is 0, which creates a normal task.
	Parent int64 `json:"parent,omitempty"`

	// If the task was repeated from another task, this will contain the id number of the previous version of this task.
	Previous int64 `json:"previous,omitempty"`

	// An integer that represents the priority.
	// -1 = Negative
	// 0 = Low
	// 1 = Medium
	// 2 = High
	// 3 = Top
	//
	Priority int64 `json:"priority"`

	// A read-only field that contains the id number of the task that this task is a reference to. This is useful for tasks that are created from another task.
	Ref string `json:"ref,omitempty"`

	// An integer that represents the number of minutes prior to the duedate/time that a reminder will be sent. Set it to 0 for no reminder. Values will be constrained to this list of valid numbers (0, 1, 15, 30, 45, 60, 90, 120, 180, 240, 1440, 2880, 4320, 5760, 7200, 8640, 10080, 20160, 43200). Additionally, if the user does not have a Subscription, the only valid numbers are 0,60. If you submit an invalid number, it will be rounded up or down to a valid non zero value.
	Remind int64 `json:"remind,omitempty"`

	// A string indicating how the task repeats. When a task is rescheduled, it is moved forward to the new date. For record keeping purposes, a completed copy of this task will be added to the user's list. It will have a new ID number and will be already completed. To make a task no longer repeat, set this field to an empty string.
	//
	// This string is in the standard iCal RRULE format. For example: "FREQ=DAILY" or "FREQ=WEEKLY;BYDAY=TU". Not every valid iCal RRULE is understood by Toodledo, but we will be improving our ability to understand more options in the future. Please read our repeat format FAQ for details about how we can currently repeat tasks. Note that users enter their repeat settings using a GUI or by typing a human readable string. These get converted to iCal rules behind the scenes.
	//
	// There are three enhancements to the iCal RRULE format that we have made to support some advanced Toodledo features.
	// Subtasks can repeat based on their parent's repeat value. There is not a comparable iCal RRULE for this, so we have a custom RRULE of "PARENT" to indicate this setting.
	// Tasks can be set to repeat from their due-date or their completion date. There is not a way to indicate this in a standard iCAL RRULE. To indicate this, we have a custom string of ";FROMCOMP" that we append to the RRULE if the task is set to repeat from the completion date. The absence of this string means that the task repeats from the due-date.
	// Normally, when a task is rescheduled it moves forwards by 1 occurrence. If the user has procrastinated, the new due-date could still be in the past. Toodledo will have the option to indicate that certain repeating tasks should be rescheduled to the next future occurance of the task. If this is the case, the custom ";FASTFORWARD" string will be appended to the RRULE.
	//
	Repeat string `json:"repeat,omitempty"`

	// A boolean (0 or 1) that indicates if the task is shared as a joint task (Subscription required for user). Read only.
	Shared int64 `json:"shared,omitempty"`

	// The user id of the person who owns the task that is being shared with the current user. If the current user is not the owner, then they cannot make changes to the collaboration settings for this task, although they can make other changes. Read only.
	Sharedowner int64 `json:"sharedowner,omitempty"`

	// An array of user ids for people that this task is shared with, other than myself and the owner. Read only.
	Sharedwith int64 `json:"sharedwith,omitempty"`

	// A boolean (0 or 1) that indicates if the task has a star or not.
	Star int64 `json:"star"`

	// A GMT unix timestamp for when the task starts. The time component of this timestamp will always be noon.
	Startdate int64 `json:"startdate,omitempty"`

	// A GMT unix timestamp for when the task starts. If the task does not have a time set, then this will be 0. If the task has a starttime without a startdate set, then the date component of this timestamp will be Jan 1, 1970. Times are stored as floating times. In other words, 10am is always 10am, regardless of your timezone. You can convert this timestamp to a GMT string and display the time component without worrying about timezones.
	Starttime int64 `json:"starttime,omitempty"`

	// An integer that represents the status of the task.
	// 0 = None
	// 1 = Next Action
	// 2 = Active
	// 3 = Planning
	// 4 = Delegated
	// 5 = Waiting
	// 6 = Hold
	// 7 = Postponed
	// 8 = Someday
	// 9 = Canceled
	// 10 = Reference
	//
	Status int64 `json:"status"`

	// A comma separated string listing the tags assigned to this task. Up to 250 characters.
	Tag string `json:"tag,omitempty"`

	// The value in the timer field indicates the number of seconds that have elapsed for the timer not including the current session.
	Timer int64 `json:"timer,omitempty"`

	// If the timer is currently on, this will contain a unix timestamp indicating the last time that the timer was started. Therefore, if the timer is currently on, you will need to calculate the elapsed time when you present it to the user. This calculation is: Total Time=timer+(now-timeron). Where "now" is a unix timestamp for the current time.
	Timeron int64 `json:"timeron,omitempty"`

	// A string for the name of the task. Up to 255 characters.
	Title string `json:"title,omitempty"`

	// A read-only field that indicates how the task was added. These are the possible values:
	// 0: Main website
	// 1: Email Import
	// 2: Firefox Addon
	// 3: This API
	// 4: Widgets (Google Gadget, etc)
	// 5: Not used
	// 6: Mobile Phone
	// 7: iPhone App
	// 8: Import Tools
	// 9: Twitter
	//
	Via string `json:"via"`
}

Task task

swagger:model Task

func (*Task) ContextValidate

func (m *Task) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this task based on context it is used

func (*Task) MarshalBinary

func (m *Task) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Task) String

func (t *Task) String() string

func (*Task) UnmarshalBinary

func (m *Task) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Task) Validate

func (m *Task) Validate(formats strfmt.Registry) error

Validate validates this task

type TaskDeleteItem

type TaskDeleteItem struct {

	// The error code for the delete operation. This will be 0 if the delete was successful.
	ErrorCode int64 `json:"errorCode,omitempty"`

	// The error description for the delete operation. This will be empty if the delete was successful.
	ErrorDesc string `json:"errorDesc,omitempty"`

	// id
	ID int64 `json:"id,omitempty"`

	// A read-only field that contains the id number of the task that this task is a reference to. This is useful for tasks that are deleted failed.
	Ref string `json:"ref,omitempty"`
}

TaskDeleteItem task delete item

swagger:model TaskDeleteItem

func (*TaskDeleteItem) ContextValidate

func (m *TaskDeleteItem) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this task delete item based on context it is used

func (*TaskDeleteItem) MarshalBinary

func (m *TaskDeleteItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TaskDeleteItem) UnmarshalBinary

func (m *TaskDeleteItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TaskDeleteItem) Validate

func (m *TaskDeleteItem) Validate(formats strfmt.Registry) error

Validate validates this task delete item

type TaskDeleted

type TaskDeleted struct {

	// The server id number for this task. It is guaranteed to be unique per account, but two different accounts may have two different tasks with the same id number.
	ID int64 `json:"id,omitempty"`

	// A GMT unix timestamp.
	Stamp int64 `json:"stamp,omitempty"`
}

TaskDeleted task deleted

swagger:model TaskDeleted

func (*TaskDeleted) ContextValidate

func (m *TaskDeleted) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this task deleted based on context it is used

func (*TaskDeleted) MarshalBinary

func (m *TaskDeleted) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TaskDeleted) UnmarshalBinary

func (m *TaskDeleted) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TaskDeleted) Validate

func (m *TaskDeleted) Validate(formats strfmt.Registry) error

Validate validates this task deleted

type TaskEdit

type TaskEdit struct {

	// A GMT unix timestamp for when the task was last modified.
	Added *int64 `json:"added,omitempty"`

	// The user id of the collaborator who assigned the task (Subscription required for user).
	Addedby *int64 `json:"addedby,omitempty"`

	// An array of attachment items. Each item will contain the following three fields. Attachments are currently read only. You can use the id number to reference the outline, list or note that you can get via this API. File's are not currently readable, but we plan to add this functionality soon.
	// id: The unique id number for the attachment
	// kind: The kind of attachment (file,note,outline,list)
	// name: The display name of the attachment
	//
	Attatchment string `json:"attatchment,omitempty"`

	// This is used with Subscriptions that have access to subtasks. This will indicate the number of child tasks that this task has. This will be 0 for subtasks or for regular tasks without subtasks.
	Children *int64 `json:"children,omitempty"`

	// A GMT unix timestamp for when the task was completed. If the task is not completed, the value will be 0. Toodledo does not track the time that a task was completed, so tasks will always appear to be completed at noon.
	Completed *int64 `json:"completed,omitempty"`

	// The id number of the context. Omit this field or set it to 0 to leave the task unassigned to a context.
	Context *int64 `json:"context,omitempty"`

	// A GMT unix timestamp for when the task is due. The time component of this timestamp doesn't matter. When fetching from the server, it will always be noon.
	Duedate *int64 `json:"duedate,omitempty"`

	// An integer representing the due date modifier.
	// 0 = Due By
	// 1 = Due On (=)
	// 2 = Due After (>)
	// 3 = Optionally (?)
	//
	Duedatemod *int64 `json:"duedatemod,omitempty"`

	// A GMT unix timestamp for when the task is due. If the task does not have a time set, then this will be 0. If the task has a duetime without a duedate set, then the date component of this timestamp will be Jan 1, 1970. Times are stored as floating times. In other words, 10am is always 10am, regardless of your timezone. You can convert this timestamp to a GMT string and display the time component without worrying about timezones.
	Duetime *int64 `json:"duetime,omitempty"`

	// The id number of the folder. Omit this field or set it to 0 to leave the task unassigned to a folder.
	Folder int64 `json:"folder,omitempty"`

	// The id number of the goal. Omit this field or set it to 0 to leave the task unassigned to a goal.
	Goal *int64 `json:"goal,omitempty"`

	// The server id number for this task. It is guaranteed to be unique per account, but two different accounts may have two different tasks with the same id number.
	ID int64 `json:"id,omitempty"`

	// An integer representing the number of minutes that the task will take to complete.
	Length *int64 `json:"length,omitempty"`

	// The id number of the location. Omit this field or set it to 0 to leave the task unassigned to a location.
	Location *int64 `json:"location,omitempty"`

	// A text string up to 1024 bytes long for storing metadata about the task. This is useful for syncing data that cannot otherwise be synced to Toodledo. This data is unique per task ID. This data is private to your App ID. Neither the user, nor other App IDs can see the data that you put in here. Because of an implementation detail, using the meta field introduces extra latency to each API call, so you should only use this field when necessary.
	Meta *string `json:"meta,omitempty"`

	// A GMT unix timestamp for when the task was last modified.
	Modified *int64 `json:"modified,omitempty"`

	// A text string up to 32,000 bytes long. New lines should be sent as \n.
	Note *string `json:"note,omitempty"`

	// This is used with Subscriptions that have access to subtasks. This is an integer that indicates the manual order of subtasks within the parent task. Currently this is read-only.
	Order *int64 `json:"order,omitempty"`

	// This is used with Subscriptions that have access to subtasks. To create a subtask, set this to the id number of the parent task. The default is 0, which creates a normal task.
	Parent *int64 `json:"parent,omitempty"`

	// If the task was repeated from another task, this will contain the id number of the previous version of this task.
	Previous *int64 `json:"previous,omitempty"`

	// An integer that represents the priority.
	// -1 = Negative
	// 0 = Low
	// 1 = Medium
	// 2 = High
	// 3 = Top
	//
	Priority *int64 `json:"priority,omitempty"`

	// A read-only field that contains the id number of the task that this task is a reference to. This is useful for tasks that are created from another task.
	Ref *string `json:"ref,omitempty"`

	// An integer that represents the number of minutes prior to the duedate/time that a reminder will be sent. Set it to 0 for no reminder. Values will be constrained to this list of valid numbers (0, 1, 15, 30, 45, 60, 90, 120, 180, 240, 1440, 2880, 4320, 5760, 7200, 8640, 10080, 20160, 43200). Additionally, if the user does not have a Subscription, the only valid numbers are 0,60. If you submit an invalid number, it will be rounded up or down to a valid non zero value.
	Remind *int64 `json:"remind,omitempty"`

	// A string indicating how the task repeats. When a task is rescheduled, it is moved forward to the new date. For record keeping purposes, a completed copy of this task will be added to the user's list. It will have a new ID number and will be already completed. To make a task no longer repeat, set this field to an empty string.
	//
	// This string is in the standard iCal RRULE format. For example: "FREQ=DAILY" or "FREQ=WEEKLY;BYDAY=TU". Not every valid iCal RRULE is understood by Toodledo, but we will be improving our ability to understand more options in the future. Please read our repeat format FAQ for details about how we can currently repeat tasks. Note that users enter their repeat settings using a GUI or by typing a human readable string. These get converted to iCal rules behind the scenes.
	//
	// There are three enhancements to the iCal RRULE format that we have made to support some advanced Toodledo features.
	// Subtasks can repeat based on their parent's repeat value. There is not a comparable iCal RRULE for this, so we have a custom RRULE of "PARENT" to indicate this setting.
	// Tasks can be set to repeat from their due-date or their completion date. There is not a way to indicate this in a standard iCAL RRULE. To indicate this, we have a custom string of ";FROMCOMP" that we append to the RRULE if the task is set to repeat from the completion date. The absence of this string means that the task repeats from the due-date.
	// Normally, when a task is rescheduled it moves forwards by 1 occurrence. If the user has procrastinated, the new due-date could still be in the past. Toodledo will have the option to indicate that certain repeating tasks should be rescheduled to the next future occurance of the task. If this is the case, the custom ";FASTFORWARD" string will be appended to the RRULE.
	//
	Repeat *string `json:"repeat,omitempty"`

	// Set the "reschedule" variable to "1" if you want Toodledo to automatically reschedule the repeating task for you. This will only apply if you also set the completion date, and if the task has a due-date and repeating value. If you do not set this, then you are responsible for rescheduling repeating tasks yourself, as well as properly handling any subtasks that the task may have. It is recommended that you allow Toodledo to reschedule repeating tasks for you.
	Reschedule int64 `json:"reschedule,omitempty"`

	// The user id of the person who owns the task that is being shared with the current user. If the current user is not the owner, then they cannot make changes to the collaboration settings for this task, although they can make other changes. Read only.
	Sharedowner *int64 `json:"sharedowner,omitempty"`

	// An array of user ids for people that this task is shared with, other than myself and the owner. Read only.
	Sharedwith *int64 `json:"sharedwith,omitempty"`

	// A boolean (0 or 1) that indicates if the task has a star or not.
	Star int64 `json:"star,omitempty"`

	// A GMT unix timestamp for when the task starts. The time component of this timestamp will always be noon.
	Startdate *int64 `json:"startdate,omitempty"`

	// A GMT unix timestamp for when the task starts. If the task does not have a time set, then this will be 0. If the task has a starttime without a startdate set, then the date component of this timestamp will be Jan 1, 1970. Times are stored as floating times. In other words, 10am is always 10am, regardless of your timezone. You can convert this timestamp to a GMT string and display the time component without worrying about timezones.
	Starttime *int64 `json:"starttime,omitempty"`

	// An integer that represents the status of the task.
	// 0 = None
	// 1 = Next Action
	// 2 = Active
	// 3 = Planning
	// 4 = Delegated
	// 5 = Waiting
	// 6 = Hold
	// 7 = Postponed
	// 8 = Someday
	// 9 = Canceled
	// 10 = Reference
	//
	Status *int64 `json:"status,omitempty"`

	// A comma separated string listing the tags assigned to this task. Up to 250 characters.
	Tag *string `json:"tag,omitempty"`

	// The value in the timer field indicates the number of seconds that have elapsed for the timer not including the current session.
	Timer *int64 `json:"timer,omitempty"`

	// If the timer is currently on, this will contain a unix timestamp indicating the last time that the timer was started. Therefore, if the timer is currently on, you will need to calculate the elapsed time when you present it to the user. This calculation is: Total Time=timer+(now-timeron). Where "now" is a unix timestamp for the current time.
	Timeron *int64 `json:"timeron,omitempty"`

	// A string for the name of the task. Up to 255 characters.
	Title *string `json:"title,omitempty"`

	// A read-only field that indicates how the task was added. These are the possible values:
	// 0: Main website
	// 1: Email Import
	// 2: Firefox Addon
	// 3: This API
	// 4: Widgets (Google Gadget, etc)
	// 5: Not used
	// 6: Mobile Phone
	// 7: iPhone App
	// 8: Import Tools
	// 9: Twitter
	//
	Via string `json:"via,omitempty"`
}

TaskEdit task edit

swagger:model TaskEdit

func LoadTaskFromYAML

func LoadTaskFromYAML(prettyFormatYAMLString string) (*TaskEdit, error)

func (*TaskEdit) ContextValidate

func (m *TaskEdit) ContextValidate(ctx ccontext.Context, formats strfmt.Registry) error

ContextValidate validates this task edit based on context it is used

func (*TaskEdit) MarshalBinary

func (m *TaskEdit) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TaskEdit) UnmarshalBinary

func (m *TaskEdit) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TaskEdit) Validate

func (m *TaskEdit) Validate(formats strfmt.Registry) error

Validate validates this task edit

type TaskEditableFormatted

type TaskEditableFormatted struct {
	TaskEdit

	// Added is the time when the task is added.
	// it was NO omitempty, we should display in editor so that user can edit it.
	// it was skip copier, it should be convert format
	// and other fields are same as Added
	Added     string `json:"added" copier:"-"`
	Completed string `json:"completed" copier:"-"`
	Duedate   string `json:"duedate" copier:"-"`
	Duetime   string `json:"duetime" copier:"-"`
	Modified  string `json:"modified" copier:"-"`
	Startdate string `json:"startdate" copier:"-"`
	Starttime string `json:"starttime" copier:"-"`
	Timeron   string `json:"timeron" copier:"-"`
}

TaskEditableFormatted is the task that can be edited. all the date time fields will convert to human-readable format.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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