Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateDSN(secret *corev1.Secret) string
- type Server
- func (s *Server) CheckInvalidName(name string) (string, error)
- func (s *Server) Close(ctx context.Context) error
- func (s *Server) Connect(ctx context.Context) error
- func (s *Server) CopyConfigToSecret(secret *corev1.Secret)
- func (s *Server) CreateDatabase(ctx context.Context, dbName, roleName string) (string, error)
- func (s *Server) CreateRole(ctx context.Context, roleName string) (string, string, error)
- func (s *Server) CreateSchema(ctx context.Context, schemaName, roleName string) error
- func (s *Server) Delete(ctx context.Context, name string) error
- func (s *Server) IsDatabase(ctx context.Context, dbName string) (string, bool, error)
- func (s *Server) IsRole(ctx context.Context, roleName string) (bool, error)
- func (s *Server) ListUsers(ctx context.Context) []string
- func (s *Server) UpdateRolePassword(ctx context.Context, roleName string) (string, string, error)
Constants ¶
View Source
const ( DatabaseKeyDSN = "dsn" DatabaseKeyUsername = "username" DatabaseKeyPassword = "password" DatabaseKeyHost = "host" DatabaseKeyPort = "port" DatabaseKeySchema = "schema" DatabaseKeyDatabase = "database" DatabaseKeyOnDelete = "onDelete" )
View Source
const (
PostgreSQLNameDataLen = 64
)
Variables ¶
View Source
var ( ErrInvalidName = errors.New("invalid name") ErrRoleExists = errors.New("role already exists") )
Functions ¶
func GenerateDSN ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) CopyConfigToSecret ¶
func (*Server) CreateDatabase ¶
func (*Server) CreateRole ¶
func (*Server) CreateSchema ¶
func (*Server) IsDatabase ¶
Click to show internal directories.
Click to hide internal directories.