rds

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const AWSRDSType = "CF::GrantOutput::AWSRDS"
View Source
const DatabaseType = "AWS::RDS::Database"
View Source
const DatabaseUserType = "AWS::RDS::DatabaseUser"
View Source
const GrantOutputType = "CF::GrantOutput::AWSRDS"

Variables

View Source
var Command = cli.Command{
	Name:        "rds",
	Usage:       "Granted RDS plugin",
	Description: "Granted RDS plugin",
	Subcommands: []*cli.Command{&proxyCommand},
}

Functions

func GrabUnusedPort

func GrabUnusedPort() (string, error)

Types

type AWSRDS

type AWSRDS struct {
	Grant            eid.EID      `json:"grant" authz:"grant"`
	Name             string       `json:"name" authz:"name"`
	SSOStartURL      string       `json:"sso_start_url" authz:"sso_start_url"`
	SSORoleName      string       `json:"sso_role_name" authz:"sso_role_name"`
	SSORegion        string       `json:"sso_region" authz:"sso_region"`
	Database         Database     `json:"database" authz:"database"`
	User             DatabaseUser `json:"user" authz:"user"`
	SSMSessionTarget string       `json:"ssm_session_target" authz:"ssm_session_target"`
	PermissionSetARN string       `json:"permission_set_arn" authz:"permission_set_arn"`
}

AWSRDS is the grant output for AWS RDS Grants.

AWSRDS is excluded from the Cedar schema.

func (AWSRDS) EID

func (e AWSRDS) EID() eid.EID

func (AWSRDS) Parents

func (e AWSRDS) Parents() []eid.EID

type CommandData

type CommandData struct {
	GrantOutput              AWSRDS
	SSMPortForwardLocalPort  string
	SSMPortForwardServerPort string
}

type Database

type Database struct {
	ID         string  `json:"id" authz:"id"`
	Name       string  `json:"name" authz:"name"`
	Engine     string  `json:"engine" authz:"engine"`
	Region     string  `json:"region" authz:"region"`
	Account    eid.EID `json:"account" authz:"account,relation=AWS::Account"`
	InstanceID string  `json:"instance_id" authz:"instance_id"`
	// the name of the database on the instance, used when connecting
	Database string `json:"database" authz:"database"`
}

func (Database) EID

func (e Database) EID() eid.EID

func (Database) Parents

func (e Database) Parents() []eid.EID

type DatabaseUser

type DatabaseUser struct {
	ID       string  `json:"id" authz:"id"`
	Name     string  `json:"name" authz:"name"`
	Username string  `json:"username" authz:"username"`
	Database eid.EID `json:"database" authz:"database,relation=AWS::RDS::Database"`
}

func (DatabaseUser) EID

func (e DatabaseUser) EID() eid.EID

func (DatabaseUser) Parents

func (e DatabaseUser) Parents() []eid.EID

type DebugWriter

type DebugWriter struct{}

DebugWriter is an io.Writer that writes messages using clio.Debug.

func (DebugWriter) Write

func (dw DebugWriter) Write(p []byte) (n int, err error)

Write implements the io.Writer interface for DebugWriter.

type NotifyOnSubstringMatchWriter

type NotifyOnSubstringMatchWriter struct {
	Phrase   string
	Callback func()
}

func (*NotifyOnSubstringMatchWriter) Write

func (nw *NotifyOnSubstringMatchWriter) Write(p []byte) (n int, err error)

type SSMDebugLogger

type SSMDebugLogger struct {
	// Writers to write logging output to
	Writers []io.Writer
}

func (*SSMDebugLogger) Close

func (l *SSMDebugLogger) Close()

func (*SSMDebugLogger) Critical

func (l *SSMDebugLogger) Critical(v ...interface{}) error

func (*SSMDebugLogger) Criticalf

func (l *SSMDebugLogger) Criticalf(format string, params ...interface{}) error

func (*SSMDebugLogger) Debug

func (l *SSMDebugLogger) Debug(v ...interface{})

func (*SSMDebugLogger) Debugf

func (l *SSMDebugLogger) Debugf(format string, params ...interface{})

func (*SSMDebugLogger) Error

func (l *SSMDebugLogger) Error(v ...interface{}) error

func (*SSMDebugLogger) Errorf

func (l *SSMDebugLogger) Errorf(format string, params ...interface{}) error

func (*SSMDebugLogger) Flush

func (l *SSMDebugLogger) Flush()

func (*SSMDebugLogger) Info

func (l *SSMDebugLogger) Info(v ...interface{})

func (*SSMDebugLogger) Infof

func (l *SSMDebugLogger) Infof(format string, params ...interface{})

func (*SSMDebugLogger) Trace

func (l *SSMDebugLogger) Trace(v ...interface{})

func (*SSMDebugLogger) Tracef

func (l *SSMDebugLogger) Tracef(format string, params ...interface{})

func (*SSMDebugLogger) Warn

func (l *SSMDebugLogger) Warn(v ...interface{}) error

func (*SSMDebugLogger) Warnf

func (l *SSMDebugLogger) Warnf(format string, params ...interface{}) error

func (*SSMDebugLogger) WithContext

func (l *SSMDebugLogger) WithContext(context ...string) (contextLogger log.T)

Jump to

Keyboard shortcuts

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