Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) DeleteRole(ctx context.Context, options *DeleteRoleOptions) error
- func (c *Client) DeleteUser(ctx context.Context, options *DeleteUserOptions) error
- func (c *Client) GetRole(ctx context.Context, options *GetRoleOptions) (*Role, error)
- func (c *Client) GetUser(ctx context.Context, options *GetUserOptions) (*User, error)
- func (c *Client) UpsertRole(ctx context.Context, role *Role) (*Role, error)
- func (c *Client) UpsertUser(ctx context.Context, user *User) (*User, error)
- type ClientOptions
- type DeleteRoleOptions
- type DeleteUserOptions
- type FailedCommandError
- type GetRoleOptions
- type GetUserOptions
- type NotFoundError
- type Privilege
- type Privileges
- type Resource
- type Result
- type Role
- type ShortRole
- type ShortRoles
- type TooManyError
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var PrivilegeAttributeTypes = map[string]attr.Type{ "resource": types.ObjectType{ AttrTypes: map[string]attr.Type{ "db": types.StringType, "collection": types.StringType, }, }, "actions": types.SetType{ ElemType: types.StringType, }, }
View Source
var ShortRoleAttributeTypes = map[string]attr.Type{ "role": types.StringType, "db": types.StringType, }
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ClientOptions // contains filtered or unexported fields }
func (*Client) DeleteRole ¶
func (c *Client) DeleteRole(ctx context.Context, options *DeleteRoleOptions) error
func (*Client) DeleteUser ¶
func (c *Client) DeleteUser(ctx context.Context, options *DeleteUserOptions) error
func (*Client) UpsertRole ¶
type ClientOptions ¶
type DeleteRoleOptions ¶
type DeleteUserOptions ¶
type FailedCommandError ¶
type FailedCommandError struct {
Cmd string
}
func (FailedCommandError) Error ¶
func (e FailedCommandError) Error() string
type GetRoleOptions ¶
type GetUserOptions ¶
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type Privileges ¶
type Privileges []Privilege
func (*Privileges) ToTerraformSet ¶
func (p *Privileges) ToTerraformSet(ctx context.Context) (*types.Set, diag.Diagnostics)
type Role ¶
type Role struct { Name string `bson:"role"` Database string `bson:"db"` Privileges Privileges `bson:"privileges"` Roles ShortRoles `bson:"roles"` }
type ShortRoles ¶
type ShortRoles []ShortRole
func (*ShortRoles) ToTerraformSet ¶
func (r *ShortRoles) ToTerraformSet(ctx context.Context) (*types.Set, diag.Diagnostics)
type TooManyError ¶
type TooManyError struct {
// contains filtered or unexported fields
}
func (TooManyError) Error ¶
func (e TooManyError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.