Documentation ¶
Index ¶
- type CachedDataSourceRepoImpl
- type CachedLocaleRepoImpl
- type CachedMetricsUnmatchedRepoImpl
- type CachedTagRepoImpl
- type DataSource
- type DataSourceRepo
- type DataSourceRepoImpl
- func (r *DataSourceRepoImpl) Delete(ctx context.Context, id int64) (err error)
- func (r *DataSourceRepoImpl) Find(ctx context.Context) (list []*DataSource, err error)
- func (r *DataSourceRepoImpl) FindOne(ctx context.Context, id int64) (e *DataSource, err error)
- func (r *DataSourceRepoImpl) Insert(ctx context.Context, e DataSource) (lastInsertID int64, err error)
- func (r *DataSourceRepoImpl) Update(ctx context.Context, e DataSource) (err error)
- type Locale
- type LocaleRepo
- type LocaleRepoImpl
- func (r *LocaleRepoImpl) Delete(ctx context.Context, id int64) (err error)
- func (r *LocaleRepoImpl) Find(ctx context.Context) (list []*Locale, err error)
- func (r *LocaleRepoImpl) FindOne(ctx context.Context, id int64) (e *Locale, err error)
- func (r *LocaleRepoImpl) Insert(ctx context.Context, e Locale) (lastInsertID int64, err error)
- func (r *LocaleRepoImpl) Update(ctx context.Context, e Locale) (err error)
- type MetricsUnmatched
- type MetricsUnmatchedCount
- type MetricsUnmatchedRepo
- type MetricsUnmatchedRepoImpl
- func (r *MetricsUnmatchedRepoImpl) Delete(ctx context.Context, id int64) (err error)
- func (r *MetricsUnmatchedRepoImpl) Find(ctx context.Context, id int64) (e *MetricsUnmatched, err error)
- func (r *MetricsUnmatchedRepoImpl) Insert(ctx context.Context, e MetricsUnmatched) (lastInsertID int64, err error)
- func (r *MetricsUnmatchedRepoImpl) List(ctx context.Context) (list []*MetricsUnmatched, err error)
- func (r *MetricsUnmatchedRepoImpl) ListCount(ctx context.Context) (list []*MetricsUnmatchedCount, err error)
- func (r *MetricsUnmatchedRepoImpl) Update(ctx context.Context, e MetricsUnmatched) (err error)
- type Rule
- type RuleRepo
- type RuleRepoImpl
- func (r *RuleRepoImpl) Delete(ctx context.Context, id int64) (err error)
- func (r *RuleRepoImpl) Find(ctx context.Context) (list []*Rule, err error)
- func (r *RuleRepoImpl) FindOne(ctx context.Context, id int64) (rule *Rule, err error)
- func (r *RuleRepoImpl) Insert(ctx context.Context, rule Rule) (lastInsertID int64, err error)
- func (r *RuleRepoImpl) Update(ctx context.Context, rule Rule) (err error)
- type Tag
- type TagRepo
- type TagRepoImpl
- func (r *TagRepoImpl) Delete(ctx context.Context, id int64) (err error)
- func (r *TagRepoImpl) Find(ctx context.Context) (list []*Tag, err error)
- func (r *TagRepoImpl) FindByRuleAndLocale(ctx context.Context, ruleID, localeID int64) (list []*Tag, err error)
- func (r *TagRepoImpl) FindOne(ctx context.Context, id int64) (e *Tag, err error)
- func (r *TagRepoImpl) Insert(ctx context.Context, e Tag) (lastInsertID int64, err error)
- func (r *TagRepoImpl) Update(ctx context.Context, e Tag) (err error)
- type Transactional
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedDataSourceRepoImpl ¶
type CachedDataSourceRepoImpl struct { dig.In DataSourceRepoImpl Redis *redis.Client }
CachedDataSourceRepoImpl is cached implementation of data_source repository
func (*CachedDataSourceRepoImpl) Find ¶
func (r *CachedDataSourceRepoImpl) Find(ctx context.Context) (list []*DataSource, err error)
Find of data_source entity
func (*CachedDataSourceRepoImpl) FindOne ¶
func (r *CachedDataSourceRepoImpl) FindOne(ctx context.Context, id int64) (e *DataSource, err error)
FindOne data_source entity
type CachedLocaleRepoImpl ¶
type CachedLocaleRepoImpl struct { dig.In LocaleRepoImpl Redis *redis.Client }
CachedLocaleRepoImpl is cached implementation of locale repository
type CachedMetricsUnmatchedRepoImpl ¶
type CachedMetricsUnmatchedRepoImpl struct { dig.In MetricsUnmatchedRepoImpl Redis *redis.Client }
CachedMetricsUnmatchedRepoImpl is cached implementation of metrics_unmatched repository
func (*CachedMetricsUnmatchedRepoImpl) Find ¶
func (r *CachedMetricsUnmatchedRepoImpl) Find(ctx context.Context, id int64) (e *MetricsUnmatched, err error)
Find metrics_unmatched entity
func (*CachedMetricsUnmatchedRepoImpl) List ¶
func (r *CachedMetricsUnmatchedRepoImpl) List(ctx context.Context) (list []*MetricsUnmatched, err error)
List of metrics_unmatched entity
type CachedTagRepoImpl ¶
type CachedTagRepoImpl struct { dig.In TagRepoImpl Redis *redis.Client }
CachedTagRepoImpl is cached implementation of tag repository
type DataSource ¶
type DataSource struct { ID int64 `json:"id"` Name string `json:"name"` Url string `json:"url"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
DataSource represented data_source entity
type DataSourceRepo ¶
type DataSourceRepo interface { FindOne(context.Context, int64) (*DataSource, error) Find(context.Context) ([]*DataSource, error) Insert(context.Context, DataSource) (lastInsertID int64, err error) Delete(context.Context, int64) error Update(context.Context, DataSource) error }
DataSourceRepo to handle data_sources entity
func NewDataSourceRepo ¶
func NewDataSourceRepo(impl CachedDataSourceRepoImpl) DataSourceRepo
NewDataSourceRepo return new instance of DataSourceRepo
type DataSourceRepoImpl ¶
DataSourceRepoImpl is implementation data_source repository
func (*DataSourceRepoImpl) Delete ¶
func (r *DataSourceRepoImpl) Delete(ctx context.Context, id int64) (err error)
Delete data_source
func (*DataSourceRepoImpl) Find ¶
func (r *DataSourceRepoImpl) Find(ctx context.Context) (list []*DataSource, err error)
Find data_source
func (*DataSourceRepoImpl) FindOne ¶
func (r *DataSourceRepoImpl) FindOne(ctx context.Context, id int64) (e *DataSource, err error)
FindOne data_source
func (*DataSourceRepoImpl) Insert ¶
func (r *DataSourceRepoImpl) Insert(ctx context.Context, e DataSource) (lastInsertID int64, err error)
Insert data_source
func (*DataSourceRepoImpl) Update ¶
func (r *DataSourceRepoImpl) Update(ctx context.Context, e DataSource) (err error)
Update data_source
type Locale ¶
type Locale struct { ID int64 `json:"id"` LangCode string `json:"lang_code"` CountryCode string `json:"country_code"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
Locale represented locale entity
type LocaleRepo ¶
type LocaleRepo interface { FindOne(context.Context, int64) (*Locale, error) Find(context.Context) ([]*Locale, error) Insert(context.Context, Locale) (lastInsertID int64, err error) Delete(context.Context, int64) error Update(context.Context, Locale) error }
LocaleRepo to handle locales entity
func NewLocaleRepo ¶
func NewLocaleRepo(impl CachedLocaleRepoImpl) LocaleRepo
NewLocaleRepo return new instance of LocaleRepo
type LocaleRepoImpl ¶
LocaleRepoImpl is implementation locale repository
func (*LocaleRepoImpl) Delete ¶
func (r *LocaleRepoImpl) Delete(ctx context.Context, id int64) (err error)
Delete locale
func (*LocaleRepoImpl) Find ¶
func (r *LocaleRepoImpl) Find(ctx context.Context) (list []*Locale, err error)
Find locale
type MetricsUnmatched ¶
type MetricsUnmatched struct { ID int64 `json:"id"` RequestPath string `json:"request_path"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
MetricsUnmatched represented metrics_unmatched entity
type MetricsUnmatchedCount ¶
type MetricsUnmatchedCount struct { RequestPath string `json:"request_path"` Count int64 `json:"count"` Since time.Time `json:"since"` }
MetricsUnmatchedCount represented metrics_unmatched entity
type MetricsUnmatchedRepo ¶
type MetricsUnmatchedRepo interface { Find(context.Context, int64) (*MetricsUnmatched, error) List(context.Context) ([]*MetricsUnmatched, error) ListCount(context.Context) ([]*MetricsUnmatchedCount, error) Insert(context.Context, MetricsUnmatched) (lastInsertID int64, err error) Delete(context.Context, int64) error Update(context.Context, MetricsUnmatched) error }
MetricsUnmatchedRepo to handle metrics_unmatched entity
func NewMetricsUnmatchedRepo ¶
func NewMetricsUnmatchedRepo(impl CachedMetricsUnmatchedRepoImpl) MetricsUnmatchedRepo
NewMetricsUnmatchedRepo return new instance of MetricsUnmatchedRepo
type MetricsUnmatchedRepoImpl ¶
MetricsUnmatchedRepoImpl is implementation metrics_unmatched repository
func (*MetricsUnmatchedRepoImpl) Delete ¶
func (r *MetricsUnmatchedRepoImpl) Delete(ctx context.Context, id int64) (err error)
Delete metrics_unmatched
func (*MetricsUnmatchedRepoImpl) Find ¶
func (r *MetricsUnmatchedRepoImpl) Find(ctx context.Context, id int64) (e *MetricsUnmatched, err error)
Find metrics_unmatched
func (*MetricsUnmatchedRepoImpl) Insert ¶
func (r *MetricsUnmatchedRepoImpl) Insert(ctx context.Context, e MetricsUnmatched) (lastInsertID int64, err error)
Insert metrics_unmatched
func (*MetricsUnmatchedRepoImpl) List ¶
func (r *MetricsUnmatchedRepoImpl) List(ctx context.Context) (list []*MetricsUnmatched, err error)
List metrics_unmatched
func (*MetricsUnmatchedRepoImpl) ListCount ¶
func (r *MetricsUnmatchedRepoImpl) ListCount(ctx context.Context) (list []*MetricsUnmatchedCount, err error)
func (*MetricsUnmatchedRepoImpl) Update ¶
func (r *MetricsUnmatchedRepoImpl) Update(ctx context.Context, e MetricsUnmatched) (err error)
Update metrics_unmatched
type Rule ¶
type Rule struct { ID int64 `json:"id"` Name string `json:"name" validate:"required"` UrlPattern string `json:"url_pattern" validate:"required"` DataSourceID *int64 `json:"data_source_id"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
Rule Entity
type RuleRepo ¶
type RuleRepo interface { FindOne(ctx context.Context, id int64) (*Rule, error) Find(ctx context.Context) ([]*Rule, error) Insert(ctx context.Context, rule Rule) (lastInsertID int64, err error) Delete(ctx context.Context, id int64) error Update(ctx context.Context, rule Rule) error }
RuleRepo is rule repository
func NewRuleRepo ¶
func NewRuleRepo(impl RuleRepoImpl) RuleRepo
NewRuleRepo return new instance of RuleRepo
type RuleRepoImpl ¶
RuleRepoImpl is implementation rule repository
func (*RuleRepoImpl) Delete ¶
func (r *RuleRepoImpl) Delete(ctx context.Context, id int64) (err error)
Delete rule
func (*RuleRepoImpl) Find ¶
func (r *RuleRepoImpl) Find(ctx context.Context) (list []*Rule, err error)
Find rule
type Tag ¶
type Tag struct { ID int64 `json:"id"` RuleID int64 `json:"rule_id"` LocaleID int64 `json:"locale_id"` Type string `json:"type"` Attributes dbkit.JSON `json:"attributes"` Value string `json:"value"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
Tag represented tag entity
type TagRepo ¶
type TagRepo interface { FindOne(context.Context, int64) (*Tag, error) Find(context.Context) ([]*Tag, error) FindByRuleAndLocale(ctx context.Context, ruleID, localeID int64) ([]*Tag, error) Insert(context.Context, Tag) (lastInsertID int64, err error) Delete(context.Context, int64) error Update(context.Context, Tag) error }
TagRepo to handle tags entity
func NewTagRepo ¶
func NewTagRepo(impl CachedTagRepoImpl) TagRepo
NewTagRepo return new instance of TagRepo
type TagRepoImpl ¶
TagRepoImpl is implementation tag repository
func (*TagRepoImpl) Delete ¶
func (r *TagRepoImpl) Delete(ctx context.Context, id int64) (err error)
Delete tag
func (*TagRepoImpl) Find ¶
func (r *TagRepoImpl) Find(ctx context.Context) (list []*Tag, err error)
Find tags
func (*TagRepoImpl) FindByRuleAndLocale ¶
func (r *TagRepoImpl) FindByRuleAndLocale(ctx context.Context, ruleID, localeID int64) (list []*Tag, err error)
FindByRuleAndLocale to return list of tags based on rule and locale
type Transactional ¶
Transactional database
Source Files ¶
- cached_data_source_repo_impl.go
- cached_locale_repo_impl.go
- cached_metrics_unmatched_repo_impl.go
- cached_tag_repo_impl.go
- data_source_repo.go
- data_source_repo_impl.go
- locale_repo.go
- locale_repo_impl.go
- metrics_unmatched_repo.go
- metrics_unmatched_repo_dto.go
- metrics_unmatched_repo_impl.go
- rule_repo.go
- rule_repo_impl.go
- tag_repo.go
- tag_repo_impl.go
- transactional.go