Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrantDbAndSchemaPrivileges ¶ added in v0.4.1
GrantDbAndSchemaPrivileges grants user privileges to create schema and connect to the database/public schema
func GrantDefaultPrivileges ¶ added in v0.4.1
GrantDefaultPrivileges configures default privileges for any objects created by the user
This ensures that any objects created by user in the future will be accessible to the database owner role Since grantRole adds role membership to database owner role, this effectively gives any new users access to objects
Types ¶
type Database ¶
type DbInfo ¶
type FeatureName ¶
type FeatureName uint
const ( FeatureCreateRoleWith FeatureName = iota FeatureDBAllowConnections FeatureDBIsTemplate FeatureFallbackApplicationName FeatureRLS FeatureSchemaCreateIfNotExist FeatureReplication FeatureExtension FeaturePrivileges FeatureForceDropDatabase FeaturePid )
type Features ¶
type Features map[FeatureName]bool
func CalcSupportedFeatures ¶
func (Features) IsSupported ¶
func (f Features) IsSupported(name FeatureName) bool
type NoopRevoker ¶ added in v0.1.1
type NoopRevoker struct {
}
type RoleGrant ¶ added in v0.1.2
type RoleGrant struct {
// Member receives all the permissions for Target
Member string
// Target is the role that gains an additional Member
Target string
// WithAdminOption permits Member to grant it to others
WithAdminOption bool
}
RoleGrant adds Member to the Target role
type TempGrant ¶
func GrantRoleMembership ¶ added in v0.1.1
GrantRoleMembership grants role membership of the target 'role' to the 'currentUser' This is used to perform commands if user is not a superuser For instance, when using AWS RDS, user is not given superuser It returns false if the grant is not needed because the user is already a member of this role.
Click to show internal directories.
Click to hide internal directories.