acl.go 535 B

123456789101112131415161718
  1. package functions
  2. import (
  3. "fmt"
  4. "net/http"
  5. "github.com/gravitl/netmaker/logic/acls"
  6. )
  7. // GetACL - fetch all ACLs associated with a network
  8. func GetACL(networkName string) *acls.ACLContainer {
  9. return request[acls.ACLContainer](http.MethodGet, fmt.Sprintf("/api/networks/%s/acls", networkName), nil)
  10. }
  11. // UpdateACL - update an ACL
  12. func UpdateACL(networkName string, payload *acls.ACLContainer) *acls.ACLContainer {
  13. return request[acls.ACLContainer](http.MethodPut, fmt.Sprintf("/api/networks/%s/acls", networkName), payload)
  14. }