Documentation
¶
Index ¶
- func Diff(all, managed, wanted Map, fallbackOwner string) <-chan postgres.SyncQuery
- func ProcessColumns(columns []string, super bool) []string
- type Config
- type Map
- type Membership
- type Options
- type Role
- func (r *Role) Alter(wanted Role) (out []postgres.SyncQuery)
- func (r *Role) BlacklistKey() string
- func (r Role) Check(m Map, genealogy []string) error
- func (r *Role) Create() (out []postgres.SyncQuery)
- func (r *Role) Drop(fallbackOwner string) (out []postgres.SyncQuery)
- func (r Role) MemberOf(p string) bool
- func (r *Role) Merge(o Role)
- func (r Role) MissingParents(o []Membership) (out []Membership)
- func (r *Role) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessColumns ¶
Types ¶
type Membership ¶
func (Membership) String ¶
func (m Membership) String() string
type Options ¶
type Options struct {
Super bool `column:"rolsuper" mapstructure:"SUPERUSER"`
CreateDB bool `column:"rolcreatedb" mapstructure:"CREATEDB"`
CreateRole bool `column:"rolcreaterole" mapstructure:"CREATEROLE"`
Inherit bool `column:"rolinherit" mapstructure:"INHERIT"`
CanLogin bool `column:"rolcanlogin" mapstructure:"LOGIN"`
Replication bool `column:"rolreplication" mapstructure:"REPLICATION"`
ByPassRLS bool `column:"rolbypassrls" mapstructure:"BYPASSRLS"`
ConnLimit int `column:"rolconnlimit" mapstructure:"CONNECTION LIMIT"`
}
type Role ¶
type Role struct {
Name string
Comment string
Parents []Membership
Options Options
Config *Config
BeforeCreate string
AfterCreate string
}
func (*Role) Alter ¶
Generate queries to update current role configuration to match wanted role configuration.
func (*Role) BlacklistKey ¶
func (Role) MissingParents ¶
func (r Role) MissingParents(o []Membership) (out []Membership)
Click to show internal directories.
Click to hide internal directories.