Versions in this module Expand all Collapse all v1 v1.1.0 Jan 3, 2025 v1.0.0 Jan 3, 2025 Changes in this version + const DataSeparator + const DefaultSkipDays + func DateBetweenDates(dt timex.Date, start, end timex.Date) bool + func DefaultHash(s string) string + func DefaultItemKeysHash(keys []ItemKey) string + func EllipticalTruncate(text string, maxLen int) string + func EndingOfMonth(date timex.Date) timex.Date + func FormatMoney(value float64) string + func FormatShortDate(dt timex.Date) string + func FromCivilDate(dt civil.Date) timex.Date + func IndentJSON(data string) string + func Ptr[T any](v T) *T + func RandString(n int) string + func ShortMonthName(month time.Month) string + func SortMapByValueOrdered[K comparable, V cmp.Ordered](m map[K]V, reverse bool) iter.Seq2[K, V] + func SortMapByValue[K comparable, V any](m map[K]V, cmp func(V, V) int, reverse bool) iter.Seq2[K, V] + func TimeStartEnd(start, end timex.Date) (time.Time, time.Time) + type Cloud interface + DaysDelay func() int + MaxGroupBy func() int + ParameterTitle func(id string, defaultValue string) string + Parameters func() Parameters + Query func(ctx context.Context, options ...QueryOption) iter.Seq2[CloudQueryItem, error] + QueryExtraOutput func(ctx context.Context, extraData []QueryExtraData) QueryExtraOutput + type CloudQueryItem struct + Date timex.Date + Keys []ItemKey + Value float64 + type EmptyValue struct + func (v EmptyValue) Output(ctx context.Context, vctx ValueContext, uq *URLQuery) (string, error) + type Item struct + Keys []ItemKey + Values []float64 + func NewItem(keys []ItemKey, periods int) *Item + func (i *Item) Search(search string) bool + type ItemKey struct + ID string + Value any + type ItemValue struct + Value float64 + type Parameter struct + DataRequired bool + DefaultPriority int + HasData bool + ID string + IsFilter bool + IsGroup bool + IsGroupFilter bool + MenuTitle string + Name string + type Parameters []Parameter + func (p Parameters) DefaultGroup() Parameter + func (p Parameters) FindByGroupDefaultPriority(priority int) (Parameter, bool) + func (p Parameters) FindById(id string) (Parameter, bool) + type QueryExtraData interface + ExtraDataType func() string + type QueryExtraOutput interface + Close func() + ExtraOutputs func() iter.Seq2[ValueOutput, error] + type QueryFilter struct + ID string + Value string + type QueryGroup struct + Data string + ID string + type QueryHandlerOption func(options *queryHandlerOptions) + func WithQueryHandlerFilterKeys(f func(keys []ItemKey) bool) QueryHandlerOption + func WithQueryHandlerFilters(filters ...QueryFilter) QueryHandlerOption + func WithQueryHandlerGroups(groups ...QueryGroup) QueryHandlerOption + func WithQueryHandlerItemKeysHash(f func(keys []ItemKey) string) QueryHandlerOption + func WithQueryHandlerOnPeriodMatchError(onPeriodMatchError func(item CloudQueryItem, matchCount int) error) QueryHandlerOption + func WithQueryHandlerPeriodLists(periodList ...QueryPeriodList) QueryHandlerOption + func WithQueryHandlerPeriods(periods ...QueryPeriod) QueryHandlerOption + type QueryOption func(options *QueryOptions) + func WithQueryDates(start, end timex.Date) QueryOption + func WithQueryExtraData(extraDataCallback func(data QueryExtraData)) QueryOption + func WithQueryFilters(filters ...QueryFilter) QueryOption + func WithQueryGroupByDate(groupByDate bool) QueryOption + func WithQueryGroups(groups ...QueryGroup) QueryOption + type QueryOptions struct + End timex.Date + ExtraDataCallback func(data QueryExtraData) + Filters []QueryFilter + GroupByDate bool + Groups []QueryGroup + Start timex.Date + func ParseQueryOptions(options ...QueryOption) (QueryOptions, error) + type QueryPeriod struct + End timex.Date + ID string + Start timex.Date + func GenerateQueryPeriods(start, end timex.Date, amount int) []QueryPeriod + func NewQueryPeriod(start, end timex.Date) QueryPeriod + func (q QueryPeriod) String() string + func (q QueryPeriod) StringFilter() string + func (q QueryPeriod) StringWithDuration(showDuration bool) string + type QueryPeriodList struct + Periods []QueryPeriod + func (l QueryPeriodList) Range() (bool, timex.Date, timex.Date) + type QueryResult struct + ExtraOutput QueryExtraOutput + Groups []QueryResultGroup + Items []*Item + Periods []QueryResultPeriod + PeriodsSameDuration bool + TotalValue float64 + func QueryHandler(ctx context.Context, cloud Cloud, options ...QueryHandlerOption) (*QueryResult, error) + type QueryResultGroup struct + Data string + func (q QueryResultGroup) String() string + func (q QueryResultGroup) Title(isMenu bool) string + type QueryResultPeriod struct + TotalValue float64 + type URLQuery struct + func NewURLQuery(path string) *URLQuery + func (q *URLQuery) Clone() *URLQuery + func (q *URLQuery) Copy(keyFrom, keyTo string) *URLQuery + func (q *URLQuery) Get(key string) string + func (q *URLQuery) Move(keyFrom, keyTo string) *URLQuery + func (q *URLQuery) Params() iter.Seq2[string, string] + func (q *URLQuery) Path() string + func (q *URLQuery) Remove(keys ...string) *URLQuery + func (q *URLQuery) Set(key, value string) *URLQuery + func (q *URLQuery) SetFromQuery(query url.Values, keys ...string) *URLQuery + func (q *URLQuery) SetPath(path string) *URLQuery + func (q *URLQuery) String() string + func (q *URLQuery) Swap(key1, key2 string) *URLQuery + type ValueContext interface + FilterParamName func(id string) string + Flush func() + GroupParamName func() string + type ValueOutput interface + Output func(ctx context.Context, vctx ValueContext, uq *URLQuery) (string, error)