Skip to content
/ gsm Public

A simple golang package for accessing secrets on Google Cloud Secret Manager.

License

Notifications You must be signed in to change notification settings

kioie/gsm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go GCP Secret Manager

Go GCP Secret Manager

If you are working on GCP Secret Manager, this package is a useful place to start. It offers simple and easy integrations. Use this package to get started.


codecov License Actions Status Go Report Card Open Source Love

A simple golang package for reading, writing, deleting, storing and editing secrets on Google Cloud Secret Manager.

With extensive test coverage and benchmarks.

Features

  • Lightweight and fast
  • Native Go implementation.
  • Context based client authorization
  • Integrated API wrapper
  • Improved API error handlers
  • Improved CRUD operations on GCP Secrets

Installation

Install the package to your $GOPATH with the go tool from shell:

$ go get github.com/kioie/gcp-secret-manager

Requirements

gcp-secret-manager package tested against Go >= 1.13.x.

Usage

Import the gcp-secret-manager package

import "github.com/kioie/gcp-secret-manager"

Declare global variable ProjectID

ProjectID="<your-project-id>"

Example

package main  
  
import (  
   "fmt"  
   "github.com/kioie/gcp-secret-manager"  
)  
  
func main() {  
 //Declare ProjectID
   ProjectID = "secret-manager-test"  
   //Check if "my-secret" exists
   fmt.Println(gcp_secret_manager.SecretExists("my-secret"))  
   //Get the secret  
   result, _ := gcp_secret_manager.GetSecret("my-secret", "")  
   fmt.Println(result)
}

Contributors

Copyright

Copyright © 2020 Eddy Kioi

Go GCP-SECRET-MANAGER package released under Apache License .

About

A simple golang package for accessing secrets on Google Cloud Secret Manager.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages