vschemaacl

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AuthorizedDDLUsers specifies the users that can perform ddl operations
	AuthorizedDDLUsers = viperutil.Configure(
		"vschema_ddl_authorized_users",
		viperutil.Options[*authorizedDDLUsers]{
			FlagName: "vschema_ddl_authorized_users",
			Default:  &authorizedDDLUsers{},
			Dynamic:  true,
			GetFunc: func(v *viper.Viper) func(key string) *authorizedDDLUsers {
				return func(key string) *authorizedDDLUsers {
					newVal := v.GetString(key)
					curVal, ok := v.Get(key).(*authorizedDDLUsers)
					if ok && newVal == curVal.source {
						return curVal
					}
					return NewAuthorizedDDLUsers(newVal)
				}
			},
		},
	)
)

Functions

func Authorized

func Authorized(caller *querypb.VTGateCallerID) bool

Authorized returns true if the given caller is allowed to execute vschema operations

func NewAuthorizedDDLUsers added in v0.22.0

func NewAuthorizedDDLUsers(users string) *authorizedDDLUsers

func RegisterSchemaACLFlags added in v0.15.0

func RegisterSchemaACLFlags(fs *pflag.FlagSet)

RegisterSchemaACLFlags installs log flags on the given FlagSet.

`go/cmd/*` entrypoints should either use servenv.ParseFlags(WithArgs)? which calls this function, or call this function directly before parsing command-line arguments.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL