Documentation ¶
Index ¶
- type Day
- type DaySearchForm
- type DayStore
- func (t *DayStore) Create(day Day) (*mongo.InsertOneResult, error)
- func (t *DayStore) FindByDate(date time.Time, userID string) (Day, error)
- func (t *DayStore) FindByDateRange(from time.Time, to time.Time, userID string) ([]Day, error)
- func (t *DayStore) FindByEventID(eventID string, userID string) (Day, error)
- func (t *DayStore) GetUsedNames(userID string, tagID string, from time.Time, to time.Time) ([]string, error)
- func (t *DayStore) Search(form DaySearchForm) ([]Day, error)
- func (t *DayStore) Update(day Day) (Day, error)
- type Event
- type Project
- type ProjectSearchForm
- type ProjectStore
- func (t *ProjectStore) Create(record Project) (*mongo.InsertOneResult, error)
- func (t *ProjectStore) Delete(projectID string) error
- func (t *ProjectStore) FindAllActiveProjectsByUser(userID string) (Projects, error)
- func (t *ProjectStore) FindAllProjectsByUser(userID string) ([]Project, error)
- func (t *ProjectStore) GetProjectByID(projectID string) (Project, error)
- func (t *ProjectStore) Search(form ProjectSearchForm) ([]Project, error)
- func (t *ProjectStore) Update(project Project) (string, error)
- type Projects
- type Settings
- type SettingsStore
- type Tag
- type TagStore
- func (t *TagStore) Create(tag Tag) (*mongo.InsertOneResult, error)
- func (t *TagStore) Delete(tagID string) error
- func (t *TagStore) DeleteBaseTag(tagID string) error
- func (t *TagStore) DeleteByProjectID(tagID string, projectIDs []string) error
- func (t *TagStore) FindAll() ([]Tag, error)
- func (t *TagStore) FindAllActive() ([]Tag, error)
- func (t *TagStore) FindAllBaseAndProjectActiveTags(projectIDs []string) ([]Tag, error)
- func (t *TagStore) Update(tag Tag) (string, error)
- func (t *TagStore) UpdateBaseTag(tag Tag) (string, error)
- type TimeRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Day ¶
type Day struct { ID string `json:"id,omitempty" bson:"_id"` Events []Event `json:"events"` Date time.Time `json:"date"` UserID string `json:"user,omitempty"` }
func (*Day) PrepareReceived ¶
func (d *Day) PrepareReceived()
func (*Day) PrepareToSend ¶
func (d *Day) PrepareToSend()
type DaySearchForm ¶
type DayStore ¶
type DayStore struct {
// contains filtered or unexported fields
}
func CreateDayStore ¶
func CreateDayStore(database *mongo.Database, uuidProvider utils.UuidProvider) *DayStore
func (*DayStore) FindByDate ¶
func (*DayStore) FindByDateRange ¶
func (*DayStore) FindByEventID ¶
func (*DayStore) GetUsedNames ¶
type Event ¶
type Event struct { ID string `json:"id,omitempty" bson:"_id"` Name string `json:"name" validate:"required,max=256"` Start time.Time `json:"start" validate:"required"` End time.Time `json:"end" validate:"required"` TagID string `json:"tag" validate:"required,max=36"` ProjectID string `json:"project" validate:"max=36"` Timed bool `json:"timed" validate:"required"` }
func (*Event) PrepareReceived ¶
func (e *Event) PrepareReceived()
func (*Event) PrepareToSend ¶
func (e *Event) PrepareToSend()
type Project ¶
type Project struct { ID string `json:"id,omitempty" bson:"_id"` Name string `json:"name" validate:"required,max=256"` Description string `json:"description" validate:"required,max=256"` Users []string `json:"users"` Start *time.Time `json:"start,omitempty" bson:"start,omitempty"` End *time.Time `json:"end,omitempty" bson:"end,omitempty"` }
func (*Project) PrepareReceived ¶
func (t *Project) PrepareReceived()
func (*Project) PrepareToSend ¶
func (t *Project) PrepareToSend()
type ProjectSearchForm ¶
type ProjectStore ¶
type ProjectStore struct {
// contains filtered or unexported fields
}
func CreateProjectStore ¶
func CreateProjectStore(database *mongo.Database, uuidProvider utils.UuidProvider) *ProjectStore
func (*ProjectStore) Create ¶
func (t *ProjectStore) Create(record Project) (*mongo.InsertOneResult, error)
func (*ProjectStore) Delete ¶
func (t *ProjectStore) Delete(projectID string) error
func (*ProjectStore) FindAllActiveProjectsByUser ¶
func (t *ProjectStore) FindAllActiveProjectsByUser(userID string) (Projects, error)
func (*ProjectStore) FindAllProjectsByUser ¶
func (t *ProjectStore) FindAllProjectsByUser(userID string) ([]Project, error)
func (*ProjectStore) GetProjectByID ¶
func (t *ProjectStore) GetProjectByID(projectID string) (Project, error)
func (*ProjectStore) Search ¶
func (t *ProjectStore) Search(form ProjectSearchForm) ([]Project, error)
type Settings ¶
type Settings struct { TimeRange TimeRange `json:"timeRange" validate:"required"` UserID string `json:"user,omitempty" bson:"user"` }
func CreateDefaultSettings ¶
func CreateDefaultSettings() Settings
func (*Settings) PrepareReceived ¶
func (s *Settings) PrepareReceived()
func (*Settings) PrepareToSend ¶
func (s *Settings) PrepareToSend()
type SettingsStore ¶
type SettingsStore struct {
// contains filtered or unexported fields
}
func CreateSettingsStore ¶
func CreateSettingsStore(database *mongo.Database) *SettingsStore
func (*SettingsStore) CreateOrUpdate ¶
func (s *SettingsStore) CreateOrUpdate(settings Settings) error
func (*SettingsStore) FindByUser ¶
func (s *SettingsStore) FindByUser(userID string) (*Settings, error)
type Tag ¶
type Tag struct { ID string `json:"id,omitempty" bson:"_id"` Name string `json:"name" validate:"required,max=256"` Description string `json:"description" validate:"max=256"` Color string `json:"color" validate:"required,max=16"` ParentID string `json:"parent,omitempty" validate:"max=36" bson:"parent,omitempty"` ProjectID string `json:"project,omitempty" validate:"max=36" bson:"project,omitempty"` Basic bool `json:"basic"` }
func (*Tag) PrepareReceivedBaseTag ¶
func (t *Tag) PrepareReceivedBaseTag()
func (*Tag) PrepareReceivedProjectTag ¶
func (t *Tag) PrepareReceivedProjectTag()
func (*Tag) PrepareToSend ¶
func (t *Tag) PrepareToSend()
type TagStore ¶
type TagStore struct {
// contains filtered or unexported fields
}
func CreateTagStore ¶
func CreateTagStore(database *mongo.Database, uuidProvider utils.UuidProvider) *TagStore
func (*TagStore) DeleteBaseTag ¶
func (*TagStore) DeleteByProjectID ¶
func (*TagStore) FindAllActive ¶
func (*TagStore) FindAllBaseAndProjectActiveTags ¶
Click to show internal directories.
Click to hide internal directories.