dto

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const EstimateTypeAuto = EstimateType("AUTO")

EstimateTypeAuto estimate is Auto

View Source
const EstimateTypeManual = EstimateType("MANUAL")

EstimateTypeManual estimate is Manual

View Source
const MembershipStatusActive = MembershipStatus("ACTIVE")

MembershipStatusActive membership is Active

View Source
const MembershipStatusDeclined = MembershipStatus("DECLINED")

MembershipStatusDeclined membership is Declined

View Source
const MembershipStatusInactive = MembershipStatus("INACTIVE")

MembershipStatusInactive membership is Inactive

View Source
const MembershipStatusPending = MembershipStatus("PENDING")

MembershipStatusPending membership is Pending

View Source
const TaskStatusActive = TaskStatus("ACTIVE")

TaskStatusActive task is Active

View Source
const TaskStatusDone = TaskStatus("DONE")

TaskStatusDone task is Done

View Source
const UserStatusActive = UserStatus("ACTIVE")

UserStatusActive when the user is Active

View Source
const UserStatusDeleted = UserStatus("DELETED")

UserStatusDeleted when the user is Deleted

View Source
const UserStatusPendingEmailVerification = UserStatus("PENDING_EMAIL_VERIFICATION")

UserStatusPendingEmailVerification when the user is Pending Email Verification

View Source
const WeekStartFriday = WeekStart("FRIDAY")

WeekStartFriday when start at Friday

View Source
const WeekStartMonday = WeekStart("MONDAY")

WeekStartMonday when start at Monday

View Source
const WeekStartSaturday = WeekStart("SATURDAY")

WeekStartSaturday when start at Saturday

View Source
const WeekStartSunday = WeekStart("SUNDAY")

WeekStartSunday when start at Sunday

View Source
const WeekStartThursday = WeekStart("THURSDAY")

WeekStartThursday when start at Thursday

View Source
const WeekStartTuesday = WeekStart("TUESDAY")

WeekStartTuesday when start at Tuesday

View Source
const WeekStartWednesday = WeekStart("WEDNESDAY")

WeekStartWednesday when start at Wednesday

Variables

This section is empty.

Functions

func NewPagination added in v0.10.0

func NewPagination(page, size int) pagination

Types

type CreateTimeEntryRequest

type CreateTimeEntryRequest struct {
	Start       DateTime  `json:"start,omitempty"`
	End         *DateTime `json:"end,omitempty"`
	Billable    bool      `json:"billable,omitempty"`
	Description string    `json:"description,omitempty"`
	ProjectID   string    `json:"projectId,omitempty"`
	TaskID      string    `json:"taskId,omitempty"`
	TagIDs      []string  `json:"tagIds,omitempty"`
}

CreateTimeEntryRequest to create a time entry is created

type DateTime

type DateTime struct {
	time.Time
}

DateTime is a time presentation for parameters

func (DateTime) MarshalJSON

func (d DateTime) MarshalJSON() ([]byte, error)

MarshalJSON converts DateTime correctly

func (DateTime) String added in v0.1.5

func (d DateTime) String() string

type Error

type Error struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

Error api errors

func (Error) Error

func (e Error) Error() string

type Estimate

type Estimate struct {
	Estimate string       `json:"estimate"`
	Type     EstimateType `json:"type"`
}

Estimate DTO

type EstimateType

type EstimateType string

EstimateType possible Estimate types

type GetProjectRequest added in v0.10.0

type GetProjectRequest struct {
	Name     string
	Archived bool

	Pagination pagination
}

func (GetProjectRequest) AppendToQuery added in v0.10.0

func (r GetProjectRequest) AppendToQuery(u url.URL) url.URL

AppendToQuery decorates the URL with the query string needed for this Request

func (GetProjectRequest) WithPagination added in v0.10.0

func (r GetProjectRequest) WithPagination(page, size int) PaginatedRequest

WithPagination add pagination to the GetProjectRequest

type GetTagsRequest added in v0.15.0

type GetTagsRequest struct {
	Name     string
	Archived bool

	Pagination pagination
}

func (GetTagsRequest) AppendToQuery added in v0.15.0

func (r GetTagsRequest) AppendToQuery(u url.URL) url.URL

AppendToQuery decorates the URL with the query string needed for this Request

func (GetTagsRequest) WithPagination added in v0.15.0

func (r GetTagsRequest) WithPagination(page, size int) PaginatedRequest

WithPagination add pagination to the GetTagsRequest

type GetTimeEntryInProgressRequest added in v0.22.0

type GetTimeEntryInProgressRequest struct {
	Hydrated       *bool
	OnlyInProgress bool
}

GetTimeEntryInProgressRequest to get only the time entry in progress

func (GetTimeEntryInProgressRequest) AppendToQuery added in v0.22.0

