Documentation
¶
Index ¶
- Variables
- type Active
- type BlacklistDomainModel
- type BlacklistDomainsModel
- type BlacklistURIModel
- type BlacklistURIsModel
- type Database
- func (v *Database) DelRules(ctx context.Context, t Types, domain string) error
- func (v *Database) Down(_ ctx.Context) error
- func (v *Database) GetAllRules(ctx context.Context, ts int64) (RulesModel, error)
- func (v *Database) GetBlacklistDomain(ctx context.Context, ts int64) (BlacklistDomainsModel, error)
- func (v *Database) GetBlacklistURI(ctx context.Context, ts int64) (BlacklistURIsModel, error)
- func (v *Database) GetRules(ctx context.Context, t Types, ts int64, active Active) (RulesModel, error)
- func (v *Database) GetRulesMap(ctx context.Context, types Types, ts int64, call func(map[string]string) error) error
- func (v *Database) SetBlacklistDomain(ctx context.Context, tag string, domain []string) error
- func (v *Database) SetBlacklistDomainActive(ctx context.Context, domain string, active Active) error
- func (v *Database) SetBlacklistURI(ctx context.Context, uri string) (string, error)
- func (v *Database) SetRules(ctx context.Context, t Types, domain, ips string, active Active) error
- func (v *Database) Up(ctx ctx.Context) error
- type RuleModel
- type RulesModel
- type Types
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BlacklistDomainModel ¶
type BlacklistDomainsModel ¶
type BlacklistDomainsModel []BlacklistDomainModel
type BlacklistURIModel ¶
type BlacklistURIsModel ¶
type BlacklistURIsModel []BlacklistURIModel
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) GetAllRules ¶
func (*Database) GetBlacklistDomain ¶
func (*Database) GetBlacklistURI ¶
func (*Database) GetRulesMap ¶
func (*Database) SetBlacklistDomain ¶
func (*Database) SetBlacklistDomainActive ¶
func (*Database) SetBlacklistURI ¶
type RulesModel ¶
type RulesModel []RuleModel
func (RulesModel) ToMap ¶
func (v RulesModel) ToMap() map[string]string
Click to show internal directories.
Click to hide internal directories.