mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-08 10:11:08 +08:00
node ACL logic + tests implemented
This commit is contained in:
27
logic/acls/types.go
Normal file
27
logic/acls/types.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package acls
|
||||
|
||||
var (
|
||||
// NotPresent - 0 - not present (default)
|
||||
NotPresent = byte(0)
|
||||
// NotAllowed - 1 - not allowed access
|
||||
NotAllowed = byte(1) // 1 - not allowed
|
||||
// Allowed - 2 - allowed access
|
||||
Allowed = byte(2)
|
||||
)
|
||||
|
||||
type (
|
||||
// NodeID - the node id of a given node
|
||||
NodeID string
|
||||
|
||||
// NetworkID - the networkID of a given network
|
||||
NetworkID string
|
||||
|
||||
// NodeACL - the ACL of other nodes in a NetworkACL for a single unique node
|
||||
NodeACL map[NodeID]byte
|
||||
|
||||
// NetworkACL - the total list of all node's ACL in a given network
|
||||
NetworkACL map[NodeID]NodeACL
|
||||
|
||||
// ACLJson - the string representation in JSON of an ACL Node or Network
|
||||
ACLJson string
|
||||
)
|
Reference in New Issue
Block a user