Documentation ¶
Index ¶
- type CountlessStat
- type FullPath
- type Path
- type PathStore
- func (ps *PathStore) CreatePath(ctx context.Context, userId, pathName string) (string, error)
- func (p *PathStore) CreateQuota(ctx context.Context, pathId, statName string) error
- func (ps *PathStore) CreateStat(ctx context.Context, pathId string, name, askerId string) error
- func (ps *PathStore) DeletePath(ctx context.Context, pathId string, askerId string) error
- func (ps *PathStore) DeleteStat(ctx context.Context, pathId string, name string, askerId string) error
- func (ps *PathStore) GetFullPath(ctx context.Context, askerId, pathId string) (FullPath, error)
- func (ps *PathStore) GetPaths(ctx context.Context, userId, askerId string) ([]PathWithSteps, error)
- func (ps *PathStore) GetStats(ctx context.Context, pathId string) ([]Stat, error)
- func (ps *PathStore) UpdatePath(ctx context.Context, newPath Path, askerId string) error
- func (p *PathStore) UpdateQuota(ctx context.Context, pathId, statName string, quota QuotaEditable) error
- func (p *PathStore) UpdateQuotaStreak(ctx context.Context, pathId, statName string, count int32, quota *Quota) error
- func (ps *PathStore) UpdateStat(ctx context.Context, pathId, statName string, stat *CountlessStat, ...) error
- func (ps *PathStore) UpdateStatsCounts(ctx context.Context, pathId string, counts []StatCount, askerId string) error
- type PathWithSteps
- type Quota
- type QuotaEditable
- type Stat
- type StatCount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountlessStat ¶
type CountlessStat struct { Name string `json:"name"` StepEquivalent int32 `json:"stepEquivalent"` Quota QuotaEditable `json:"quota"` }
type PathStore ¶
type PathStore struct {
// contains filtered or unexported fields
}
func NewPathStore ¶
func NewPathStore(postgresC *postgresclient.Client) *PathStore
func (*PathStore) CreatePath ¶
func (*PathStore) CreateQuota ¶
func (*PathStore) CreateStat ¶
func (*PathStore) DeletePath ¶
func (*PathStore) DeleteStat ¶
func (*PathStore) GetFullPath ¶
func (*PathStore) UpdatePath ¶
func (*PathStore) UpdateQuota ¶
func (*PathStore) UpdateQuotaStreak ¶
func (*PathStore) UpdateStat ¶
type PathWithSteps ¶
type Quota ¶
type Quota struct { QuotaEditable CountProgress int32 `json:"countProgress"` HoursPassed int32 `json:"hoursPassed"` Streak int32 `json:"streak"` }
type QuotaEditable ¶
Quota
Click to show internal directories.
Click to hide internal directories.