func (r GetTimeEntryInProgressRequest) AppendToQuery(u url.URL) url.URL

AppendToQuery decorates the URL with the query string needed for this Request

type GetTimeEntryRequest added in v0.22.0

type GetTimeEntryRequest struct {
	Hydrated               *bool
	ConsiderDurationFormat *bool
}

TimeEntryStartEndRequest to get a time entry

func (GetTimeEntryRequest) AppendToQuery added in v0.22.0

func (r GetTimeEntryRequest) AppendToQuery(u url.URL) url.URL

AppendToQuery decorates the URL with the query string needed for this Request

type HourlyRate

type HourlyRate struct {
	Amount   int32  `json:"amount"`
	Currency string `json:"currency"`
}

HourlyRate DTO

type Invitation

type Invitation struct {
	Creation       time.Time  `json:"creation"`
	InvitationCode string     `json:"invitationCode"`
	Membership     Membership `json:"membership"`
	WorkspaceID    string     `json:"workspaceId"`
	WorkspaceName  string     `json:"workspaceName"`
}

Invitation DTO

type InvitedUser

type InvitedUser struct {
	ID          string       `json:"id"`
	Email       string       `json:"email"`
	Invitation  Invitation   `json:"invitation"`
	Memberships []Membership `json:"memberships"`
}

InvitedUser DTO

type Membership

type Membership struct {
	HourlyRate HourlyRate       `json:"hourlyRate"`
	Status     MembershipStatus `json:"membershipStatus"`
	Type       string           `json:"membershipType"`
	Target     string           `json:"target"`
	UserID     string           `json:"userId"`
}

Membership DTO

type MembershipStatus

type MembershipStatus string

MembershipStatus possible Membership Status

type OutTimeEntryRequest

type OutTimeEntryRequest struct {
	End DateTime `json:"end"`
}

OutTimeEntryRequest to end the current time entry

type PaginatedRequest added in v0.10.0

type PaginatedRequest interface {
	WithPagination(page, size int) PaginatedRequest
}

type Project

type Project struct {
	ID          string       `json:"id"`
	Name        string       `json:"name"`
	HourlyRate  HourlyRate   `json:"hourlyRate"`
	ClientID    string       `json:"clientId"`
	WorkspaceID string       `json:"workspaceId"`
	Billable    bool         `json:"billable"`
	Memberships []Membership `json:"memberships"`
	Color       string       `json:"color"`
	Estimate    Estimate     `json:"estimate"`
	Archived    bool         `json:"archived"`
	Duration    string       `json:"duration"`
	ClientName  string       `json:"clientName"`
	Note        string       `json:"note"`
	Template    bool         `json:"template"`
	Public      bool         `json:"public"`
}

Project DTO

type Round

type Round struct {
	Minutes string `json:"minutes"`
	Round   string `json:"round"`
}

Round DTO

type SummaryReportSettings

type SummaryReportSettings struct {
	Group    string `json:"group"`
	Subgroup string `json:"subgroup"`
}

SummaryReportSettings DTO

type Tag

type Tag struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	WorkspaceID string `json:"workspaceId"`
}

Tag DTO

type Task

type Task struct {
	ID         string     `json:"id"`
	AssigneeID string     `json:"assigneeId"`
	Estimate   string     `json:"estimate"`
	Name       string     `json:"name"`
	ProjectID  string     `json:"projectId"`
	Status     TaskStatus `json:"status"`
}

Task DTO

type TaskStatus

type TaskStatus string

TaskStatus task status

type TimeEntriesList

type TimeEntriesList struct {
	AllEntriesCount int64           `json:"allEntriesCount"`
	GotAllEntries   bool            `json:"gotAllEntries"`
	TimeEntriesList []TimeEntryImpl `json:"timeEntriesList"`
}

TimeEntriesList DTO

type TimeEntry

type TimeEntry struct {
	ID            string       `json:"id"`
	Billable      bool         `json:"billable"`
	Description   string       `json:"description"`
	HourlyRate    HourlyRate   `json:"hourlyRate"`
	IsLocked      bool         `json:"isLocked"`
	Project       *Project     `json:"project"`
	ProjectID     string       `json:"projectId"`
	Tags          []Tag        `json:"tags"`
	Task          *Task        `json:"task"`
	TimeInterval  TimeInterval `json:"timeInterval"`
	TotalBillable int64        `json:"totalBillable"`
	User          *User        `json:"user"`
	WorkspaceID   string       `json:"workspaceId"`
}

TimeEntry DTO

type TimeEntryImpl

