You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/vendor/github.com/sean-/postgresql-acl/table.go

19 lines
453 B

package acl
import "fmt"
// Table models the privileges of a table aclitem
type Table struct {
ACL
}
// NewTable parses a PostgreSQL ACL string for a table and returns a Table
// object
func NewTable(acl ACL) (Table, error) {
if !validRights(acl, validTablePrivs) {
return Table{}, fmt.Errorf("invalid flags set for table (%+q), only %+q allowed", permString(acl.Privileges, acl.GrantOptions), validTablePrivs)
}
return Table{ACL: acl}, nil
}