Documentation ¶
Index ¶
- func RegisterController(v0 *server.V0, c Controller)
- type Asset
- type Avg
- type Controller
- type Group
- type GroupRepo
- type ResVersion
- type Service
- func (s *Service) GetGroupByID(ctx context.Context, id string) (*Group, error)
- func (s *Service) GetGroups(ctx context.Context) ([]Group, error)
- func (s *Service) GetStories(ctx context.Context) ([]Story, error)
- func (s *Service) GetStoryByID(ctx context.Context, id string) (*Story, error)
- func (s *Service) GetVersion(ctx context.Context) (string, error)
- func (s *Service) Reset(ctx context.Context) error
- func (s *Service) SetAvg(ctx context.Context, version string, avg Avg) (err error)
- type Story
- type StoryRepo
- func (r *StoryRepo) GetStories(ctx context.Context) ([]storyModel, error)
- func (r *StoryRepo) GetStoryByID(ctx context.Context, id string) (*storyModel, error)
- func (r *StoryRepo) InsertStories(ctx context.Context, stories []storyModel) error
- func (r *StoryRepo) Truncate(ctx context.Context) (err error)
- type VersionRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterController ¶
func RegisterController(v0 *server.V0, c Controller)
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(service *Service) Controller
func (*Controller) GetGroupByID ¶
func (c *Controller) GetGroupByID(ctx *fiber.Ctx) error
func (*Controller) GetGroups ¶
func (c *Controller) GetGroups(ctx *fiber.Ctx) error
func (*Controller) GetStories ¶
func (c *Controller) GetStories(ctx *fiber.Ctx) error
func (*Controller) GetStoryByID ¶
func (c *Controller) GetStoryByID(ctx *fiber.Ctx) error
type GroupRepo ¶
func (*GroupRepo) GetGroupByID ¶
func (*GroupRepo) InsertGroups ¶
type ResVersion ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(versionRepo *VersionRepo, groupRepo *GroupRepo, storyRepo *StoryRepo) *Service
func (*Service) GetGroupByID ¶
func (*Service) GetStoryByID ¶
type StoryRepo ¶
func (*StoryRepo) GetStories ¶
func (*StoryRepo) GetStoryByID ¶
func (*StoryRepo) InsertStories ¶
type VersionRepo ¶
func NewVersionRepo ¶
func NewVersionRepo(db *bun.DB) (*VersionRepo, error)
func (*VersionRepo) GetVersion ¶
func (r *VersionRepo) GetVersion(ctx context.Context) (string, error)
func (*VersionRepo) UpsertVersion ¶
func (r *VersionRepo) UpsertVersion(ctx context.Context, resVersion string) error
Click to show internal directories.
Click to hide internal directories.