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/tablespace.go

18 lines
489 B

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