acls

package
v0.24.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)
)
View Source
var (
	AclMutex = &sync.RWMutex{}
)

Functions

func DeleteAclFromCache

func DeleteAclFromCache(containerID ContainerID)

Types

type ACL

type ACL map[AclID]byte

ACL - the ACL of other nodes in a NetworkACL for a single unique node

func (ACL) Allow

func (acl ACL) Allow(ID AclID)

ACL.Allow - allows access by ID in memory

func (ACL) Disallow

func (acl ACL) Disallow(ID AclID)

ACL.DisallowNode - disallows access by ID in memory

func (ACL) IsAllowed

func (acl ACL) IsAllowed(ID AclID) (allowed bool)

ACL.IsAllowed - sees if ID is allowed in referring ACL

func (ACL) Remove

func (acl ACL) Remove(ID AclID)

ACL.Remove - removes a node from a ACL in memory

func (ACL) Save

func (acl ACL) Save(containerID ContainerID, ID AclID) (ACL, error)

ACL.Update - updates a ACL in DB

type ACLContainer

type ACLContainer map[AclID]ACL

ACLContainer - the total list of all node's ACL in a given network

func (ACLContainer) ChangeAccess

func (networkACL ACLContainer) ChangeAccess(ID1, ID2 AclID, value byte)

ACLContainer.ChangeAccess - changes the relationship between two nodes in memory

func (ACLContainer) Get

func (aclContainer ACLContainer) Get(containerID ContainerID) (ACLContainer, error)

ACLContainer.Get - saves the state of a ACLContainer to the db

func (ACLContainer) New

func (aclContainer ACLContainer) New(containerID ContainerID) (ACLContainer, error)

ACLContainer.New - saves the state of a ACLContainer to the db

func (ACLContainer) RemoveACL

func (aclContainer ACLContainer) RemoveACL(ID AclID) ACLContainer

ACLContainer.RemoveACL - removes the state of a ACL in the ACLContainer in memory

func (ACLContainer) Save

func (aclContainer ACLContainer) Save(containerID ContainerID) (ACLContainer, error)

ACLContainer.Save - saves the state of a ACLContainer to the db

func (ACLContainer) UpdateACL

func (aclContainer ACLContainer) UpdateACL(ID AclID, acl ACL) ACLContainer

ACLContainer.UpdateACL - saves the state of a ACL in the ACLContainer in memory

type ACLJson

type ACLJson string

ACLJson - the string representation in JSON of an ACL Node or Network

type AclID

type AclID string

AclID - the node id of a given node

type ContainerID

type ContainerID string

ContainerID - the networkID of a given network

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL