Documentation ¶
Index ¶
- type LGTMCreatedMessage
- type LGTMListOption
- type NotificationMessage
- type NotificationType
- type ReportCreatedMessage
- type Repository
- func (r Repository) CategorizeLGTM(ctx context.Context) (map[string][]string, error)
- func (r Repository) CreateLGTM(ctx context.Context, data []byte, opts ...lgtmgen.GenerateOption) (*models.LGTM, error)
- func (r Repository) CreateReport(ctx context.Context, lgtmID string, t models.ReportType, text string) (*models.Report, error)
- func (r Repository) DeleteLGTM(ctx context.Context, id string) error
- func (r Repository) FindLGTM(ctx context.Context, id string) (*models.LGTM, error)
- func (r Repository) FindRate(ctx context.Context, ip, tier string) (*models.Rate, error)
- func (r Repository) IncrementCategoryByName(ctx context.Context, name string, lang string) (*models.Category, error)
- func (r Repository) IncrementRate(ctx context.Context, ip, tier string) error
- func (r Repository) ListCategories(ctx context.Context, lang string) (models.Categories, error)
- func (r Repository) ListLGTMs(ctx context.Context, opts ...LGTMListOption) (models.LGTMs, error)
- func (r Repository) ListNews(ctx context.Context, locale string) (models.NewsList, error)
- func (r Repository) NotifyLGTMCreated(ctx context.Context, msg *LGTMCreatedMessage) error
- func (r Repository) NotifyReportCreated(ctx context.Context, msg *ReportCreatedMessage) error
- func (r Repository) SearchImages(ctx context.Context, q string) (models.Images, error)
- func (r Repository) SendLGTMCreatedMessage(ctx context.Context, msg *LGTMCreatedMessage) error
- func (r Repository) SendReportCreatedMessage(ctx context.Context, msg *ReportCreatedMessage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LGTMCreatedMessage ¶
type LGTMListOption ¶
type LGTMListOption func(*lgtmListOptions)
func WithLGTMAfter ¶
func WithLGTMAfter(l *models.LGTM) LGTMListOption
func WithLGTMCategory ¶ added in v0.4.0
func WithLGTMCategory(category, lang string) LGTMListOption
func WithLGTMLimit ¶
func WithLGTMLimit(limit int) LGTMListOption
func WithLGTMRandom ¶
func WithLGTMRandom() LGTMListOption
type NotificationMessage ¶
type NotificationMessage struct { Type NotificationType `json:"type"` LGTMCreated *LGTMCreatedMessage `json:"lgtm_created"` ReportCreated *ReportCreatedMessage `json:"report_created"` }
type NotificationType ¶
type NotificationType string
const ( NotificationTypeLGTMCreated NotificationType = "lgtm_created" NotificationTypeReportCreated NotificationType = "report_created" )
type ReportCreatedMessage ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func (Repository) CategorizeLGTM ¶ added in v0.4.0
func (Repository) CreateLGTM ¶
func (Repository) CreateReport ¶
func (Repository) DeleteLGTM ¶ added in v0.3.0
func (Repository) IncrementCategoryByName ¶ added in v0.4.0
func (Repository) IncrementRate ¶
func (Repository) ListCategories ¶ added in v0.4.0
func (Repository) NotifyLGTMCreated ¶
func (r Repository) NotifyLGTMCreated(ctx context.Context, msg *LGTMCreatedMessage) error
func (Repository) NotifyReportCreated ¶
func (r Repository) NotifyReportCreated(ctx context.Context, msg *ReportCreatedMessage) error
func (Repository) SearchImages ¶
func (Repository) SendLGTMCreatedMessage ¶
func (r Repository) SendLGTMCreatedMessage(ctx context.Context, msg *LGTMCreatedMessage) error
func (Repository) SendReportCreatedMessage ¶
func (r Repository) SendReportCreatedMessage(ctx context.Context, msg *ReportCreatedMessage) error
Click to show internal directories.
Click to hide internal directories.