Documentation ¶
Index ¶
- Constants
- Variables
- type Destination
- func (d *Destination) CountWhereGroupID(ctx context.Context, tx Transaction, group_id int) (int, error)
- func (d *Destination) Create(ctx context.Context, tx Transaction, destination_group_id int, port int, ...) (int, error)
- func (d *Destination) Delete(ctx context.Context, tx Transaction, id int) error
- func (d *Destination) GetID(ctx context.Context, tx Transaction, destination_group_id int, port int, ...) (int, error)
- type DestinationRepo
- type Group
- type GroupRepo
- type MetricsWrapper
- func (mw *MetricsWrapper) All() ([]models.Policy, error)
- func (mw *MetricsWrapper) ByGuids(srcGuids, dstGuids []string) ([]models.Policy, error)
- func (mw *MetricsWrapper) Create(ctx context.Context, policies []models.Policy) error
- func (mw *MetricsWrapper) Delete(ctx context.Context, policies []models.Policy) error
- func (mw *MetricsWrapper) Tags() ([]models.Tag, error)
- type Policy
- func (p *Policy) CountWhereDestinationID(ctx context.Context, tx Transaction, destination_id int) (int, error)
- func (p *Policy) CountWhereGroupID(ctx context.Context, tx Transaction, source_group_id int) (int, error)
- func (p *Policy) Create(ctx context.Context, tx Transaction, source_group_id int, destination_id int) error
- func (p *Policy) Delete(ctx context.Context, tx Transaction, source_group_id int, destination_id int) error
- type PolicyRepo
- type Store
- type Transaction
Constants ¶
View Source
const MAX_TAG_LENGTH = 3
View Source
const MIN_TAG_LENGTH = 1
Variables ¶
View Source
var RecordNotFoundError = errors.New("record not found")
Functions ¶
This section is empty.
Types ¶
type Destination ¶
type Destination struct { }
func (*Destination) CountWhereGroupID ¶
func (d *Destination) CountWhereGroupID(ctx context.Context, tx Transaction, group_id int) (int, error)
func (*Destination) Create ¶
func (d *Destination) Create(ctx context.Context, tx Transaction, destination_group_id int, port int, protocol string) (int, error)
func (*Destination) Delete ¶
func (d *Destination) Delete(ctx context.Context, tx Transaction, id int) error
type DestinationRepo ¶
type MetricsWrapper ¶ added in v0.17.0
type MetricsWrapper struct { Store Store MetricsSender metricsSender }
func (*MetricsWrapper) All ¶ added in v0.17.0
func (mw *MetricsWrapper) All() ([]models.Policy, error)
func (*MetricsWrapper) ByGuids ¶ added in v0.17.0
func (mw *MetricsWrapper) ByGuids(srcGuids, dstGuids []string) ([]models.Policy, error)
type Policy ¶
type Policy struct { }
func (*Policy) CountWhereDestinationID ¶
func (*Policy) CountWhereGroupID ¶
type PolicyRepo ¶
type Store ¶
type Store interface { Create(context.Context, []models.Policy) error All() ([]models.Policy, error) Delete(context.Context, []models.Policy) error Tags() ([]models.Tag, error) ByGuids([]string, []string) ([]models.Policy, error) }
func New ¶
func New(dbConnectionPool db, g GroupRepo, d DestinationRepo, p PolicyRepo, tl int) (Store, error)
Click to show internal directories.
Click to hide internal directories.