Documentation
¶
Index ¶
- type HealthCheckService
- type IdeaService
- func (svc IdeaService) AddComment(userID, ideaID int, content string) (int, error)
- func (svc IdeaService) GetAll(tenantID int) ([]*feedback.Idea, error)
- func (svc IdeaService) GetByID(tenantID, ideaID int) (*feedback.Idea, error)
- func (svc IdeaService) GetCommentsByIdeaID(tenantID, ideaID int) ([]*feedback.Comment, error)
- func (svc IdeaService) Save(tenantID, userID int, title, description string) (*feedback.Idea, error)
- type TenantService
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheckService ¶
HealthCheckService is a simple general purpose health check service
func (HealthCheckService) IsDatabaseOnline ¶
func (svc HealthCheckService) IsDatabaseOnline() bool
IsDatabaseOnline checks if database is online
type IdeaService ¶
IdeaService contains read and write operations for ideas
func (IdeaService) AddComment ¶
func (svc IdeaService) AddComment(userID, ideaID int, content string) (int, error)
AddComment places a new comment on an idea
func (IdeaService) GetAll ¶
func (svc IdeaService) GetAll(tenantID int) ([]*feedback.Idea, error)
GetAll returns all tenant ideas
func (IdeaService) GetByID ¶
func (svc IdeaService) GetByID(tenantID, ideaID int) (*feedback.Idea, error)
GetByID returns idea by given id
func (IdeaService) GetCommentsByIdeaID ¶
func (svc IdeaService) GetCommentsByIdeaID(tenantID, ideaID int) ([]*feedback.Comment, error)
GetCommentsByIdeaID returns all coments from given idea
type TenantService ¶
TenantService contains read and write operations for tenants
func (TenantService) GetByDomain ¶
func (svc TenantService) GetByDomain(domain string) (*app.Tenant, error)
GetByDomain returns a tenant based on its domain
type UserService ¶
UserService is used for user operations using a Postgres database
func (UserService) GetByEmail ¶
func (svc UserService) GetByEmail(email string) (*app.User, error)
GetByEmail returns a user based on given email
Click to show internal directories.
Click to hide internal directories.