neon

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 6 Imported by: 0

README

Plugin for AWS Lambda to reset Neon User's Password

logo

Go Report Card codecov

Neon is a fully managed serverless PostgreSQL with a generous free tier. Neon separates storage and compute and offers modern developer features such as serverless, branching, bottomless storage, and more. Neon is open source and written in Rust.

Find more about Neon here.

Requirements

Secrets (see the types definition):

  • Secret Admin shall be compliant with the type SecretAdmin
  • Secret User shall be compliant with the type SecretUser

AWS Lambda Configuration

The environment variable NEON_TOKEN_SECRET_ARN must contain the Secret Admin' s ARN.

Optionally, the environment variable DEBUG can be set to "yes", or "true" to activate debug level logs.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceClient

func NewServiceClient(client neon.Client) lambda.ServiceClient

NewServiceClient initiates the `ServiceClient` to rotate credentials for Neon user.

Types

type SecretAdmin

type SecretAdmin struct {
	// Token Neon API token
	Token string `json:"token"`
}

SecretAdmin defines the secret with the db admin access details.

type SecretUser

type SecretUser struct {
	// User Neon role
	User string `json:"user"`
	// Password Neon role's access password
	Password string `json:"password"`
	// Host Neon endpoint URI to access database
	Host string `json:"host"`
	// ProjectID Neon project ID
	ProjectID string `json:"project_id"`
	// BranchID Neon branch ID
	BranchID string `json:"branch_id"`
	// DatabaseName Neon database name
	DatabaseName string `json:"dbname"`
}

SecretUser defines the secret with db user access details.

Directories

Path Synopsis
cmd
lambda command

Jump to

Keyboard shortcuts

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