Documentation ¶
Index ¶
- type FilterFunc
- type List
- type MapFunc
- type Prop
- type PropError
- type PropKind
- type PropKindInvalidError
- type PropNoExistError
- type PropNumber
- type PropString
- type PropStrings
- type PropTime
- type Rule
- type RuleNoExistError
- type Schema
- type Task
- func (t *Task) Delete(names ...string)
- func (t *Task) MarshalJSON() ([]byte, error)
- func (t *Task) Number(name string) (float64, error)
- func (t *Task) Store(name, value string, kind PropKind) (err error)
- func (t *Task) String(name string) (string, error)
- func (t *Task) Strings(name string) ([]string, error)
- func (t *Task) UnmarshalJSON(data []byte) error
- type TimeFunc
- type TimeLayoutError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterFunc ¶
type List ¶
type List []Task
func (List) Filter ¶
func (ls List) Filter(f FilterFunc) List
Filter returns a list with all tasks from ls that passed the predicate f.
type Prop ¶
type Prop interface { fmt.Stringer json.Marshaler json.Unmarshaler // Store sets the property value from the given string. Store(string) error // Match returns whether the property matches the given expression. Match(string) bool // Kind returns the property kind. Kind() PropKind }
Prop is a general interface for the different kinds of properties.
type PropKindInvalidError ¶
type PropKindInvalidError struct {
Kind PropKind
}
func (*PropKindInvalidError) Error ¶
func (e *PropKindInvalidError) Error() string
type PropNoExistError ¶
type PropNoExistError struct {
Name string
}
func (*PropNoExistError) Error ¶
func (e *PropNoExistError) Error() string
type PropNumber ¶
type PropNumber struct {
Value float64
}
PropNumber is a property with the float64 type.
func (*PropNumber) Kind ¶
func (p *PropNumber) Kind() PropKind
func (*PropNumber) MarshalJSON ¶
func (p *PropNumber) MarshalJSON() ([]byte, error)
func (*PropNumber) Match ¶
func (p *PropNumber) Match(s string) bool
func (*PropNumber) Store ¶
func (p *PropNumber) Store(s string) error
func (*PropNumber) String ¶
func (p *PropNumber) String() string
func (*PropNumber) UnmarshalJSON ¶
func (p *PropNumber) UnmarshalJSON(data []byte) error
type PropString ¶
type PropString struct {
Value string
}
PropString is a property with the string type.
func (*PropString) Kind ¶
func (p *PropString) Kind() PropKind
func (*PropString) MarshalJSON ¶
func (p *PropString) MarshalJSON() ([]byte, error)
func (*PropString) Match ¶
func (p *PropString) Match(s string) bool
func (*PropString) Store ¶
func (p *PropString) Store(s string) error
func (*PropString) String ¶
func (p *PropString) String() string
func (*PropString) UnmarshalJSON ¶
func (p *PropString) UnmarshalJSON(data []byte) error
type PropStrings ¶
type PropStrings struct {
Value []string
}
PropStrings is a property with the string slice type.
func (*PropStrings) Kind ¶
func (p *PropStrings) Kind() PropKind
func (*PropStrings) MarshalJSON ¶
func (p *PropStrings) MarshalJSON() ([]byte, error)
func (*PropStrings) Match ¶
func (p *PropStrings) Match(s string) bool
func (*PropStrings) Store ¶
func (p *PropStrings) Store(s string) error
func (*PropStrings) String ¶
func (p *PropStrings) String() string
func (*PropStrings) UnmarshalJSON ¶
func (p *PropStrings) UnmarshalJSON(data []byte) error
type PropTime ¶
PropTime is a property with the time.Time type.
func (*PropTime) MarshalJSON ¶
func (*PropTime) UnmarshalJSON ¶
type Rule ¶
type Rule struct {
Kind PropKind `json:"kind"`
}
A Rule defines the requirements of a property.
type RuleNoExistError ¶
type RuleNoExistError struct {
Name string
}
func (*RuleNoExistError) Error ¶
func (e *RuleNoExistError) Error() string
type Task ¶
A Task contains a map of its properties.
func (*Task) MarshalJSON ¶
func (*Task) UnmarshalJSON ¶
type TimeLayoutError ¶
type TimeLayoutError struct {
Value string
}
func (*TimeLayoutError) Error ¶
func (e *TimeLayoutError) Error() string
Click to show internal directories.
Click to hide internal directories.