 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- type Destination
- type DestinationRepo
- type DestinationTable
- func (d *DestinationTable) CountWhereGroupID(tx Transaction, group_id int) (int, error)
- func (d *DestinationTable) Create(tx Transaction, destination_group_id, port, startPort, endPort int, ...) (int, error)
- func (d *DestinationTable) Delete(tx Transaction, id int) error
- func (d *DestinationTable) GetID(tx Transaction, destination_group_id, port, startPort, endPort int, ...) (int, error)
 
- type GroupRepo
- type GroupTable
- type MetricsWrapper
- func (mw *MetricsWrapper) All() ([]Policy, error)
- func (mw *MetricsWrapper) ByGuids(srcGuids, dstGuids []string) ([]Policy, error)
- func (mw *MetricsWrapper) CheckDatabase() error
- func (mw *MetricsWrapper) Create(policies []Policy) error
- func (mw *MetricsWrapper) Delete(policies []Policy) error
- func (mw *MetricsWrapper) Tags() ([]Tag, error)
 
- type Migrator
- type Policy
- type PolicyRepo
- type PolicyTable
- func (p *PolicyTable) CountWhereDestinationID(tx Transaction, destination_id int) (int, error)
- func (p *PolicyTable) CountWhereGroupID(tx Transaction, source_group_id int) (int, error)
- func (p *PolicyTable) Create(tx Transaction, source_group_id int, destination_id int) error
- func (p *PolicyTable) Delete(tx Transaction, source_group_id int, destination_id int) error
 
- type Ports
- type Source
- type Store
- type Tag
- 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 DestinationRepo ¶
type DestinationTable ¶
type DestinationTable struct {
}
    func (*DestinationTable) CountWhereGroupID ¶
func (d *DestinationTable) CountWhereGroupID(tx Transaction, group_id int) (int, error)
func (*DestinationTable) Create ¶
func (d *DestinationTable) Create(tx Transaction, destination_group_id, port, startPort, endPort int, protocol string) (int, error)
func (*DestinationTable) Delete ¶
func (d *DestinationTable) Delete(tx Transaction, id int) error
func (*DestinationTable) GetID ¶
func (d *DestinationTable) GetID(tx Transaction, destination_group_id, port, startPort, endPort int, protocol string) (int, error)
type GroupRepo ¶
type GroupRepo interface {
	Create(Transaction, string) (int, error)
	Delete(Transaction, int) error
	GetID(Transaction, string) (int, error)
}
    type GroupTable ¶
type GroupTable struct {
}
    func (*GroupTable) Create ¶
func (g *GroupTable) Create(tx Transaction, guid string) (int, error)
func (*GroupTable) Delete ¶
func (g *GroupTable) Delete(tx Transaction, id int) error
func (*GroupTable) GetID ¶
func (g *GroupTable) GetID(tx Transaction, guid string) (int, error)
type MetricsWrapper ¶
type MetricsWrapper struct {
	Store         Store
	MetricsSender metricsSender
}
    func (*MetricsWrapper) All ¶
func (mw *MetricsWrapper) All() ([]Policy, error)
func (*MetricsWrapper) ByGuids ¶
func (mw *MetricsWrapper) ByGuids(srcGuids, dstGuids []string) ([]Policy, error)
func (*MetricsWrapper) CheckDatabase ¶
func (mw *MetricsWrapper) CheckDatabase() error
func (*MetricsWrapper) Create ¶
func (mw *MetricsWrapper) Create(policies []Policy) error
func (*MetricsWrapper) Delete ¶
func (mw *MetricsWrapper) Delete(policies []Policy) error
func (*MetricsWrapper) Tags ¶
func (mw *MetricsWrapper) Tags() ([]Tag, error)
type Migrator ¶
type Migrator interface {
	PerformMigrations(driverName string, migrationDb migrations.MigrationDb, maxNumMigrations int) (int, error)
}
    type Policy ¶
type Policy struct {
	Source      Source
	Destination Destination
}
    type PolicyRepo ¶
type PolicyRepo interface {
	Create(Transaction, int, int) error
	Delete(Transaction, int, int) error
	CountWhereGroupID(Transaction, int) (int, error)
	CountWhereDestinationID(Transaction, int) (int, error)
}
    type PolicyTable ¶
type PolicyTable struct {
}
    func (*PolicyTable) CountWhereDestinationID ¶
func (p *PolicyTable) CountWhereDestinationID(tx Transaction, destination_id int) (int, error)
func (*PolicyTable) CountWhereGroupID ¶
func (p *PolicyTable) CountWhereGroupID(tx Transaction, source_group_id int) (int, error)
func (*PolicyTable) Create ¶
func (p *PolicyTable) Create(tx Transaction, source_group_id int, destination_id int) error
func (*PolicyTable) Delete ¶
func (p *PolicyTable) Delete(tx Transaction, source_group_id int, destination_id int) error
       Source Files
      ¶
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.