mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-13 00:24:31 +08:00
27 lines
707 B
Go
27 lines
707 B
Go
package models
|
|
|
|
type SrcType string
|
|
type DstType string
|
|
|
|
// AllowedTrafficDirection - allowed direction of traffic
|
|
type AllowedTrafficDirection int
|
|
|
|
const (
|
|
// TrafficDirectionUni implies traffic is only allowed in one direction (src --> dst)
|
|
TrafficDirectionUni AllowedTrafficDirection = iota
|
|
// TrafficDirectionBi implies traffic is allowed both direction (src <--> dst )
|
|
TrafficDirectionBi
|
|
)
|
|
|
|
const (
|
|
SrcUser SrcType = "user"
|
|
SrcHost SrcType = "host"
|
|
|
|
DstHost DstType = "host"
|
|
)
|
|
|
|
type Acl struct {
|
|
Src SrcType `json:"src_type"`
|
|
Dst DstType `json:"dst_type"`
|
|
AllowedDirection AllowedTrafficDirection `json:"allowed_traffic_direction"`
|
|
}
|