Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
Name string
Owner string
Template string
Encoding string
Collation string
LcCtype string
TablespaceName string
ConnectionLimit int
IsTemplate bool
AllowConnections bool
}
func DefaultDatabase ¶
func DefaultDatabase() Database
type DbInfo ¶
type DbInfo struct {
DbVersion semver.Version
SupportedFeatures Features
IsSuperuser bool
CurrentUser string
}
func CalcDbConnectionInfo ¶
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 TempRoleMembership ¶
TempRoleMembership 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
func (TempRoleMembership) Grant ¶
func (t TempRoleMembership) Grant(conn *pgx.Conn) (*TempGrant, error)
Grant grants the role *role* to the user *member*. 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.