Documentation ¶
Index ¶
- func New() (interface{}, error)
- func Run(apiTLSConfig *api.TLSConfig) error
- type MongoDBAtlas
- func (c MongoDBAtlas) Close() error
- func (c MongoDBAtlas) Connection(_ context.Context) (interface{}, error)
- func (m *MongoDBAtlas) CreateUser(ctx context.Context, statements dbplugin.Statements, ...) (username string, password string, err error)
- func (c MongoDBAtlas) Init(ctx context.Context, conf map[string]interface{}, verifyConnection bool) (map[string]interface{}, error)
- func (c MongoDBAtlas) Initialize(ctx context.Context, conf map[string]interface{}, verifyConnection bool) error
- func (m *MongoDBAtlas) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, ...) error
- func (m *MongoDBAtlas) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error
- func (m *MongoDBAtlas) RotateRootCredentials(ctx context.Context, statements []string) (map[string]interface{}, error)
- func (m *MongoDBAtlas) SetCredentials(ctx context.Context, statements dbplugin.Statements, ...) (username, password string, err error)
- func (m *MongoDBAtlas) Type() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MongoDBAtlas ¶
type MongoDBAtlas struct { credsutil.CredentialsProducer // contains filtered or unexported fields }
func (MongoDBAtlas) Close ¶
func (c MongoDBAtlas) Close() error
Close terminates the database connection.
func (MongoDBAtlas) Connection ¶
func (*MongoDBAtlas) CreateUser ¶
func (m *MongoDBAtlas) CreateUser(ctx context.Context, statements dbplugin.Statements, usernameConfig dbplugin.UsernameConfig, expiration time.Time) (username string, password string, err error)
func (MongoDBAtlas) Init ¶
func (c MongoDBAtlas) Init(ctx context.Context, conf map[string]interface{}, verifyConnection bool) (map[string]interface{}, error)
Initialize parses connection configuration.
func (MongoDBAtlas) Initialize ¶
func (*MongoDBAtlas) RenewUser ¶
func (m *MongoDBAtlas) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, expiration time.Time) error
RenewUser is not supported on MongoDB, so this is a no-op.
func (*MongoDBAtlas) RevokeUser ¶
func (m *MongoDBAtlas) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error
RevokeUser drops the specified user from the authentication database. If none is provided in the revocation statement, the default "admin" authentication database will be assumed.
func (*MongoDBAtlas) RotateRootCredentials ¶
func (m *MongoDBAtlas) RotateRootCredentials(ctx context.Context, statements []string) (map[string]interface{}, error)
RotateRootCredentials is not currently supported on MongoDB
func (*MongoDBAtlas) SetCredentials ¶
func (m *MongoDBAtlas) SetCredentials(ctx context.Context, statements dbplugin.Statements, staticUser dbplugin.StaticUserConfig) (username, password string, err error)
SetCredentials uses provided information to set/create a user in the database. Unlike CreateUser, this method requires a username be provided and uses the name given, instead of generating a name. This is used for creating and setting the password of static accounts, as well as rolling back passwords in the database in the event an updated database fails to save in Vault's storage.
func (*MongoDBAtlas) Type ¶
func (m *MongoDBAtlas) Type() (string, error)
Type returns the TypeName for this backend