type TimeEntryImpl struct {
	Billable     bool         `json:"billable"`
	Description  string       `json:"description"`
	ID           string       `json:"id"`
	IsLocked     bool         `json:"isLocked"`
	ProjectID    string       `json:"projectId"`
	TagIDs       []string     `json:"tagIds"`
	TaskID       string       `json:"taskId"`
	TimeInterval TimeInterval `json:"timeInterval"`
	UserID       string       `json:"userId"`
	WorkspaceID  string       `json:"workspaceId"`
}

TimeEntryImpl DTO

type TimeEntryStartEndRequest

type TimeEntryStartEndRequest struct {
	Start    DateTime
	End      DateTime
	Hydrated *bool

	Pagination pagination
}

TimeEntryStartEndRequest to get entries by range

func (TimeEntryStartEndRequest) AppendToQuery added in v0.1.5

func (r TimeEntryStartEndRequest) AppendToQuery(u url.URL) url.URL

AppendToQuery decorates the URL with the query string needed for this Request

func (TimeEntryStartEndRequest) WithPagination added in v0.1.7

func (r TimeEntryStartEndRequest) WithPagination(page, size int) PaginatedRequest

WithPagination add pagination to the TimeEntryStartEndRequest

type TimeInterval

type TimeInterval struct {
	Duration string     `json:"duration"`
	End      *time.Time `json:"end"`
	Start    time.Time  `json:"start"`
}

TimeInterval DTO

type UpdateTimeEntryRequest

type UpdateTimeEntryRequest struct {
	Start       DateTime  `json:"start,omitempty"`
	End         *DateTime `json:"end,omitempty"`
	Billable    bool      `json:"billable,omitempty"`
	Description string    `json:"description,omitempty"`
	ProjectID   string    `json:"projectId,omitempty"`
	TaskID      string    `json:"taskId,omitempty"`
	TagIDs      []string  `json:"tagIds,omitempty"`
}

UpdateTimeEntryRequest to update a time entry

type User

type User struct {
	ID               string       `json:"id"`
	ActiveWorkspace  string       `json:"activeWorkspace"`
	DefaultWorkspace string       `json:"defaultWorkspace"`
	Email            string       `json:"email"`
	Memberships      []Membership `json:"memberships"`
	Name             string       `json:"name"`
	ProfilePicture   string       `json:"profilePicture"`
	Settings         UserSettings `json:"settings"`
	Status           UserStatus   `json:"status"`
}

User DTO

type UserSettings

type UserSettings struct {
	DateFormat            string                `json:"dateFormat"`
	IsCompactViewOn       bool                  `json:"isCompactViewOn"`
	LongRunning           bool                  `json:"longRunning"`
	SendNewsletter        bool                  `json:"sendNewsletter"`
	SummaryReportSettings SummaryReportSettings `json:"summaryReportSettings"`
	TimeFormat            string                `json:"timeFormat"`
	TimeTrackingManual    bool                  `json:"timeTrackingManual"`
	TimeZone              string                `json:"timeZone"`
	WeekStart             string                `json:"weekStart"`
	WeeklyUpdates         bool                  `json:"weeklyUpdates"`
}

UserSettings DTO

type UserStatus

type UserStatus string

UserStatus possible user status

type WeekStart

type WeekStart string

WeekStart when the week starts

type Workspace

type Workspace struct {
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	ImageURL    string            `json:"imageUrl"`
	Settings    WorkspaceSettings `json:"workspaceSettings"`
	HourlyRate  HourlyRate        `json:"hourlyRate"`
	Memberships []Membership
}

Workspace DTO

type WorkspaceSettings

type WorkspaceSettings struct {
	CanSeeTimeSheet                    bool   `json:"canSeeTimeSheet"`
	DefaultBillableProjects            bool   `json:"defaultBillableProjects"`
	ForceDescription                   bool   `json:"forceDescription"`
	ForceProjects                      bool   `json:"forceProjects"`
	ForceTags                          bool   `json:"forceTags"`
	ForceTasks                         bool   `json:"forceTasks"`
	LockTimeEntries                    string `json:"lockTimeEntries"`
	OnlyAdminsCreateProject            bool   `json:"onlyAdminsCreateProject"`
	OnlyAdminsSeeAllTimeEntries        bool   `json:"onlyAdminsSeeAllTimeEntries"`
	OnlyAdminsSeeBillableRates         bool   `json:"onlyAdminsSeeBillableRates"`
	OnlyAdminsSeeDashboard             bool   `json:"onlyAdminsSeeDashboard"`
	OnlyAdminsSeePublicProjectsEntries bool   `json:"onlyAdminsSeePublicProjectsEntries"`
	ProjectFavorites                   bool   `json:"projectFavorites"`
	ProjectPickerSpecialFilter         bool   `json:"projectPickerSpecialFilter"`
	Round                              Round  `json:"round"`
	TimeRoundingInReports              bool   `json:"timeRoundingInReports"`
}

WorkspaceSettings DTO

Jump to

Keyboard shortcuts

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