Documentation
¶
Index ¶
- Constants
- type Store
- func (s *Store) Close() error
- func (s *Store) DeleteChallenge(ctx context.Context, challengeID string) error
- func (s *Store) GetChallenge(ctx context.Context, challengeID string) (challenge.Model, error)
- func (s *Store) ListChallenges(ctx context.Context) (map[string]challenge.Model, error)
- func (s *Store) Popularity(ctx context.Context) (popularity.Snapshot, error)
- func (s *Store) PutChallenge(ctx context.Context, challengeID string, challenge challenge.Model) error
- func (s *Store) RegisterCompletion(ctx context.Context, challengeID string, completion challenge.Completion) error
- func (s *Store) RegisterVote(ctx context.Context, challengeID string, vote challenge.Vote) error
Constants ¶
View Source
const ( ChallengeBucketID = "challenges" PopularityBucketID = "popularity" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func New ¶
New opens the bbolt database at filename, creating the file and the required buckets if they do not already exist.
func (*Store) DeleteChallenge ¶
func (*Store) GetChallenge ¶
func (*Store) ListChallenges ¶ added in v0.3.0
func (*Store) Popularity ¶ added in v0.3.0
func (*Store) PutChallenge ¶
func (*Store) RegisterCompletion ¶
Click to show internal directories.
Click to hide internal directories.